diff --git a/[refs] b/[refs] index acaef51c00dd..9a6626ceca38 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 14e71e4fb94c340273534a6d7f210aa82a3ca717 +refs/heads/master: 753649dbc49345a73a2454c770a3f2d54d11aec6 diff --git a/trunk/Documentation/connector/cn_test.c b/trunk/Documentation/connector/cn_test.c index 7764594778d4..b07add3467f1 100644 --- a/trunk/Documentation/connector/cn_test.c +++ b/trunk/Documentation/connector/cn_test.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/Documentation/filesystems/9p.txt b/trunk/Documentation/filesystems/9p.txt index c0236e753bc8..57e0b80a5274 100644 --- a/trunk/Documentation/filesystems/9p.txt +++ b/trunk/Documentation/filesystems/9p.txt @@ -37,15 +37,6 @@ For Plan 9 From User Space applications (http://swtch.com/plan9) mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER -For server running on QEMU host with virtio transport: - - mount -t 9p -o trans=virtio /mnt/9 - -where mount_tag is the tag associated by the server to each of the exported -mount points. Each 9P export is seen by the client as a virtio device with an -associated "mount_tag" property. Available mount tags can be -seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio/mount_tag files. - OPTIONS ======= @@ -56,7 +47,7 @@ OPTIONS fd - used passed file descriptors for connection (see rfdno and wfdno) virtio - connect to the next virtio channel available - (from QEMU with trans_virtio module) + (from lguest or KVM with trans_virtio module) rdma - connect to a specified RDMA channel uname=name user name to attempt mount as on the remote server. The @@ -94,12 +85,7 @@ OPTIONS port=n port to connect to on the remote server - noextend force legacy mode (no 9p2000.u or 9p2000.L semantics) - - version=name Select 9P protocol version. Valid options are: - 9p2000 - Legacy mode (same as noextend) - 9p2000.u - Use 9P2000.u protocol - 9p2000.L - Use 9P2000.L protocol + noextend force legacy mode (no 9p2000.u semantics) dfltuid attempt to mount as a particular uid diff --git a/trunk/Documentation/networking/stmmac.txt b/trunk/Documentation/networking/stmmac.txt deleted file mode 100644 index 7ee770b5ef5f..000000000000 --- a/trunk/Documentation/networking/stmmac.txt +++ /dev/null @@ -1,143 +0,0 @@ - STMicroelectronics 10/100/1000 Synopsys Ethernet driver - -Copyright (C) 2007-2010 STMicroelectronics Ltd -Author: Giuseppe Cavallaro - -This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers -(Synopsys IP blocks); it has been fully tested on STLinux platforms. - -Currently this network device driver is for all STM embedded MAC/GMAC -(7xxx SoCs). - -DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 -Universal version 4.0 have been used for developing the first code -implementation. - -Please, for more information also visit: www.stlinux.com - -1) Kernel Configuration -The kernel configuration option is STMMAC_ETH: - Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> - STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) - -2) Driver parameters list: - debug: message level (0: no output, 16: all); - phyaddr: to manually provide the physical address to the PHY device; - dma_rxsize: DMA rx ring size; - dma_txsize: DMA tx ring size; - buf_sz: DMA buffer size; - tc: control the HW FIFO threshold; - tx_coe: Enable/Disable Tx Checksum Offload engine; - watchdog: transmit timeout (in milliseconds); - flow_ctrl: Flow control ability [on/off]; - pause: Flow Control Pause Time; - tmrate: timer period (only if timer optimisation is configured). - -3) Command line options -Driver parameters can be also passed in command line by using: - stmmaceth=dma_rxsize:128,dma_txsize:512 - -4) Driver information and notes - -4.1) Transmit process -The xmit method is invoked when the kernel needs to transmit a packet; it sets -the descriptors in the ring and informs the DMA engine that there is a packet -ready to be transmitted. -Once the controller has finished transmitting the packet, an interrupt is -triggered; So the driver will be able to release the socket buffers. -By default, the driver sets the NETIF_F_SG bit in the features field of the -net_device structure enabling the scatter/gather feature. - -4.2) Receive process -When one or more packets are received, an interrupt happens. The interrupts -are not queued so the driver has to scan all the descriptors in the ring during -the receive process. -This is based on NAPI so the interrupt handler signals only if there is work to be -done, and it exits. -Then the poll method will be scheduled at some future point. -The incoming packets are stored, by the DMA, in a list of pre-allocated socket -buffers in order to avoid the memcpy (Zero-copy). - -4.3) Timer-Driver Interrupt -Instead of having the device that asynchronously notifies the frame receptions, the -driver configures a timer to generate an interrupt at regular intervals. -Based on the granularity of the timer, the frames that are received by the device -will experience different levels of latency. Some NICs have dedicated timer -device to perform this task. STMMAC can use either the RTC device or the TMU -channel 2 on STLinux platforms. -The timers frequency can be passed to the driver as parameter; when change it, -take care of both hardware capability and network stability/performance impact. -Several performance tests on STM platforms showed this optimisation allows to spare -the CPU while having the maximum throughput. - -4.4) WOL -Wake up on Lan feature through Magic Frame is only supported for the GMAC -core. - -4.5) DMA descriptors -Driver handles both normal and enhanced descriptors. The latter has been only -tested on DWC Ether MAC 10/100/1000 Universal version 3.41a. - -4.6) Ethtool support -Ethtool is supported. Driver statistics and internal errors can be taken using: -ethtool -S ethX command. It is possible to dump registers etc. - -4.7) Jumbo and Segmentation Offloading -Jumbo frames are supported and tested for the GMAC. -The GSO has been also added but it's performed in software. -LRO is not supported. - -4.8) Physical -The driver is compatible with PAL to work with PHY and GPHY devices. - -4.9) Platform information -Several information came from the platform; please refer to the -driver's Header file in include/linux directory. - -struct plat_stmmacenet_data { - int bus_id; - int pbl; - int has_gmac; - void (*fix_mac_speed)(void *priv, unsigned int speed); - void (*bus_setup)(unsigned long ioaddr); -#ifdef CONFIG_STM_DRIVERS - struct stm_pad_config *pad_config; -#endif - void *bsp_priv; -}; - -Where: -- pbl (Programmable Burst Length) is maximum number of - beats to be transferred in one DMA transaction. - GMAC also enables the 4xPBL by default. -- fix_mac_speed and bus_setup are used to configure internal target - registers (on STM platforms); -- has_gmac: GMAC core is on board (get it at run-time in the next step); -- bus_id: bus identifier. - -struct plat_stmmacphy_data { - int bus_id; - int phy_addr; - unsigned int phy_mask; - int interface; - int (*phy_reset)(void *priv); - void *priv; -}; - -Where: -- bus_id: bus identifier; -- phy_addr: physical address used for the attached phy device; - set it to -1 to get it at run-time; -- interface: physical MII interface mode; -- phy_reset: hook to reset HW function. - -TODO: -- Continue to make the driver more generic and suitable for other Synopsys - Ethernet controllers used on other architectures (i.e. ARM). -- 10G controllers are not supported. -- MAC uses Normal descriptors and GMAC uses enhanced ones. - This is a limit that should be reviewed. MAC could want to - use the enhanced structure. -- Checksumming: Rx/Tx csum is done in HW in case of GMAC only. -- Review the timer optimisation code to use an embedded device that seems to be - available in new chip generations. diff --git a/trunk/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt b/trunk/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt index 4f8930263dd9..6e37be1eeb2d 100644 --- a/trunk/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt +++ b/trunk/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt @@ -21,15 +21,6 @@ Required properties: - fsl,qe-num-snums: define how many serial number(SNUM) the QE can use for the threads. -Optional properties: -- fsl,firmware-phandle: - Usage: required only if there is no fsl,qe-firmware child node - Value type: - Definition: Points to a firmware node (see "QE Firmware Node" below) - that contains the firmware that should be uploaded for this QE. - The compatible property for the firmware node should say, - "fsl,qe-firmware". - Recommended properties - brg-frequency : the internal clock source frequency for baud-rate generators in Hz. @@ -68,48 +59,3 @@ Example: reg = <0 c000>; }; }; - -* QE Firmware Node - -This node defines a firmware binary that is embedded in the device tree, for -the purpose of passing the firmware from bootloader to the kernel, or from -the hypervisor to the guest. - -The firmware node itself contains the firmware binary contents, a compatible -property, and any firmware-specific properties. The node should be placed -inside a QE node that needs it. Doing so eliminates the need for a -fsl,firmware-phandle property. Other QE nodes that need the same firmware -should define an fsl,firmware-phandle property that points to the firmware node -in the first QE node. - -The fsl,firmware property can be specified in the DTS (possibly using incbin) -or can be inserted by the boot loader at boot time. - -Required properties: - - compatible - Usage: required - Value type: - Definition: A standard property. Specify a string that indicates what - kind of firmware it is. For QE, this should be "fsl,qe-firmware". - - - fsl,firmware - Usage: required - Value type: , encoded as an array of bytes - Definition: A standard property. This property contains the firmware - binary "blob". - -Example: - qe1@e0080000 { - compatible = "fsl,qe"; - qe_firmware:qe-firmware { - compatible = "fsl,qe-firmware"; - fsl,firmware = [0x70 0xcd 0x00 0x00 0x01 0x46 0x45 ...]; - }; - ... - }; - - qe2@e0090000 { - compatible = "fsl,qe"; - fsl,firmware-phandle = <&qe_firmware>; - ... - }; diff --git a/trunk/Documentation/watchdog/src/watchdog-simple.c b/trunk/Documentation/watchdog/src/watchdog-simple.c index ba45803a2216..4cf72f3fa8e9 100644 --- a/trunk/Documentation/watchdog/src/watchdog-simple.c +++ b/trunk/Documentation/watchdog/src/watchdog-simple.c @@ -17,6 +17,9 @@ int main(void) ret = -1; break; } + ret = fsync(fd); + if (ret) + break; sleep(10); } close(fd); diff --git a/trunk/Documentation/watchdog/src/watchdog-test.c b/trunk/Documentation/watchdog/src/watchdog-test.c index 63fdc34ceb98..a750532ffcf8 100644 --- a/trunk/Documentation/watchdog/src/watchdog-test.c +++ b/trunk/Documentation/watchdog/src/watchdog-test.c @@ -31,8 +31,6 @@ static void keep_alive(void) */ int main(int argc, char *argv[]) { - int flags; - fd = open("/dev/watchdog", O_WRONLY); if (fd == -1) { @@ -43,14 +41,12 @@ int main(int argc, char *argv[]) if (argc > 1) { if (!strncasecmp(argv[1], "-d", 2)) { - flags = WDIOS_DISABLECARD; - ioctl(fd, WDIOC_SETOPTIONS, &flags); + ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); fprintf(stderr, "Watchdog card disabled.\n"); fflush(stderr); exit(0); } else if (!strncasecmp(argv[1], "-e", 2)) { - flags = WDIOS_ENABLECARD; - ioctl(fd, WDIOC_SETOPTIONS, &flags); + ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); fprintf(stderr, "Watchdog card enabled.\n"); fflush(stderr); exit(0); diff --git a/trunk/Documentation/watchdog/watchdog-api.txt b/trunk/Documentation/watchdog/watchdog-api.txt index eb7132ed8bbc..4cc4ba9d7150 100644 --- a/trunk/Documentation/watchdog/watchdog-api.txt +++ b/trunk/Documentation/watchdog/watchdog-api.txt @@ -222,10 +222,11 @@ returned value is the temperature in degrees fahrenheit. ioctl(fd, WDIOC_GETTEMP, &temperature); Finally the SETOPTIONS ioctl can be used to control some aspects of -the cards operation. +the cards operation; right now the pcwd driver is the only one +supporting this ioctl. int options = 0; - ioctl(fd, WDIOC_SETOPTIONS, &options); + ioctl(fd, WDIOC_SETOPTIONS, options); The following options are available: diff --git a/trunk/arch/alpha/boot/bootp.c b/trunk/arch/alpha/boot/bootp.c index be61670d4096..3c8d1b25c661 100644 --- a/trunk/arch/alpha/boot/bootp.c +++ b/trunk/arch/alpha/boot/bootp.c @@ -8,7 +8,6 @@ * based significantly on the arch/alpha/boot/main.c of Linus Torvalds */ #include -#include #include #include #include diff --git a/trunk/arch/alpha/boot/bootpz.c b/trunk/arch/alpha/boot/bootpz.c index c98865f21423..ade3f129dc27 100644 --- a/trunk/arch/alpha/boot/bootpz.c +++ b/trunk/arch/alpha/boot/bootpz.c @@ -10,7 +10,6 @@ * and the decompression code from MILO. */ #include -#include #include #include #include diff --git a/trunk/arch/alpha/boot/main.c b/trunk/arch/alpha/boot/main.c index ded57d9a80e1..644b7db55438 100644 --- a/trunk/arch/alpha/boot/main.c +++ b/trunk/arch/alpha/boot/main.c @@ -6,7 +6,6 @@ * This file is the bootloader for the Linux/AXP kernel */ #include -#include #include #include #include diff --git a/trunk/arch/alpha/boot/misc.c b/trunk/arch/alpha/boot/misc.c index 3ff9a957a25c..3047a1b3a517 100644 --- a/trunk/arch/alpha/boot/misc.c +++ b/trunk/arch/alpha/boot/misc.c @@ -19,7 +19,6 @@ */ #include -#include #include diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c index 7f912ba3d9ad..5f2cf23c4648 100644 --- a/trunk/arch/alpha/kernel/irq.c +++ b/trunk/arch/alpha/kernel/irq.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/osf_sys.c b/trunk/arch/alpha/kernel/osf_sys.c index de9d39717808..53c213f70fcb 100644 --- a/trunk/arch/alpha/kernel/osf_sys.c +++ b/trunk/arch/alpha/kernel/osf_sys.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/alpha/kernel/pci-noop.c b/trunk/arch/alpha/kernel/pci-noop.c index 246100ef07c2..823a540f9f5b 100644 --- a/trunk/arch/alpha/kernel/pci-noop.c +++ b/trunk/arch/alpha/kernel/pci-noop.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/alpha/kernel/pci-sysfs.c b/trunk/arch/alpha/kernel/pci-sysfs.c index d979e7c7bc4b..6ea822e7f724 100644 --- a/trunk/arch/alpha/kernel/pci-sysfs.c +++ b/trunk/arch/alpha/kernel/pci-sysfs.c @@ -10,7 +10,6 @@ */ #include -#include #include static int hose_mmap_page_range(struct pci_controller *hose, diff --git a/trunk/arch/alpha/kernel/pci_iommu.c b/trunk/arch/alpha/kernel/pci_iommu.c index d1dbd9acd1df..ce9e54c887fa 100644 --- a/trunk/arch/alpha/kernel/pci_iommu.c +++ b/trunk/arch/alpha/kernel/pci_iommu.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c index 395a464353b8..289039bb6bb2 100644 --- a/trunk/arch/alpha/kernel/process.c +++ b/trunk/arch/alpha/kernel/process.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -27,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/alpha/kernel/ptrace.c b/trunk/arch/alpha/kernel/ptrace.c index baa903602f6a..9acadc6b16a0 100644 --- a/trunk/arch/alpha/kernel/ptrace.c +++ b/trunk/arch/alpha/kernel/ptrace.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/alpha/kernel/smc37c669.c b/trunk/arch/alpha/kernel/smc37c669.c index 0435921d41c6..bca5bda90cde 100644 --- a/trunk/arch/alpha/kernel/smc37c669.c +++ b/trunk/arch/alpha/kernel/smc37c669.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/smc37c93x.c b/trunk/arch/alpha/kernel/smc37c93x.c index 3e6a2893af9f..2636cc028d06 100644 --- a/trunk/arch/alpha/kernel/smc37c93x.c +++ b/trunk/arch/alpha/kernel/smc37c93x.c @@ -4,6 +4,7 @@ #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/srm_env.c b/trunk/arch/alpha/kernel/srm_env.c index 4afc1a1e2e5a..dbbf04f9230e 100644 --- a/trunk/arch/alpha/kernel/srm_env.c +++ b/trunk/arch/alpha/kernel/srm_env.c @@ -30,7 +30,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/alpha/mm/init.c b/trunk/arch/alpha/mm/init.c index 86425ab53bf5..a0902c20d677 100644 --- a/trunk/arch/alpha/mm/init.c +++ b/trunk/arch/alpha/mm/init.c @@ -20,7 +20,6 @@ #include #include /* max_low_pfn */ #include -#include #include #include diff --git a/trunk/arch/arm/common/clkdev.c b/trunk/arch/arm/common/clkdev.c index dba4c1da63ed..6416d5b5020d 100644 --- a/trunk/arch/arm/common/clkdev.c +++ b/trunk/arch/arm/common/clkdev.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/common/it8152.c b/trunk/arch/arm/common/it8152.c index 7974baacafce..ee1d3b85eb65 100644 --- a/trunk/arch/arm/common/it8152.c +++ b/trunk/arch/arm/common/it8152.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/include/asm/cacheflush.h b/trunk/arch/arm/include/asm/cacheflush.h index 0d08d4170b64..72da7e045c6b 100644 --- a/trunk/arch/arm/include/asm/cacheflush.h +++ b/trunk/arch/arm/include/asm/cacheflush.h @@ -15,7 +15,6 @@ #include #include #include -#include #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) @@ -220,6 +219,12 @@ struct cpu_cache_fns { void (*dma_flush_range)(const void *, const void *); }; +struct outer_cache_fns { + void (*inv_range)(unsigned long, unsigned long); + void (*clean_range)(unsigned long, unsigned long); + void (*flush_range)(unsigned long, unsigned long); +}; + /* * Select the calling method */ @@ -276,6 +281,37 @@ extern void dmac_flush_range(const void *, const void *); #endif +#ifdef CONFIG_OUTER_CACHE + +extern struct outer_cache_fns outer_cache; + +static inline void outer_inv_range(unsigned long start, unsigned long end) +{ + if (outer_cache.inv_range) + outer_cache.inv_range(start, end); +} +static inline void outer_clean_range(unsigned long start, unsigned long end) +{ + if (outer_cache.clean_range) + outer_cache.clean_range(start, end); +} +static inline void outer_flush_range(unsigned long start, unsigned long end) +{ + if (outer_cache.flush_range) + outer_cache.flush_range(start, end); +} + +#else + +static inline void outer_inv_range(unsigned long start, unsigned long end) +{ } +static inline void outer_clean_range(unsigned long start, unsigned long end) +{ } +static inline void outer_flush_range(unsigned long start, unsigned long end) +{ } + +#endif + /* * Copy user data from/to a page which is mapped into a different * processes address space. Really, we want to allow our "user diff --git a/trunk/arch/arm/include/asm/clkdev.h b/trunk/arch/arm/include/asm/clkdev.h index b56c1389b6fa..7a0690da5e63 100644 --- a/trunk/arch/arm/include/asm/clkdev.h +++ b/trunk/arch/arm/include/asm/clkdev.h @@ -13,7 +13,6 @@ #define __ASM_CLKDEV_H struct clk; -struct device; struct clk_lookup { struct list_head node; diff --git a/trunk/arch/arm/include/asm/irq.h b/trunk/arch/arm/include/asm/irq.h index 237282f7c762..328f14a8b790 100644 --- a/trunk/arch/arm/include/asm/irq.h +++ b/trunk/arch/arm/include/asm/irq.h @@ -17,7 +17,6 @@ #ifndef __ASSEMBLY__ struct irqaction; -struct pt_regs; extern void migrate_irqs(void); extern void asm_do_IRQ(unsigned int, struct pt_regs *); diff --git a/trunk/arch/arm/include/asm/outercache.h b/trunk/arch/arm/include/asm/outercache.h deleted file mode 100644 index 25f76bae57ab..000000000000 --- a/trunk/arch/arm/include/asm/outercache.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * arch/arm/include/asm/outercache.h - * - * Copyright (C) 2010 ARM Ltd. - * Written by Catalin Marinas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __ASM_OUTERCACHE_H -#define __ASM_OUTERCACHE_H - -struct outer_cache_fns { - void (*inv_range)(unsigned long, unsigned long); - void (*clean_range)(unsigned long, unsigned long); - void (*flush_range)(unsigned long, unsigned long); -#ifdef CONFIG_OUTER_CACHE_SYNC - void (*sync)(void); -#endif -}; - -#ifdef CONFIG_OUTER_CACHE - -extern struct outer_cache_fns outer_cache; - -static inline void outer_inv_range(unsigned long start, unsigned long end) -{ - if (outer_cache.inv_range) - outer_cache.inv_range(start, end); -} -static inline void outer_clean_range(unsigned long start, unsigned long end) -{ - if (outer_cache.clean_range) - outer_cache.clean_range(start, end); -} -static inline void outer_flush_range(unsigned long start, unsigned long end) -{ - if (outer_cache.flush_range) - outer_cache.flush_range(start, end); -} - -#else - -static inline void outer_inv_range(unsigned long start, unsigned long end) -{ } -static inline void outer_clean_range(unsigned long start, unsigned long end) -{ } -static inline void outer_flush_range(unsigned long start, unsigned long end) -{ } - -#endif - -#ifdef CONFIG_OUTER_CACHE_SYNC -static inline void outer_sync(void) -{ - if (outer_cache.sync) - outer_cache.sync(); -} -#else -static inline void outer_sync(void) -{ } -#endif - -#endif /* __ASM_OUTERCACHE_H */ diff --git a/trunk/arch/arm/include/asm/system.h b/trunk/arch/arm/include/asm/system.h index 4ace45ec3ef8..ca88e6a84707 100644 --- a/trunk/arch/arm/include/asm/system.h +++ b/trunk/arch/arm/include/asm/system.h @@ -60,8 +60,6 @@ #include #include -#include - #define __exception __attribute__((section(".exception.text"))) struct thread_info; @@ -139,12 +137,10 @@ extern unsigned int user_debug; #define dmb() __asm__ __volatile__ ("" : : : "memory") #endif -#ifdef CONFIG_ARCH_HAS_BARRIERS -#include -#elif __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) -#define mb() do { dsb(); outer_sync(); } while (0) +#if __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) +#define mb() dmb() #define rmb() dmb() -#define wmb() mb() +#define wmb() dmb() #else #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) @@ -156,9 +152,9 @@ extern unsigned int user_debug; #define smp_rmb() barrier() #define smp_wmb() barrier() #else -#define smp_mb() dmb() -#define smp_rmb() dmb() -#define smp_wmb() dmb() +#define smp_mb() mb() +#define smp_rmb() rmb() +#define smp_wmb() wmb() #endif #define read_barrier_depends() do { } while(0) diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c index 3b3d2c80509c..b7cb45bb91e8 100644 --- a/trunk/arch/arm/kernel/irq.c +++ b/trunk/arch/arm/kernel/irq.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/kernel/kprobes.c b/trunk/arch/arm/kernel/kprobes.c index 2ba7deb3072e..60c62c377fa9 100644 --- a/trunk/arch/arm/kernel/kprobes.c +++ b/trunk/arch/arm/kernel/kprobes.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -394,14 +393,6 @@ void __kprobes jprobe_return(void) /* * Setup an empty pt_regs. Fill SP and PC fields as * they're needed by longjmp_break_handler. - * - * We allocate some slack between the original SP and start of - * our fabricated regs. To be precise we want to have worst case - * covered which is STMFD with all 16 regs so we allocate 2 * - * sizeof(struct_pt_regs)). - * - * This is to prevent any simulated instruction from writing - * over the regs when they are accessing the stack. */ "sub sp, %0, %1 \n\t" "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" @@ -419,7 +410,7 @@ void __kprobes jprobe_return(void) "ldmia sp, {r0 - pc} \n\t" : : "r" (kcb->jprobe_saved_regs.ARM_sp), - "I" (sizeof(struct pt_regs) * 2), + "I" (sizeof(struct pt_regs)), "J" (offsetof(struct pt_regs, ARM_sp)), "J" (offsetof(struct pt_regs, ARM_pc)), "J" (offsetof(struct pt_regs, ARM_cpsr)) diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c index c628bdf6c430..f28c5e9c51ea 100644 --- a/trunk/arch/arm/kernel/module.c +++ b/trunk/arch/arm/kernel/module.c @@ -16,9 +16,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c index 0e12e0acbf26..ba2adefa53f7 100644 --- a/trunk/arch/arm/kernel/process.c +++ b/trunk/arch/arm/kernel/process.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/kernel/sys_arm.c b/trunk/arch/arm/kernel/sys_arm.c index c23501842b98..4350f75e578c 100644 --- a/trunk/arch/arm/kernel/sys_arm.c +++ b/trunk/arch/arm/kernel/sys_arm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include /* Fork a new task - this creates a new program thread. * This is called indirectly via a small wrapper diff --git a/trunk/arch/arm/lib/memmove.S b/trunk/arch/arm/lib/memmove.S index 938fc14f962d..5025c863713d 100644 --- a/trunk/arch/arm/lib/memmove.S +++ b/trunk/arch/arm/lib/memmove.S @@ -74,7 +74,7 @@ ENTRY(memmove) rsb ip, ip, #32 addne pc, pc, ip @ C is always clear here b 7f -6: W(nop) +6: nop W(ldr) r3, [r1, #-4]! W(ldr) r4, [r1, #-4]! W(ldr) r5, [r1, #-4]! @@ -85,7 +85,7 @@ ENTRY(memmove) add pc, pc, ip nop - W(nop) + nop W(str) r3, [r0, #-4]! W(str) r4, [r0, #-4]! W(str) r5, [r0, #-4]! diff --git a/trunk/arch/arm/lib/uaccess_with_memcpy.c b/trunk/arch/arm/lib/uaccess_with_memcpy.c index e2d2f2cd0c4f..6b967ffb6552 100644 --- a/trunk/arch/arm/lib/uaccess_with_memcpy.c +++ b/trunk/arch/arm/lib/uaccess_with_memcpy.c @@ -16,7 +16,6 @@ #include #include #include /* for in_atomic() */ -#include #include #include diff --git a/trunk/arch/arm/mach-aaec2000/core.c b/trunk/arch/arm/mach-aaec2000/core.c index 3ef68330452a..b5c5fc6ba3a9 100644 --- a/trunk/arch/arm/mach-aaec2000/core.c +++ b/trunk/arch/arm/mach-aaec2000/core.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-bcmring/dma.c b/trunk/arch/arm/mach-bcmring/dma.c index 2ccf670ce1ac..7b20fccb9d4e 100644 --- a/trunk/arch/arm/mach-bcmring/dma.c +++ b/trunk/arch/arm/mach-bcmring/dma.c @@ -28,7 +28,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-davinci/board-dm365-evm.c b/trunk/arch/arm/mach-davinci/board-dm365-evm.c index df4ab2105869..d15beceb632e 100644 --- a/trunk/arch/arm/mach-davinci/board-dm365-evm.c +++ b/trunk/arch/arm/mach-davinci/board-dm365-evm.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-davinci/dma.c b/trunk/arch/arm/mach-davinci/dma.c index 02d939853b88..15dd886df04c 100644 --- a/trunk/arch/arm/mach-davinci/dma.c +++ b/trunk/arch/arm/mach-davinci/dma.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-h720x/common.c b/trunk/arch/arm/mach-h720x/common.c index bdb3f6706801..7a2614828217 100644 --- a/trunk/arch/arm/mach-h720x/common.c +++ b/trunk/arch/arm/mach-h720x/common.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-integrator/cpu.c b/trunk/arch/arm/mach-integrator/cpu.c index f77f20255045..44d4c2e8207b 100644 --- a/trunk/arch/arm/mach-integrator/cpu.c +++ b/trunk/arch/arm/mach-integrator/cpu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-integrator/impd1.c b/trunk/arch/arm/mach-integrator/impd1.c index 41b10725cef7..0058c937719e 100644 --- a/trunk/arch/arm/mach-integrator/impd1.c +++ b/trunk/arch/arm/mach-integrator/impd1.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-integrator/integrator_cp.c b/trunk/arch/arm/mach-integrator/integrator_cp.c index 15e6cc5a352f..66ef86d6d9e3 100644 --- a/trunk/arch/arm/mach-integrator/integrator_cp.c +++ b/trunk/arch/arm/mach-integrator/integrator_cp.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -20,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-integrator/pci_v3.c b/trunk/arch/arm/mach-integrator/pci_v3.c index ffbd349363af..148d25fc636f 100644 --- a/trunk/arch/arm/mach-integrator/pci_v3.c +++ b/trunk/arch/arm/mach-integrator/pci_v3.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop13xx/pci.c b/trunk/arch/arm/mach-iop13xx/pci.c index 6d5a90813d31..4873f26a42e1 100644 --- a/trunk/arch/arm/mach-iop13xx/pci.c +++ b/trunk/arch/arm/mach-iop13xx/pci.c @@ -18,7 +18,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-iop32x/glantank.c b/trunk/arch/arm/mach-iop32x/glantank.c index 10384fc37cb2..93370a46b620 100644 --- a/trunk/arch/arm/mach-iop32x/glantank.c +++ b/trunk/arch/arm/mach-iop32x/glantank.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop32x/iq31244.c b/trunk/arch/arm/mach-iop32x/iq31244.c index d6ac85ff109d..a7a08dda7f33 100644 --- a/trunk/arch/arm/mach-iop32x/iq31244.c +++ b/trunk/arch/arm/mach-iop32x/iq31244.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop32x/iq80321.c b/trunk/arch/arm/mach-iop32x/iq80321.c index c6a0e4ee9d91..0200f80c1e17 100644 --- a/trunk/arch/arm/mach-iop32x/iq80321.c +++ b/trunk/arch/arm/mach-iop32x/iq80321.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop32x/n2100.c b/trunk/arch/arm/mach-iop32x/n2100.c index 5d99039286eb..2a5c637639bb 100644 --- a/trunk/arch/arm/mach-iop32x/n2100.c +++ b/trunk/arch/arm/mach-iop32x/n2100.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop33x/iq80331.c b/trunk/arch/arm/mach-iop33x/iq80331.c index c6ff5523b380..394e95a30b75 100644 --- a/trunk/arch/arm/mach-iop33x/iq80331.c +++ b/trunk/arch/arm/mach-iop33x/iq80331.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-iop33x/iq80332.c b/trunk/arch/arm/mach-iop33x/iq80332.c index fbf551409394..a40badf126c2 100644 --- a/trunk/arch/arm/mach-iop33x/iq80332.c +++ b/trunk/arch/arm/mach-iop33x/iq80332.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/enp2611.c b/trunk/arch/arm/mach-ixp2000/enp2611.c index 1a557e0d055b..c84dfac13882 100644 --- a/trunk/arch/arm/mach-ixp2000/enp2611.c +++ b/trunk/arch/arm/mach-ixp2000/enp2611.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/ixdp2400.c b/trunk/arch/arm/mach-ixp2000/ixdp2400.c index 55e5c69352ad..4467c4224d73 100644 --- a/trunk/arch/arm/mach-ixp2000/ixdp2400.c +++ b/trunk/arch/arm/mach-ixp2000/ixdp2400.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/ixdp2800.c b/trunk/arch/arm/mach-ixp2000/ixdp2800.c index 237b61a85e9a..94f68ba9ea50 100644 --- a/trunk/arch/arm/mach-ixp2000/ixdp2800.c +++ b/trunk/arch/arm/mach-ixp2000/ixdp2800.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/ixdp2x00.c b/trunk/arch/arm/mach-ixp2000/ixdp2x00.c index 91fffb9b2084..30451300751b 100644 --- a/trunk/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/trunk/arch/arm/mach-ixp2000/ixdp2x00.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/ixdp2x01.c b/trunk/arch/arm/mach-ixp2000/ixdp2x01.c index 0369ec4242a6..4a12327a09a3 100644 --- a/trunk/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/trunk/arch/arm/mach-ixp2000/ixdp2x01.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/pci.c b/trunk/arch/arm/mach-ixp2000/pci.c index 90771cad06f8..60e9fd08ab80 100644 --- a/trunk/arch/arm/mach-ixp2000/pci.c +++ b/trunk/arch/arm/mach-ixp2000/pci.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp23xx/pci.c b/trunk/arch/arm/mach-ixp23xx/pci.c index 4b0e598a91c9..59022becb134 100644 --- a/trunk/arch/arm/mach-ixp23xx/pci.c +++ b/trunk/arch/arm/mach-ixp23xx/pci.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/avila-setup.c b/trunk/arch/arm/mach-ixp4xx/avila-setup.c index d8bc86d76f1d..6e558a76457d 100644 --- a/trunk/arch/arm/mach-ixp4xx/avila-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/avila-setup.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c index 31a47f6a8939..25bf5ad770ea 100644 --- a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/gateway7001-setup.c b/trunk/arch/arm/mach-ixp4xx/gateway7001-setup.c index 2583b2a13174..59b73a0ddfa9 100644 --- a/trunk/arch/arm/mach-ixp4xx/gateway7001-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/gateway7001-setup.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c index c67586b79400..0bc7185cb6f7 100644 --- a/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c index 827cbc4402f4..bbb768988845 100644 --- a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/trunk/arch/arm/mach-ixp4xx/ixp4xx_npe.c index a17ed79207a4..e8bb25778166 100644 --- a/trunk/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/trunk/arch/arm/mach-ixp4xx/ixp4xx_npe.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #define DEBUG_MSG 0 diff --git a/trunk/arch/arm/mach-ixp4xx/wg302v2-setup.c b/trunk/arch/arm/mach-ixp4xx/wg302v2-setup.c index 4dd74863daa9..7ea782021d1f 100644 --- a/trunk/arch/arm/mach-ixp4xx/wg302v2-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/wg302v2-setup.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-kirkwood/pcie.c b/trunk/arch/arm/mach-kirkwood/pcie.c index dee1eff50d39..a604b2a701aa 100644 --- a/trunk/arch/arm/mach-kirkwood/pcie.c +++ b/trunk/arch/arm/mach-kirkwood/pcie.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-lh7a40x/clcd.c b/trunk/arch/arm/mach-lh7a40x/clcd.c index 7fe4fd347c82..c472b9e8b37c 100644 --- a/trunk/arch/arm/mach-lh7a40x/clcd.c +++ b/trunk/arch/arm/mach-lh7a40x/clcd.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-mx3/mach-mx31moboard.c b/trunk/arch/arm/mach-mx3/mach-mx31moboard.c index fccb9207b78d..a7dc5191bf5e 100644 --- a/trunk/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/trunk/arch/arm/mach-mx3/mach-mx31moboard.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-mx3/mach-pcm037.c b/trunk/arch/arm/mach-mx3/mach-pcm037.c index 034ec8190065..11f531559169 100644 --- a/trunk/arch/arm/mach-mx3/mach-pcm037.c +++ b/trunk/arch/arm/mach-mx3/mach-pcm037.c @@ -36,7 +36,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-mx3/mx31moboard-devboard.c b/trunk/arch/arm/mach-mx3/mx31moboard-devboard.c index 11b906ce7eae..9fbad2eb3a49 100644 --- a/trunk/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/trunk/arch/arm/mach-mx3/mx31moboard-devboard.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-mx3/mx31moboard-marxbot.c b/trunk/arch/arm/mach-mx3/mx31moboard-marxbot.c index ffb105e14d88..3958515d75bf 100644 --- a/trunk/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/trunk/arch/arm/mach-mx3/mx31moboard-marxbot.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-netx/fb.c b/trunk/arch/arm/mach-netx/fb.c index 5b84bcd30271..1d844e228ea9 100644 --- a/trunk/arch/arm/mach-netx/fb.c +++ b/trunk/arch/arm/mach-netx/fb.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-netx/xc.c b/trunk/arch/arm/mach-netx/xc.c index f009b54e8d20..181a78ba8165 100644 --- a/trunk/arch/arm/mach-netx/xc.c +++ b/trunk/arch/arm/mach-netx/xc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-nomadik/gpio.c b/trunk/arch/arm/mach-nomadik/gpio.c index 66b1c91ccc74..9a09b2791e03 100644 --- a/trunk/arch/arm/mach-nomadik/gpio.c +++ b/trunk/arch/arm/mach-nomadik/gpio.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c b/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c index 463e92465fda..795b15e8982a 100644 --- a/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c +++ b/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c @@ -10,7 +10,6 @@ */ #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c b/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c index aed1999d24fc..abee8338735d 100644 --- a/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c +++ b/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-omap1/mcbsp.c b/trunk/arch/arm/mach-omap1/mcbsp.c index e9bdff192f82..f9a5cf750b59 100644 --- a/trunk/arch/arm/mach-omap1/mcbsp.c +++ b/trunk/arch/arm/mach-omap1/mcbsp.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/trunk/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index e60ca4e47bbd..3b1eac4d5390 100644 --- a/trunk/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/trunk/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-omap2/iommu2.c b/trunk/arch/arm/mach-omap2/iommu2.c index 4f63dc6859a4..6f4b7cc8f4d1 100644 --- a/trunk/arch/arm/mach-omap2/iommu2.c +++ b/trunk/arch/arm/mach-omap2/iommu2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-omap2/mcbsp.c b/trunk/arch/arm/mach-omap2/mcbsp.c index 2f3cad6f9402..be8fce395a58 100644 --- a/trunk/arch/arm/mach-omap2/mcbsp.c +++ b/trunk/arch/arm/mach-omap2/mcbsp.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-omap2/mux.c b/trunk/arch/arm/mach-omap2/mux.c index 8b3d26935a39..b4ca84ee0a95 100644 --- a/trunk/arch/arm/mach-omap2/mux.c +++ b/trunk/arch/arm/mach-omap2/mux.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-omap2/pm-debug.c b/trunk/arch/arm/mach-omap2/pm-debug.c index 6cac9817c243..c18f7f2f19bc 100644 --- a/trunk/arch/arm/mach-omap2/pm-debug.c +++ b/trunk/arch/arm/mach-omap2/pm-debug.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-omap2/pm34xx.c b/trunk/arch/arm/mach-omap2/pm34xx.c index ea0000bc5358..fee2efb172e7 100644 --- a/trunk/arch/arm/mach-omap2/pm34xx.c +++ b/trunk/arch/arm/mach-omap2/pm34xx.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-orion5x/pci.c b/trunk/arch/arm/mach-orion5x/pci.c index e8706f15a670..bdf96eb523bc 100644 --- a/trunk/arch/arm/mach-orion5x/pci.c +++ b/trunk/arch/arm/mach-orion5x/pci.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-pnx4008/dma.c b/trunk/arch/arm/mach-pnx4008/dma.c index 7fa4bf2e2125..425f7188505e 100644 --- a/trunk/arch/arm/mach-pnx4008/dma.c +++ b/trunk/arch/arm/mach-pnx4008/dma.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-pnx4008/pm.c b/trunk/arch/arm/mach-pnx4008/pm.c index ee3c29c57ae3..1f0585329be4 100644 --- a/trunk/arch/arm/mach-pnx4008/pm.c +++ b/trunk/arch/arm/mach-pnx4008/pm.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-pxa/corgi_ssp.c b/trunk/arch/arm/mach-pxa/corgi_ssp.c index 9347254f8bcf..1d9bc118ee32 100644 --- a/trunk/arch/arm/mach-pxa/corgi_ssp.c +++ b/trunk/arch/arm/mach-pxa/corgi_ssp.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/trunk/arch/arm/mach-pxa/cpufreq-pxa3xx.c index 27fa329d9a8b..149cdd9aee4d 100644 --- a/trunk/arch/arm/mach-pxa/cpufreq-pxa3xx.c +++ b/trunk/arch/arm/mach-pxa/cpufreq-pxa3xx.c @@ -14,7 +14,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-pxa/mioa701.c b/trunk/arch/arm/mach-pxa/mioa701.c index 7a50ed8fce94..843fcca76e26 100644 --- a/trunk/arch/arm/mach-pxa/mioa701.c +++ b/trunk/arch/arm/mach-pxa/mioa701.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-pxa/pm.c b/trunk/arch/arm/mach-pxa/pm.c index 166c15f62916..7693355ee637 100644 --- a/trunk/arch/arm/mach-pxa/pm.c +++ b/trunk/arch/arm/mach-pxa/pm.c @@ -14,7 +14,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/mach-pxa/viper.c b/trunk/arch/arm/mach-pxa/viper.c index 9e0c5c3988a1..1dd13346f977 100644 --- a/trunk/arch/arm/mach-pxa/viper.c +++ b/trunk/arch/arm/mach-pxa/viper.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-realview/core.c b/trunk/arch/arm/mach-realview/core.c index f2dbce5f3cd4..90bd4ef71b2c 100644 --- a/trunk/arch/arm/mach-realview/core.c +++ b/trunk/arch/arm/mach-realview/core.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-rpc/dma.c b/trunk/arch/arm/mach-rpc/dma.c index 85883b2e0e49..c47d974d52bd 100644 --- a/trunk/arch/arm/mach-rpc/dma.c +++ b/trunk/arch/arm/mach-rpc/dma.c @@ -9,6 +9,7 @@ * * DMA functions specific to RiscPC architecture */ +#include #include #include #include diff --git a/trunk/arch/arm/mach-s3c64xx/dma.c b/trunk/arch/arm/mach-s3c64xx/dma.c index 33ccf7bf766a..b62bdf18dca4 100644 --- a/trunk/arch/arm/mach-s3c64xx/dma.c +++ b/trunk/arch/arm/mach-s3c64xx/dma.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-sa1100/jornada720_ssp.c b/trunk/arch/arm/mach-sa1100/jornada720_ssp.c index 9d490c66891c..9b6dee5d16db 100644 --- a/trunk/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/trunk/arch/arm/mach-sa1100/jornada720_ssp.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-sa1100/neponset.c b/trunk/arch/arm/mach-sa1100/neponset.c index c601a75a333d..0b505d9f22d6 100644 --- a/trunk/arch/arm/mach-sa1100/neponset.c +++ b/trunk/arch/arm/mach-sa1100/neponset.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-u300/dummyspichip.c b/trunk/arch/arm/mach-u300/dummyspichip.c index 5f55012b7c9e..962f9de454de 100644 --- a/trunk/arch/arm/mach-u300/dummyspichip.c +++ b/trunk/arch/arm/mach-u300/dummyspichip.c @@ -15,7 +15,6 @@ #include #include #include -#include /* * WARNING! Do not include this pl022-specific controller header * for any generic driver. It is only done in this dummy chip diff --git a/trunk/arch/arm/mach-u300/mmc.c b/trunk/arch/arm/mach-u300/mmc.c index 77fbb1e0e528..109f5a6e71c7 100644 --- a/trunk/arch/arm/mach-u300/mmc.c +++ b/trunk/arch/arm/mach-u300/mmc.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "mmc.h" #include "padmux.h" diff --git a/trunk/arch/arm/mach-versatile/core.c b/trunk/arch/arm/mach-versatile/core.c index 3b1a4ee01815..9ddb49b1cb71 100644 --- a/trunk/arch/arm/mach-versatile/core.c +++ b/trunk/arch/arm/mach-versatile/core.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-versatile/pci.c b/trunk/arch/arm/mach-versatile/pci.c index 334f0df4e948..7161ba23b58a 100644 --- a/trunk/arch/arm/mach-versatile/pci.c +++ b/trunk/arch/arm/mach-versatile/pci.c @@ -16,6 +16,7 @@ */ #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-w90x900/dev.c b/trunk/arch/arm/mach-w90x900/dev.c index e2958eb567f9..48876122df91 100644 --- a/trunk/arch/arm/mach-w90x900/dev.c +++ b/trunk/arch/arm/mach-w90x900/dev.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mm/Kconfig b/trunk/arch/arm/mm/Kconfig index 5bd7c89a6045..c4ed9f93f646 100644 --- a/trunk/arch/arm/mm/Kconfig +++ b/trunk/arch/arm/mm/Kconfig @@ -736,12 +736,6 @@ config NEEDS_SYSCALL_FOR_CMPXCHG config OUTER_CACHE bool -config OUTER_CACHE_SYNC - bool - help - The outer cache has a outer_cache_fns.sync function pointer - that can be used to drain the write buffer of the outer cache. - config CACHE_FEROCEON_L2 bool "Enable the Feroceon L2 cache controller" depends on ARCH_KIRKWOOD || ARCH_MV78XX0 @@ -763,7 +757,6 @@ config CACHE_L2X0 REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 default y select OUTER_CACHE - select OUTER_CACHE_SYNC help This option enables the L2x0 PrimeCell. @@ -788,9 +781,3 @@ config ARM_L1_CACHE_SHIFT int default 6 if ARM_L1_CACHE_SHIFT_6 default 5 - -config ARCH_HAS_BARRIERS - bool - help - This option allows the use of custom mandatory barriers - included via the mach/barriers.h file. diff --git a/trunk/arch/arm/mm/cache-l2x0.c b/trunk/arch/arm/mm/cache-l2x0.c index 21ad68ba22ba..07334632d3e2 100644 --- a/trunk/arch/arm/mm/cache-l2x0.c +++ b/trunk/arch/arm/mm/cache-l2x0.c @@ -93,15 +93,6 @@ static inline void l2x0_flush_line(unsigned long addr) } #endif -static void l2x0_cache_sync(void) -{ - unsigned long flags; - - spin_lock_irqsave(&l2x0_lock, flags); - cache_sync(); - spin_unlock_irqrestore(&l2x0_lock, flags); -} - static inline void l2x0_inv_all(void) { unsigned long flags; @@ -234,7 +225,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) outer_cache.inv_range = l2x0_inv_range; outer_cache.clean_range = l2x0_clean_range; outer_cache.flush_range = l2x0_flush_range; - outer_cache.sync = l2x0_cache_sync; printk(KERN_INFO "L2X0 cache controller enabled\n"); } diff --git a/trunk/arch/arm/mm/dma-mapping.c b/trunk/arch/arm/mm/dma-mapping.c index 1351edc0b26f..0da7eccf7749 100644 --- a/trunk/arch/arm/mm/dma-mapping.c +++ b/trunk/arch/arm/mm/dma-mapping.c @@ -11,7 +11,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/arm/mm/fault-armv.c b/trunk/arch/arm/mm/fault-armv.c index 0d414c28eb2c..c9b97e9836a2 100644 --- a/trunk/arch/arm/mm/fault-armv.c +++ b/trunk/arch/arm/mm/fault-armv.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mm/init.c b/trunk/arch/arm/mm/init.c index 83db12a68d56..7829cb5425f5 100644 --- a/trunk/arch/arm/mm/init.c +++ b/trunk/arch/arm/mm/init.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mm/pgd.c b/trunk/arch/arm/mm/pgd.c index be5f58e153bf..2690146161ba 100644 --- a/trunk/arch/arm/mm/pgd.c +++ b/trunk/arch/arm/mm/pgd.c @@ -8,7 +8,6 @@ * published by the Free Software Foundation. */ #include -#include #include #include diff --git a/trunk/arch/arm/plat-mxc/audmux-v2.c b/trunk/arch/arm/plat-mxc/audmux-v2.c index 0c2cc5cd4d83..d983cd6c788c 100644 --- a/trunk/arch/arm/plat-mxc/audmux-v2.c +++ b/trunk/arch/arm/plat-mxc/audmux-v2.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-mxc/pwm.c b/trunk/arch/arm/plat-mxc/pwm.c index c36f2630ed93..4ff6dfe04283 100644 --- a/trunk/arch/arm/plat-mxc/pwm.c +++ b/trunk/arch/arm/plat-mxc/pwm.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-omap/devices.c b/trunk/arch/arm/plat-omap/devices.c index 95677d17cd1c..4a4cd8774aaa 100644 --- a/trunk/arch/arm/plat-omap/devices.c +++ b/trunk/arch/arm/plat-omap/devices.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-omap/dma.c b/trunk/arch/arm/plat-omap/dma.c index 5c6c342c53f5..2ab224c8e16c 100644 --- a/trunk/arch/arm/plat-omap/dma.c +++ b/trunk/arch/arm/plat-omap/dma.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-omap/iommu-debug.c b/trunk/arch/arm/plat-omap/iommu-debug.c index e6c0d536899c..afd1c27cff7c 100644 --- a/trunk/arch/arm/plat-omap/iommu-debug.c +++ b/trunk/arch/arm/plat-omap/iommu-debug.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-omap/iommu.c b/trunk/arch/arm/plat-omap/iommu.c index 0e137663349c..905ed832df56 100644 --- a/trunk/arch/arm/plat-omap/iommu.c +++ b/trunk/arch/arm/plat-omap/iommu.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-omap/iovmm.c b/trunk/arch/arm/plat-omap/iovmm.c index 65c6d1ff7237..936aef1971cd 100644 --- a/trunk/arch/arm/plat-omap/iovmm.c +++ b/trunk/arch/arm/plat-omap/iovmm.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-omap/mailbox.c b/trunk/arch/arm/plat-omap/mailbox.c index 08a2df766289..4229cec53140 100644 --- a/trunk/arch/arm/plat-omap/mailbox.c +++ b/trunk/arch/arm/plat-omap/mailbox.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/plat-omap/mcbsp.c b/trunk/arch/arm/plat-omap/mcbsp.c index e1d0440fd4a8..52dfcc81511e 100644 --- a/trunk/arch/arm/plat-omap/mcbsp.c +++ b/trunk/arch/arm/plat-omap/mcbsp.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-omap/omap_device.c b/trunk/arch/arm/plat-omap/omap_device.c index 0f5197479513..590435894848 100644 --- a/trunk/arch/arm/plat-omap/omap_device.c +++ b/trunk/arch/arm/plat-omap/omap_device.c @@ -79,7 +79,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-pxa/dma.c b/trunk/arch/arm/plat-pxa/dma.c index 742350e0f2a7..2975798d411f 100644 --- a/trunk/arch/arm/plat-pxa/dma.c +++ b/trunk/arch/arm/plat-pxa/dma.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-pxa/pwm.c b/trunk/arch/arm/plat-pxa/pwm.c index 0732c6c8d511..51dc5c8106c0 100644 --- a/trunk/arch/arm/plat-pxa/pwm.c +++ b/trunk/arch/arm/plat-pxa/pwm.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-s3c24xx/cpu-freq.c b/trunk/arch/arm/plat-s3c24xx/cpu-freq.c index 1ecc15bfe9d4..2d42efb9f4e9 100644 --- a/trunk/arch/arm/plat-s3c24xx/cpu-freq.c +++ b/trunk/arch/arm/plat-s3c24xx/cpu-freq.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-s3c24xx/devs.c b/trunk/arch/arm/plat-s3c24xx/devs.c index 9265f09bfa58..8c6de1c9968f 100644 --- a/trunk/arch/arm/plat-s3c24xx/devs.c +++ b/trunk/arch/arm/plat-s3c24xx/devs.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-s3c24xx/s3c2410-iotiming.c b/trunk/arch/arm/plat-s3c24xx/s3c2410-iotiming.c index b1908e56da1b..963fb0b4379e 100644 --- a/trunk/arch/arm/plat-s3c24xx/s3c2410-iotiming.c +++ b/trunk/arch/arm/plat-s3c24xx/s3c2410-iotiming.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-s3c24xx/s3c2412-iotiming.c b/trunk/arch/arm/plat-s3c24xx/s3c2412-iotiming.c index 0b46d3895d62..24993dce10b5 100644 --- a/trunk/arch/arm/plat-s3c24xx/s3c2412-iotiming.c +++ b/trunk/arch/arm/plat-s3c24xx/s3c2412-iotiming.c @@ -21,7 +21,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/plat-samsung/adc.c b/trunk/arch/arm/plat-samsung/adc.c index 210030d5cfe1..0b5833b9ac5b 100644 --- a/trunk/arch/arm/plat-samsung/adc.c +++ b/trunk/arch/arm/plat-samsung/adc.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-samsung/dev-fb.c b/trunk/arch/arm/plat-samsung/dev-fb.c index 002a15f313f3..a90198fc4b0f 100644 --- a/trunk/arch/arm/plat-samsung/dev-fb.c +++ b/trunk/arch/arm/plat-samsung/dev-fb.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/plat-samsung/dev-i2c0.c b/trunk/arch/arm/plat-samsung/dev-i2c0.c index 3a601c16f03c..4c761529b949 100644 --- a/trunk/arch/arm/plat-samsung/dev-i2c0.c +++ b/trunk/arch/arm/plat-samsung/dev-i2c0.c @@ -11,7 +11,6 @@ * published by the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/arch/arm/plat-samsung/dev-i2c1.c b/trunk/arch/arm/plat-samsung/dev-i2c1.c index 858ee2a0414c..d44f79110506 100644 --- a/trunk/arch/arm/plat-samsung/dev-i2c1.c +++ b/trunk/arch/arm/plat-samsung/dev-i2c1.c @@ -11,7 +11,6 @@ * published by the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/arch/arm/plat-samsung/dev-nand.c b/trunk/arch/arm/plat-samsung/dev-nand.c index 3a7b8891ba4f..a52fb6cf618f 100644 --- a/trunk/arch/arm/plat-samsung/dev-nand.c +++ b/trunk/arch/arm/plat-samsung/dev-nand.c @@ -6,7 +6,6 @@ * published by the Free Software Foundation. */ -#include #include #include diff --git a/trunk/arch/arm/plat-samsung/dev-usb.c b/trunk/arch/arm/plat-samsung/dev-usb.c index 0e0a3bf5c982..88165657fa53 100644 --- a/trunk/arch/arm/plat-samsung/dev-usb.c +++ b/trunk/arch/arm/plat-samsung/dev-usb.c @@ -11,7 +11,6 @@ * published by the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/arch/arm/plat-samsung/pm-check.c b/trunk/arch/arm/plat-samsung/pm-check.c index e4baf76f374a..0b5bb774192a 100644 --- a/trunk/arch/arm/plat-samsung/pm-check.c +++ b/trunk/arch/arm/plat-samsung/pm-check.c @@ -17,7 +17,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/arm/plat-samsung/pwm.c b/trunk/arch/arm/plat-samsung/pwm.c index 2eeb49fa056d..f2d11390d01c 100644 --- a/trunk/arch/arm/plat-samsung/pwm.c +++ b/trunk/arch/arm/plat-samsung/pwm.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/plat-stmp3xxx/dma.c b/trunk/arch/arm/plat-stmp3xxx/dma.c index b4dcf8c0477d..ef88f25fb870 100644 --- a/trunk/arch/arm/plat-stmp3xxx/dma.c +++ b/trunk/arch/arm/plat-stmp3xxx/dma.c @@ -15,7 +15,6 @@ * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include #include diff --git a/trunk/arch/arm/vfp/vfpmodule.c b/trunk/arch/arm/vfp/vfpmodule.c index a420cb949328..7f3f59fcaa21 100644 --- a/trunk/arch/arm/vfp/vfpmodule.c +++ b/trunk/arch/arm/vfp/vfpmodule.c @@ -545,7 +545,7 @@ static int __init vfp_init(void) */ elf_hwcap |= HWCAP_VFP; #ifdef CONFIG_VFPv3 - if (VFP_arch >= 2) { + if (VFP_arch >= 3) { elf_hwcap |= HWCAP_VFPv3; /* diff --git a/trunk/arch/avr32/kernel/process.c b/trunk/arch/avr32/kernel/process.c index 2d76515745a4..93c0342530a0 100644 --- a/trunk/arch/avr32/kernel/process.c +++ b/trunk/arch/avr32/kernel/process.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/avr32/mach-at32ap/at32ap700x.c b/trunk/arch/avr32/mach-at32ap/at32ap700x.c index e67c99945428..3a4bc1a18433 100644 --- a/trunk/arch/avr32/mach-at32ap/at32ap700x.c +++ b/trunk/arch/avr32/mach-at32ap/at32ap700x.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/avr32/mach-at32ap/extint.c b/trunk/arch/avr32/mach-at32ap/extint.c index e9d12058ffd3..310477ba1bbf 100644 --- a/trunk/arch/avr32/mach-at32ap/extint.c +++ b/trunk/arch/avr32/mach-at32ap/extint.c @@ -14,7 +14,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/avr32/mach-at32ap/hsmc.c b/trunk/arch/avr32/mach-at32ap/hsmc.c index f7672d3e86b8..2875c11be95d 100644 --- a/trunk/arch/avr32/mach-at32ap/hsmc.c +++ b/trunk/arch/avr32/mach-at32ap/hsmc.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/avr32/mm/dma-coherent.c b/trunk/arch/avr32/mm/dma-coherent.c index 3c0042247ea9..6d8c794c3b81 100644 --- a/trunk/arch/avr32/mm/dma-coherent.c +++ b/trunk/arch/avr32/mm/dma-coherent.c @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/trunk/arch/avr32/mm/init.c b/trunk/arch/avr32/mm/init.c index a7314d44b17b..94925641e53e 100644 --- a/trunk/arch/avr32/mm/init.c +++ b/trunk/arch/avr32/mm/init.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/avr32/mm/ioremap.c b/trunk/arch/avr32/mm/ioremap.c index 7def0d84cec6..f03b79f0e0ab 100644 --- a/trunk/arch/avr32/mm/ioremap.c +++ b/trunk/arch/avr32/mm/ioremap.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/blackfin/include/asm/mmu_context.h b/trunk/arch/blackfin/include/asm/mmu_context.h index e1a9b4624f91..7f363d7e43a5 100644 --- a/trunk/arch/blackfin/include/asm/mmu_context.h +++ b/trunk/arch/blackfin/include/asm/mmu_context.h @@ -7,7 +7,7 @@ #ifndef __BLACKFIN_MMU_CONTEXT_H__ #define __BLACKFIN_MMU_CONTEXT_H__ -#include +#include #include #include #include diff --git a/trunk/arch/blackfin/kernel/ipipe.c b/trunk/arch/blackfin/kernel/ipipe.c index 1a496cd71ba2..a77307a4473b 100644 --- a/trunk/arch/blackfin/kernel/ipipe.c +++ b/trunk/arch/blackfin/kernel/ipipe.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/blackfin/kernel/process.c b/trunk/arch/blackfin/kernel/process.c index 93ec07da2e51..29705cec91de 100644 --- a/trunk/arch/blackfin/kernel/process.c +++ b/trunk/arch/blackfin/kernel/process.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/blackfin/mach-common/pm.c b/trunk/arch/blackfin/mach-common/pm.c index c1f1ccc846f0..8837be4edb4a 100644 --- a/trunk/arch/blackfin/mach-common/pm.c +++ b/trunk/arch/blackfin/mach-common/pm.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/blackfin/mach-common/smp.c b/trunk/arch/blackfin/mach-common/smp.c index 7cecbaf0358a..7803f22d2ca7 100644 --- a/trunk/arch/blackfin/mach-common/smp.c +++ b/trunk/arch/blackfin/mach-common/smp.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/blackfin/mm/init.c b/trunk/arch/blackfin/mm/init.c index 355b87aa6b93..bb9c98f9cb5b 100644 --- a/trunk/arch/blackfin/mm/init.c +++ b/trunk/arch/blackfin/mm/init.c @@ -4,7 +4,6 @@ * Licensed under the GPL-2 or later. */ -#include #include #include #include diff --git a/trunk/arch/blackfin/mm/isram-driver.c b/trunk/arch/blackfin/mm/isram-driver.c index 39b058564f62..9213e2357888 100644 --- a/trunk/arch/blackfin/mm/isram-driver.c +++ b/trunk/arch/blackfin/mm/isram-driver.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/blackfin/mm/sram-alloc.c b/trunk/arch/blackfin/mm/sram-alloc.c index 49b2ff2c8b74..5732da25ee2d 100644 --- a/trunk/arch/blackfin/mm/sram-alloc.c +++ b/trunk/arch/blackfin/mm/sram-alloc.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include "blackfin_sram.h" diff --git a/trunk/arch/cris/arch-v10/drivers/i2c.c b/trunk/arch/cris/arch-v10/drivers/i2c.c index a8737a8eb229..7f656ae0b21d 100644 --- a/trunk/arch/cris/arch-v10/drivers/i2c.c +++ b/trunk/arch/cris/arch-v10/drivers/i2c.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/cris/arch-v10/drivers/sync_serial.c b/trunk/arch/cris/arch-v10/drivers/sync_serial.c index 109dcd826d17..562b9a7feae7 100644 --- a/trunk/arch/cris/arch-v10/drivers/sync_serial.c +++ b/trunk/arch/cris/arch-v10/drivers/sync_serial.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/cris/arch-v10/kernel/process.c b/trunk/arch/cris/arch-v10/kernel/process.c index 93f0f64b1326..c4c69cf721e5 100644 --- a/trunk/arch/cris/arch-v10/kernel/process.c +++ b/trunk/arch/cris/arch-v10/kernel/process.c @@ -11,9 +11,9 @@ */ #include -#include #include #include +#include #include #include diff --git a/trunk/arch/cris/arch-v32/drivers/i2c.c b/trunk/arch/cris/arch-v32/drivers/i2c.c index 506826399ae7..179e7b804331 100644 --- a/trunk/arch/cris/arch-v32/drivers/i2c.c +++ b/trunk/arch/cris/arch-v32/drivers/i2c.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/cris/arch-v32/drivers/pci/dma.c b/trunk/arch/cris/arch-v32/drivers/pci/dma.c index ee55578d9834..fbe65954ee6c 100644 --- a/trunk/arch/cris/arch-v32/drivers/pci/dma.c +++ b/trunk/arch/cris/arch-v32/drivers/pci/dma.c @@ -13,7 +13,6 @@ #include #include #include -#include #include void *dma_alloc_coherent(struct device *dev, size_t size, diff --git a/trunk/arch/cris/arch-v32/drivers/sync_serial.c b/trunk/arch/cris/arch-v32/drivers/sync_serial.c index 4889f196ecd6..d2a0fbf5341f 100644 --- a/trunk/arch/cris/arch-v32/drivers/sync_serial.c +++ b/trunk/arch/cris/arch-v32/drivers/sync_serial.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/cris/arch-v32/kernel/process.c b/trunk/arch/cris/arch-v32/kernel/process.c index 2661a9529d70..120e7f796fea 100644 --- a/trunk/arch/cris/arch-v32/kernel/process.c +++ b/trunk/arch/cris/arch-v32/kernel/process.c @@ -9,9 +9,9 @@ */ #include -#include #include #include +#include #include #include #include diff --git a/trunk/arch/cris/arch-v32/kernel/signal.c b/trunk/arch/cris/arch-v32/kernel/signal.c index 0b7e3f143281..372d0ca6efbc 100644 --- a/trunk/arch/cris/arch-v32/kernel/signal.c +++ b/trunk/arch/cris/arch-v32/kernel/signal.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/cris/kernel/irq.c b/trunk/arch/cris/kernel/irq.c index 469f7f9d62e0..6d7b9eda4036 100644 --- a/trunk/arch/cris/kernel/irq.c +++ b/trunk/arch/cris/kernel/irq.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/cris/kernel/module.c b/trunk/arch/cris/kernel/module.c index bcd502f74cda..abc13e368b90 100644 --- a/trunk/arch/cris/kernel/module.c +++ b/trunk/arch/cris/kernel/module.c @@ -21,7 +21,6 @@ #include #include #include -#include #if 0 #define DEBUGP printk diff --git a/trunk/arch/cris/kernel/profile.c b/trunk/arch/cris/kernel/profile.c index b917549a7d94..9aa571169bcc 100644 --- a/trunk/arch/cris/kernel/profile.c +++ b/trunk/arch/cris/kernel/profile.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/cris/mm/init.c b/trunk/arch/cris/mm/init.c index df33ab89d70f..ff68b9f516a1 100644 --- a/trunk/arch/cris/mm/init.c +++ b/trunk/arch/cris/mm/init.c @@ -8,7 +8,6 @@ * */ -#include #include #include #include diff --git a/trunk/arch/frv/kernel/irq.c b/trunk/arch/frv/kernel/irq.c index 625136625a7f..62d1aba615dc 100644 --- a/trunk/arch/frv/kernel/irq.c +++ b/trunk/arch/frv/kernel/irq.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/frv/kernel/sysctl.c b/trunk/arch/frv/kernel/sysctl.c index 71abd1510a59..035516cb7a97 100644 --- a/trunk/arch/frv/kernel/sysctl.c +++ b/trunk/arch/frv/kernel/sysctl.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/trunk/arch/frv/mb93090-mb00/pci-dma.c b/trunk/arch/frv/mb93090-mb00/pci-dma.c index 85d110b71cf7..2c912e805162 100644 --- a/trunk/arch/frv/mb93090-mb00/pci-dma.c +++ b/trunk/arch/frv/mb93090-mb00/pci-dma.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/trunk/arch/frv/mb93090-mb00/pci-irq.c b/trunk/arch/frv/mb93090-mb00/pci-irq.c index 20f6497b2cd5..ba587523c015 100644 --- a/trunk/arch/frv/mb93090-mb00/pci-irq.c +++ b/trunk/arch/frv/mb93090-mb00/pci-irq.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/frv/mb93090-mb00/pci-vdk.c b/trunk/arch/frv/mb93090-mb00/pci-vdk.c index f8dd37e49535..c0dcec65c6b7 100644 --- a/trunk/arch/frv/mb93090-mb00/pci-vdk.c +++ b/trunk/arch/frv/mb93090-mb00/pci-vdk.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/frv/mm/dma-alloc.c b/trunk/arch/frv/mm/dma-alloc.c index 7a73aaeae3ac..44840e73e907 100644 --- a/trunk/arch/frv/mm/dma-alloc.c +++ b/trunk/arch/frv/mm/dma-alloc.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/frv/mm/init.c b/trunk/arch/frv/mm/init.c index ed64588ac3a7..0708284f85fb 100644 --- a/trunk/arch/frv/mm/init.c +++ b/trunk/arch/frv/mm/init.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/frv/mm/pgalloc.c b/trunk/arch/frv/mm/pgalloc.c index c42c83d507bc..66f616fb4860 100644 --- a/trunk/arch/frv/mm/pgalloc.c +++ b/trunk/arch/frv/mm/pgalloc.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include #include diff --git a/trunk/arch/h8300/kernel/process.c b/trunk/arch/h8300/kernel/process.c index 8c8b0ffa6ad7..bd883faa983d 100644 --- a/trunk/arch/h8300/kernel/process.c +++ b/trunk/arch/h8300/kernel/process.c @@ -32,11 +32,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/trunk/arch/h8300/mm/init.c b/trunk/arch/h8300/mm/init.c index 7cc3380f250c..9942f24aff9e 100644 --- a/trunk/arch/h8300/mm/init.c +++ b/trunk/arch/h8300/mm/init.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/h8300/mm/kmap.c b/trunk/arch/h8300/mm/kmap.c index 944a502c2e56..5c7af09ae8d1 100644 --- a/trunk/arch/h8300/mm/kmap.c +++ b/trunk/arch/h8300/mm/kmap.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/h8300/mm/memory.c b/trunk/arch/h8300/mm/memory.c index 5552ddfaab5e..40d8aa811e4e 100644 --- a/trunk/arch/h8300/mm/memory.c +++ b/trunk/arch/h8300/mm/memory.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/ia64/include/asm/dmi.h b/trunk/arch/ia64/include/asm/dmi.h index 1ed4c8fedb83..00eb1b130b63 100644 --- a/trunk/arch/ia64/include/asm/dmi.h +++ b/trunk/arch/ia64/include/asm/dmi.h @@ -1,7 +1,6 @@ #ifndef _ASM_DMI_H #define _ASM_DMI_H 1 -#include #include /* Use normal IO mappings for DMI */ diff --git a/trunk/arch/ia64/kernel/acpi-ext.c b/trunk/arch/ia64/kernel/acpi-ext.c index 8b9318d311a0..b7515bc808a8 100644 --- a/trunk/arch/ia64/kernel/acpi-ext.c +++ b/trunk/arch/ia64/kernel/acpi-ext.c @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/ia64/kernel/acpi.c b/trunk/arch/ia64/kernel/acpi.c index 4d1a7e9314cf..f1c9f70b4e45 100644 --- a/trunk/arch/ia64/kernel/acpi.c +++ b/trunk/arch/ia64/kernel/acpi.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/trunk/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index b0b4e6e710f2..7b435451b3dc 100644 --- a/trunk/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/trunk/arch/ia64/kernel/cpufreq/acpi-cpufreq.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/efi.c b/trunk/arch/ia64/kernel/efi.c index a0f001928502..c745d0aeb6e0 100644 --- a/trunk/arch/ia64/kernel/efi.c +++ b/trunk/arch/ia64/kernel/efi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/iosapic.c b/trunk/arch/ia64/kernel/iosapic.c index 7ded76658d2d..95ac77aeae9b 100644 --- a/trunk/arch/ia64/kernel/iosapic.c +++ b/trunk/arch/ia64/kernel/iosapic.c @@ -86,7 +86,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/irq_ia64.c b/trunk/arch/ia64/kernel/irq_ia64.c index 640479304ac0..d4093a173a3e 100644 --- a/trunk/arch/ia64/kernel/irq_ia64.c +++ b/trunk/arch/ia64/kernel/irq_ia64.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include /* for rand_initialize_irq() */ #include diff --git a/trunk/arch/ia64/kernel/mca.c b/trunk/arch/ia64/kernel/mca.c index a0220dc5ff42..378b4833024f 100644 --- a/trunk/arch/ia64/kernel/mca.c +++ b/trunk/arch/ia64/kernel/mca.c @@ -85,7 +85,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/ia64/kernel/mca_drv.c b/trunk/arch/ia64/kernel/mca_drv.c index 09b4d6828c45..f94aaa86933f 100644 --- a/trunk/arch/ia64/kernel/mca_drv.c +++ b/trunk/arch/ia64/kernel/mca_drv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/ia64/kernel/pci-swiotlb.c b/trunk/arch/ia64/kernel/pci-swiotlb.c index 3095654f9ab3..53292abf846c 100644 --- a/trunk/arch/ia64/kernel/pci-swiotlb.c +++ b/trunk/arch/ia64/kernel/pci-swiotlb.c @@ -1,7 +1,6 @@ /* Glue code to lib/swiotlb.c */ #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/perfmon.c b/trunk/arch/ia64/kernel/perfmon.c index ab985f785c14..703062c44fb9 100644 --- a/trunk/arch/ia64/kernel/perfmon.c +++ b/trunk/arch/ia64/kernel/perfmon.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/ia64/kernel/process.c b/trunk/arch/ia64/kernel/process.c index 53f1648c8b81..d92765cae10a 100644 --- a/trunk/arch/ia64/kernel/process.c +++ b/trunk/arch/ia64/kernel/process.c @@ -15,11 +15,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/trunk/arch/ia64/kernel/ptrace.c b/trunk/arch/ia64/kernel/ptrace.c index 0dec7f702448..b61afbbe076f 100644 --- a/trunk/arch/ia64/kernel/ptrace.c +++ b/trunk/arch/ia64/kernel/ptrace.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/trunk/arch/ia64/kernel/topology.c b/trunk/arch/ia64/kernel/topology.c index 28f299de2903..b3a5818088d9 100644 --- a/trunk/arch/ia64/kernel/topology.c +++ b/trunk/arch/ia64/kernel/topology.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/kernel/uncached.c b/trunk/arch/ia64/kernel/uncached.c index c4696d217ce0..a595823582d9 100644 --- a/trunk/arch/ia64/kernel/uncached.c +++ b/trunk/arch/ia64/kernel/uncached.c @@ -18,9 +18,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/kvm/kvm-ia64.c b/trunk/arch/ia64/kvm/kvm-ia64.c index 73c5c2b05f64..26e0e089bfe7 100644 --- a/trunk/arch/ia64/kvm/kvm-ia64.c +++ b/trunk/arch/ia64/kvm/kvm-ia64.c @@ -23,8 +23,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c index 61620323bb60..8d586d1e2515 100644 --- a/trunk/arch/ia64/mm/discontig.c +++ b/trunk/arch/ia64/mm/discontig.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/mm/hugetlbpage.c b/trunk/arch/ia64/mm/hugetlbpage.c index 1841ee7e65f9..b0f615759e97 100644 --- a/trunk/arch/ia64/mm/hugetlbpage.c +++ b/trunk/arch/ia64/mm/hugetlbpage.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/ia64/mm/tlb.c b/trunk/arch/ia64/mm/tlb.c index 5dfd916e9ea6..f3de9d7a98b4 100644 --- a/trunk/arch/ia64/mm/tlb.c +++ b/trunk/arch/ia64/mm/tlb.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/ia64/sn/kernel/bte.c b/trunk/arch/ia64/sn/kernel/bte.c index cad775a1a157..c6d6b62db66c 100644 --- a/trunk/arch/ia64/sn/kernel/bte.c +++ b/trunk/arch/ia64/sn/kernel/bte.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/ia64/sn/kernel/io_acpi_init.c b/trunk/arch/ia64/sn/kernel/io_acpi_init.c index 8cdcb173a138..66f633bff059 100644 --- a/trunk/arch/ia64/sn/kernel/io_acpi_init.c +++ b/trunk/arch/ia64/sn/kernel/io_acpi_init.c @@ -13,7 +13,6 @@ #include #include "xtalk/hubdev.h" #include -#include /* diff --git a/trunk/arch/ia64/sn/kernel/io_common.c b/trunk/arch/ia64/sn/kernel/io_common.c index 4433dd019d3c..308e6595110e 100644 --- a/trunk/arch/ia64/sn/kernel/io_common.c +++ b/trunk/arch/ia64/sn/kernel/io_common.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/ia64/sn/kernel/io_init.c b/trunk/arch/ia64/sn/kernel/io_init.c index 98079f29d9a9..ee774c366a06 100644 --- a/trunk/arch/ia64/sn/kernel/io_init.c +++ b/trunk/arch/ia64/sn/kernel/io_init.c @@ -6,7 +6,6 @@ * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. */ -#include #include #include #include diff --git a/trunk/arch/ia64/sn/kernel/irq.c b/trunk/arch/ia64/sn/kernel/irq.c index 13c15d968098..40d6eeda1c4b 100644 --- a/trunk/arch/ia64/sn/kernel/irq.c +++ b/trunk/arch/ia64/sn/kernel/irq.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/sn/kernel/msi_sn.c b/trunk/arch/ia64/sn/kernel/msi_sn.c index ebfdd6a9ae1a..fbbfb9701201 100644 --- a/trunk/arch/ia64/sn/kernel/msi_sn.c +++ b/trunk/arch/ia64/sn/kernel/msi_sn.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/ia64/sn/pci/pci_dma.c b/trunk/arch/ia64/sn/pci/pci_dma.c index a9d310de57da..98b684928e12 100644 --- a/trunk/arch/ia64/sn/pci/pci_dma.c +++ b/trunk/arch/ia64/sn/pci/pci_dma.c @@ -9,7 +9,6 @@ * a description of how these routines should be used. */ -#include #include #include #include diff --git a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 3cb5cf377644..d13e5a22a558 100644 --- a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/sn/pci/tioca_provider.c b/trunk/arch/ia64/sn/pci/tioca_provider.c index 4d4536e3b6f3..efb454534e52 100644 --- a/trunk/arch/ia64/sn/pci/tioca_provider.c +++ b/trunk/arch/ia64/sn/pci/tioca_provider.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/sn/pci/tioce_provider.c b/trunk/arch/ia64/sn/pci/tioce_provider.c index 27faba035f3a..012f3b82ee55 100644 --- a/trunk/arch/ia64/sn/pci/tioce_provider.c +++ b/trunk/arch/ia64/sn/pci/tioce_provider.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/ia64/xen/grant-table.c b/trunk/arch/ia64/xen/grant-table.c index 48cca37625eb..777dd9a9108b 100644 --- a/trunk/arch/ia64/xen/grant-table.c +++ b/trunk/arch/ia64/xen/grant-table.c @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/m32r/kernel/process.c b/trunk/arch/m32r/kernel/process.c index bc8c8c1511b2..67a01e1e4283 100644 --- a/trunk/arch/m32r/kernel/process.c +++ b/trunk/arch/m32r/kernel/process.c @@ -21,10 +21,10 @@ */ #include -#include #include #include #include +#include #include #include diff --git a/trunk/arch/m32r/mm/init.c b/trunk/arch/m32r/mm/init.c index 73e2205ebf5a..9f581df3952b 100644 --- a/trunk/arch/m32r/mm/init.c +++ b/trunk/arch/m32r/mm/init.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/m68k/bvme6000/rtc.c b/trunk/arch/m68k/bvme6000/rtc.c index b46ea1714a89..c50bec8aabb1 100644 --- a/trunk/arch/m68k/bvme6000/rtc.c +++ b/trunk/arch/m68k/bvme6000/rtc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/m68k/kernel/dma.c b/trunk/arch/m68k/kernel/dma.c index 4bbb3c2a8880..2bb4245404d8 100644 --- a/trunk/arch/m68k/kernel/dma.c +++ b/trunk/arch/m68k/kernel/dma.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/m68k/kernel/process.c b/trunk/arch/m68k/kernel/process.c index 1a6be27cf165..17c3f325255d 100644 --- a/trunk/arch/m68k/kernel/process.c +++ b/trunk/arch/m68k/kernel/process.c @@ -15,13 +15,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include #include diff --git a/trunk/arch/m68k/mac/misc.c b/trunk/arch/m68k/mac/misc.c index 0f118ca156d9..5d818568b343 100644 --- a/trunk/arch/m68k/mac/misc.c +++ b/trunk/arch/m68k/mac/misc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/m68k/mm/init.c b/trunk/arch/m68k/mm/init.c index 8bc842554e5b..774549accd2d 100644 --- a/trunk/arch/m68k/mm/init.c +++ b/trunk/arch/m68k/mm/init.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/m68k/mm/memory.c b/trunk/arch/m68k/mm/memory.c index 34c77ce24fba..b7473525b431 100644 --- a/trunk/arch/m68k/mm/memory.c +++ b/trunk/arch/m68k/mm/memory.c @@ -9,9 +9,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/trunk/arch/m68k/mm/motorola.c b/trunk/arch/m68k/mm/motorola.c index 02b7a03e4226..4665fc84b7dc 100644 --- a/trunk/arch/m68k/mm/motorola.c +++ b/trunk/arch/m68k/mm/motorola.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/m68k/mvme16x/rtc.c b/trunk/arch/m68k/mvme16x/rtc.c index 8da9c250d3e1..cea5e3e4e636 100644 --- a/trunk/arch/m68k/mvme16x/rtc.c +++ b/trunk/arch/m68k/mvme16x/rtc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/m68k/sun3/sun3dvma.c b/trunk/arch/m68k/sun3/sun3dvma.c index ca0966cac72a..f9277e8b4159 100644 --- a/trunk/arch/m68k/sun3/sun3dvma.c +++ b/trunk/arch/m68k/sun3/sun3dvma.c @@ -8,7 +8,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/m68k/sun3x/dvma.c b/trunk/arch/m68k/sun3x/dvma.c index d5ddcdaa2347..117481e86305 100644 --- a/trunk/arch/m68k/sun3x/dvma.c +++ b/trunk/arch/m68k/sun3x/dvma.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/m68knommu/kernel/dma.c b/trunk/arch/m68knommu/kernel/dma.c index fc61541aeb71..aaf38bbbb6cd 100644 --- a/trunk/arch/m68knommu/kernel/dma.c +++ b/trunk/arch/m68knommu/kernel/dma.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/m68knommu/kernel/process.c b/trunk/arch/m68knommu/kernel/process.c index 6aa66134b433..959cb249c759 100644 --- a/trunk/arch/m68knommu/kernel/process.c +++ b/trunk/arch/m68knommu/kernel/process.c @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/trunk/arch/m68knommu/mm/init.c b/trunk/arch/m68knommu/mm/init.c index 8a6653f56bd8..f3236d0b522d 100644 --- a/trunk/arch/m68knommu/mm/init.c +++ b/trunk/arch/m68knommu/mm/init.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/m68knommu/mm/kmap.c b/trunk/arch/m68knommu/mm/kmap.c index 902c1dfda9e5..bc32f38843f0 100644 --- a/trunk/arch/m68knommu/mm/kmap.c +++ b/trunk/arch/m68knommu/mm/kmap.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/m68knommu/mm/memory.c b/trunk/arch/m68knommu/mm/memory.c index 8f7949e786d4..d5b9e1357808 100644 --- a/trunk/arch/m68knommu/mm/memory.c +++ b/trunk/arch/m68knommu/mm/memory.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/microblaze/Kconfig b/trunk/arch/microblaze/Kconfig index 76818f926539..203ec61c6d4c 100644 --- a/trunk/arch/microblaze/Kconfig +++ b/trunk/arch/microblaze/Kconfig @@ -75,6 +75,9 @@ config LOCKDEP_SUPPORT config HAVE_LATENCYTOP_SUPPORT def_bool y +config PCI + def_bool n + config DTC def_bool y diff --git a/trunk/arch/microblaze/Makefile b/trunk/arch/microblaze/Makefile index 72f6e8583746..836832dd9b26 100644 --- a/trunk/arch/microblaze/Makefile +++ b/trunk/arch/microblaze/Makefile @@ -84,7 +84,7 @@ define archhelp echo '* linux.bin - Create raw binary' echo ' linux.bin.gz - Create compressed raw binary' echo ' simpleImage.
- ELF image with $(arch)/boot/dts/
.dts linked in' - echo ' - stripped elf with fdt blob' + echo ' - stripped elf with fdt blob echo ' simpleImage.
.unstrip - full ELF image with fdt blob' echo ' *_defconfig - Select default config from arch/microblaze/configs' echo '' @@ -94,5 +94,3 @@ define archhelp echo ' name of a dts file from the arch/microblaze/boot/dts/ directory' echo ' (minus the .dts extension).' endef - -MRPROPER_FILES += $(boot)/simpleImage.* diff --git a/trunk/arch/microblaze/boot/Makefile b/trunk/arch/microblaze/boot/Makefile index 57f50c2371c6..902cf9846c3c 100644 --- a/trunk/arch/microblaze/boot/Makefile +++ b/trunk/arch/microblaze/boot/Makefile @@ -23,6 +23,8 @@ $(obj)/system.dtb: $(obj)/$(DTB).dtb endif $(obj)/linux.bin: vmlinux FORCE + [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ + touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" $(call if_changed,objcopy) $(call if_changed,uimage) @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' @@ -60,4 +62,6 @@ quiet_cmd_dtc = DTC $@ $(obj)/%.dtb: $(dtstree)/%.dts FORCE $(call if_changed,dtc) -clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub +clean-kernel += linux.bin linux.bin.gz simpleImage.* + +clean-files += *.dtb simpleImage.*.unstrip diff --git a/trunk/arch/microblaze/include/asm/processor.h b/trunk/arch/microblaze/include/asm/processor.h index 8eeb09211ece..563c6b9453f0 100644 --- a/trunk/arch/microblaze/include/asm/processor.h +++ b/trunk/arch/microblaze/include/asm/processor.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/microblaze/include/asm/segment.h b/trunk/arch/microblaze/include/asm/segment.h new file mode 100644 index 000000000000..0e7102c3fb11 --- /dev/null +++ b/trunk/arch/microblaze/include/asm/segment.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2008-2009 Michal Simek + * Copyright (C) 2008-2009 PetaLogix + * Copyright (C) 2006 Atmark Techno, Inc. + * + * 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 _ASM_MICROBLAZE_SEGMENT_H +#define _ASM_MICROBLAZE_SEGMENT_H + +# ifndef __ASSEMBLY__ + +typedef struct { + unsigned long seg; +} mm_segment_t; + +/* + * On Microblaze the fs value is actually the top of the corresponding + * address space. + * + * The fs value determines whether argument validity checking should be + * performed or not. If get_fs() == USER_DS, checking is performed, with + * get_fs() == KERNEL_DS, checking is bypassed. + * + * For historical reasons, these macros are grossly misnamed. + * + * For non-MMU arch like Microblaze, KERNEL_DS and USER_DS is equal. + */ +# define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) + +# ifndef CONFIG_MMU +# define KERNEL_DS MAKE_MM_SEG(0) +# define USER_DS KERNEL_DS +# else +# define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) +# define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) +# endif + +# define get_ds() (KERNEL_DS) +# define get_fs() (current_thread_info()->addr_limit) +# define set_fs(val) (current_thread_info()->addr_limit = (val)) + +# define segment_eq(a, b) ((a).seg == (b).seg) + +# endif /* __ASSEMBLY__ */ +#endif /* _ASM_MICROBLAZE_SEGMENT_H */ diff --git a/trunk/arch/microblaze/include/asm/thread_info.h b/trunk/arch/microblaze/include/asm/thread_info.h index b2ca80f64640..6e92885d381a 100644 --- a/trunk/arch/microblaze/include/asm/thread_info.h +++ b/trunk/arch/microblaze/include/asm/thread_info.h @@ -19,6 +19,7 @@ #ifndef __ASSEMBLY__ # include # include +# include /* * low level task data that entry.S needs immediate access to @@ -59,10 +60,6 @@ struct cpu_context { __u32 fsr; }; -typedef struct { - unsigned long seg; -} mm_segment_t; - struct thread_info { struct task_struct *task; /* main task structure */ struct exec_domain *exec_domain; /* execution domain */ diff --git a/trunk/arch/microblaze/include/asm/tlbflush.h b/trunk/arch/microblaze/include/asm/tlbflush.h index 2e1353c2d18d..bcb8b41d55af 100644 --- a/trunk/arch/microblaze/include/asm/tlbflush.h +++ b/trunk/arch/microblaze/include/asm/tlbflush.h @@ -24,7 +24,6 @@ extern void _tlbie(unsigned long address); extern void _tlbia(void); #define __tlbia() { preempt_disable(); _tlbia(); preempt_enable(); } -#define __tlbie(x) { _tlbie(x); } static inline void local_flush_tlb_all(void) { __tlbia(); } @@ -32,7 +31,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) { __tlbia(); } static inline void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) - { __tlbie(vmaddr); } + { _tlbie(vmaddr); } static inline void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { __tlbia(); } diff --git a/trunk/arch/microblaze/include/asm/uaccess.h b/trunk/arch/microblaze/include/asm/uaccess.h index 446bec29b142..371bd6e56d9a 100644 --- a/trunk/arch/microblaze/include/asm/uaccess.h +++ b/trunk/arch/microblaze/include/asm/uaccess.h @@ -22,73 +22,101 @@ #include #include #include +#include #include #define VERIFY_READ 0 #define VERIFY_WRITE 1 -/* - * On Microblaze the fs value is actually the top of the corresponding - * address space. - * - * The fs value determines whether argument validity checking should be - * performed or not. If get_fs() == USER_DS, checking is performed, with - * get_fs() == KERNEL_DS, checking is bypassed. - * - * For historical reasons, these macros are grossly misnamed. - * - * For non-MMU arch like Microblaze, KERNEL_DS and USER_DS is equal. - */ -# define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) +#define __clear_user(addr, n) (memset((void *)(addr), 0, (n)), 0) -# ifndef CONFIG_MMU -# define KERNEL_DS MAKE_MM_SEG(0) -# define USER_DS KERNEL_DS -# else -# define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) -# define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) -# endif +#ifndef CONFIG_MMU -# define get_ds() (KERNEL_DS) -# define get_fs() (current_thread_info()->addr_limit) -# define set_fs(val) (current_thread_info()->addr_limit = (val)) +extern int ___range_ok(unsigned long addr, unsigned long size); -# define segment_eq(a, b) ((a).seg == (b).seg) +#define __range_ok(addr, size) \ + ___range_ok((unsigned long)(addr), (unsigned long)(size)) -/* - * The exception table consists of pairs of addresses: the first is the - * address of an instruction that is allowed to fault, and the second is - * the address at which the program should continue. No registers are - * modified, so it is entirely up to the continuation code to figure out - * what to do. - * - * All the routines below use bits of fixup code that are out of line - * with the main instruction path. This means when everything is well, - * we don't even have to jump over them. Further, they do not intrude - * on our cache or tlb entries. - */ -struct exception_table_entry { - unsigned long insn, fixup; -}; +#define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0) +#define __access_ok(add, size) (__range_ok((addr), (size)) == 0) + +/* Undefined function to trigger linker error */ +extern int bad_user_access_length(void); + +/* FIXME this is function for optimalization -> memcpy */ +#define __get_user(var, ptr) \ +({ \ + int __gu_err = 0; \ + switch (sizeof(*(ptr))) { \ + case 1: \ + case 2: \ + case 4: \ + (var) = *(ptr); \ + break; \ + case 8: \ + memcpy((void *) &(var), (ptr), 8); \ + break; \ + default: \ + (var) = 0; \ + __gu_err = __get_user_bad(); \ + break; \ + } \ + __gu_err; \ +}) -/* Returns 0 if exception not found and fixup otherwise. */ -extern unsigned long search_exception_table(unsigned long); +#define __get_user_bad() (bad_user_access_length(), (-EFAULT)) -#ifndef CONFIG_MMU +/* FIXME is not there defined __pu_val */ +#define __put_user(var, ptr) \ +({ \ + int __pu_err = 0; \ + switch (sizeof(*(ptr))) { \ + case 1: \ + case 2: \ + case 4: \ + *(ptr) = (var); \ + break; \ + case 8: { \ + typeof(*(ptr)) __pu_val = (var); \ + memcpy(ptr, &__pu_val, sizeof(__pu_val)); \ + } \ + break; \ + default: \ + __pu_err = __put_user_bad(); \ + break; \ + } \ + __pu_err; \ +}) + +#define __put_user_bad() (bad_user_access_length(), (-EFAULT)) + +#define put_user(x, ptr) __put_user((x), (ptr)) +#define get_user(x, ptr) __get_user((x), (ptr)) + +#define copy_to_user(to, from, n) (memcpy((to), (from), (n)), 0) +#define copy_from_user(to, from, n) (memcpy((to), (from), (n)), 0) + +#define __copy_to_user(to, from, n) (copy_to_user((to), (from), (n))) +#define __copy_from_user(to, from, n) (copy_from_user((to), (from), (n))) +#define __copy_to_user_inatomic(to, from, n) \ + (__copy_to_user((to), (from), (n))) +#define __copy_from_user_inatomic(to, from, n) \ + (__copy_from_user((to), (from), (n))) -/* Check against bounds of physical memory */ -static inline int ___range_ok(unsigned long addr, unsigned long size) +static inline unsigned long clear_user(void *addr, unsigned long size) { - return ((addr < memory_start) || - ((addr + size) > memory_end)); + if (access_ok(VERIFY_WRITE, addr, size)) + size = __clear_user(addr, size); + return size; } -#define __range_ok(addr, size) \ - ___range_ok((unsigned long)(addr), (unsigned long)(size)) +/* Returns 0 if exception not found and fixup otherwise. */ +extern unsigned long search_exception_table(unsigned long); -#define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0) +extern long strncpy_from_user(char *dst, const char *src, long count); +extern long strnlen_user(const char *src, long count); -#else +#else /* CONFIG_MMU */ /* * Address is valid if: @@ -101,87 +129,23 @@ static inline int ___range_ok(unsigned long addr, unsigned long size) /* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n", type?"WRITE":"READ",addr,size,get_fs().seg)) */ -#endif - -#ifdef CONFIG_MMU -# define __FIXUP_SECTION ".section .fixup,\"ax\"\n" -# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" -#else -# define __FIXUP_SECTION ".section .discard,\"ax\"\n" -# define __EX_TABLE_SECTION ".section .discard,\"a\"\n" -#endif - -extern unsigned long __copy_tofrom_user(void __user *to, - const void __user *from, unsigned long size); - -/* Return: number of not copied bytes, i.e. 0 if OK or non-zero if fail. */ -static inline unsigned long __must_check __clear_user(void __user *to, - unsigned long n) -{ - /* normal memset with two words to __ex_table */ - __asm__ __volatile__ ( \ - "1: sb r0, %2, r0;" \ - " addik %0, %0, -1;" \ - " bneid %0, 1b;" \ - " addik %2, %2, 1;" \ - "2: " \ - __EX_TABLE_SECTION \ - ".word 1b,2b;" \ - ".previous;" \ - : "=r"(n) \ - : "0"(n), "r"(to) - ); - return n; -} - -static inline unsigned long __must_check clear_user(void __user *to, - unsigned long n) -{ - might_sleep(); - if (unlikely(!access_ok(VERIFY_WRITE, to, n))) - return n; - - return __clear_user(to, n); -} - -/* put_user and get_user macros */ -extern long __user_bad(void); +/* + * All the __XXX versions macros/functions below do not perform + * access checking. It is assumed that the necessary checks have been + * already performed before the finction (macro) is called. + */ -#define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ -({ \ - __asm__ __volatile__ ( \ - "1:" insn " %1, %2, r0;" \ - " addk %0, r0, r0;" \ - "2: " \ - __FIXUP_SECTION \ - "3: brid 2b;" \ - " addik %0, r0, %3;" \ - ".previous;" \ - __EX_TABLE_SECTION \ - ".word 1b,3b;" \ - ".previous;" \ - : "=&r"(__gu_err), "=r"(__gu_val) \ - : "r"(__gu_ptr), "i"(-EFAULT) \ - ); \ +#define get_user(x, ptr) \ +({ \ + access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ + ? __get_user((x), (ptr)) : -EFAULT; \ }) -/** - * get_user: - Get a simple variable from user space. - * @x: Variable to store result. - * @ptr: Source address, in user space. - * - * Context: User context only. This function may sleep. - * - * This macro copies a single simple variable from user space to kernel - * space. It supports simple types like char and int, but not larger - * data types like structures or arrays. - * - * @ptr must have pointer-to-simple-variable type, and the result of - * dereferencing @ptr must be assignable to @x without a cast. - * - * Returns zero on success, or -EFAULT on error. - * On error, the variable @x is set to zero. - */ +#define put_user(x, ptr) \ +({ \ + access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ + ? __put_user((x), (ptr)) : -EFAULT; \ +}) #define __get_user(x, ptr) \ ({ \ @@ -199,74 +163,30 @@ extern long __user_bad(void); __get_user_asm("lw", (ptr), __gu_val, __gu_err); \ break; \ default: \ - /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\ + __gu_val = 0; __gu_err = -EINVAL; \ } \ x = (__typeof__(*(ptr))) __gu_val; \ __gu_err; \ }) - -#define get_user(x, ptr) \ +#define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ ({ \ - access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ - ? __get_user((x), (ptr)) : -EFAULT; \ -}) - -#define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ -({ \ - __asm__ __volatile__ ( \ - "1:" insn " %1, %2, r0;" \ - " addk %0, r0, r0;" \ - "2: " \ - __FIXUP_SECTION \ - "3: brid 2b;" \ - " addik %0, r0, %3;" \ - ".previous;" \ - __EX_TABLE_SECTION \ - ".word 1b,3b;" \ - ".previous;" \ - : "=&r"(__gu_err) \ - : "r"(__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ - ); \ + __asm__ __volatile__ ( \ + "1:" insn " %1, %2, r0; \ + addk %0, r0, r0; \ + 2: \ + .section .fixup,\"ax\"; \ + 3: brid 2b; \ + addik %0, r0, %3; \ + .previous; \ + .section __ex_table,\"a\"; \ + .word 1b,3b; \ + .previous;" \ + : "=r"(__gu_err), "=r"(__gu_val) \ + : "r"(__gu_ptr), "i"(-EFAULT) \ + ); \ }) -#define __put_user_asm_8(__gu_ptr, __gu_val, __gu_err) \ -({ \ - __asm__ __volatile__ (" lwi %0, %1, 0;" \ - "1: swi %0, %2, 0;" \ - " lwi %0, %1, 4;" \ - "2: swi %0, %2, 4;" \ - " addk %0, r0, r0;" \ - "3: " \ - __FIXUP_SECTION \ - "4: brid 3b;" \ - " addik %0, r0, %3;" \ - ".previous;" \ - __EX_TABLE_SECTION \ - ".word 1b,4b,2b,4b;" \ - ".previous;" \ - : "=&r"(__gu_err) \ - : "r"(&__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ - ); \ -}) - -/** - * put_user: - Write a simple value into user space. - * @x: Value to copy to user space. - * @ptr: Destination address, in user space. - * - * Context: User context only. This function may sleep. - * - * This macro copies a single simple value from kernel space to user - * space. It supports simple types like char and int, but not larger - * data types like structures or arrays. - * - * @ptr must have pointer-to-simple-variable type, and @x must be assignable - * to the result of dereferencing @ptr. - * - * Returns zero on success, or -EFAULT on error. - */ - #define __put_user(x, ptr) \ ({ \ __typeof__(*(ptr)) volatile __gu_val = (x); \ @@ -275,7 +195,7 @@ extern long __user_bad(void); case 1: \ __put_user_asm("sb", (ptr), __gu_val, __gu_err); \ break; \ - case 2: \ + case 2: \ __put_user_asm("sh", (ptr), __gu_val, __gu_err); \ break; \ case 4: \ @@ -285,82 +205,121 @@ extern long __user_bad(void); __put_user_asm_8((ptr), __gu_val, __gu_err); \ break; \ default: \ - /*__gu_err = -EINVAL;*/ __gu_err = __user_bad(); \ + __gu_err = -EINVAL; \ } \ __gu_err; \ }) -#ifndef CONFIG_MMU - -#define put_user(x, ptr) __put_user((x), (ptr)) - -#else /* CONFIG_MMU */ +#define __put_user_asm_8(__gu_ptr, __gu_val, __gu_err) \ +({ \ +__asm__ __volatile__ (" lwi %0, %1, 0; \ + 1: swi %0, %2, 0; \ + lwi %0, %1, 4; \ + 2: swi %0, %2, 4; \ + addk %0,r0,r0; \ + 3: \ + .section .fixup,\"ax\"; \ + 4: brid 3b; \ + addik %0, r0, %3; \ + .previous; \ + .section __ex_table,\"a\"; \ + .word 1b,4b,2b,4b; \ + .previous;" \ + : "=&r"(__gu_err) \ + : "r"(&__gu_val), \ + "r"(__gu_ptr), "i"(-EFAULT) \ + ); \ +}) -#define put_user(x, ptr) \ -({ \ - access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ - ? __put_user((x), (ptr)) : -EFAULT; \ +#define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ +({ \ + __asm__ __volatile__ ( \ + "1:" insn " %1, %2, r0; \ + addk %0, r0, r0; \ + 2: \ + .section .fixup,\"ax\"; \ + 3: brid 2b; \ + addik %0, r0, %3; \ + .previous; \ + .section __ex_table,\"a\"; \ + .word 1b,3b; \ + .previous;" \ + : "=r"(__gu_err) \ + : "r"(__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ + ); \ }) -#endif /* CONFIG_MMU */ -/* copy_to_from_user */ -#define __copy_from_user(to, from, n) \ - __copy_tofrom_user((__force void __user *)(to), \ - (void __user *)(from), (n)) +/* + * Return: number of not copied bytes, i.e. 0 if OK or non-zero if fail. + */ +static inline int clear_user(char *to, int size) +{ + if (size && access_ok(VERIFY_WRITE, to, size)) { + __asm__ __volatile__ (" \ + 1: \ + sb r0, %2, r0; \ + addik %0, %0, -1; \ + bneid %0, 1b; \ + addik %2, %2, 1; \ + 2: \ + .section __ex_table,\"a\"; \ + .word 1b,2b; \ + .section .text;" \ + : "=r"(size) \ + : "0"(size), "r"(to) + ); + } + return size; +} + +#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n)) #define __copy_from_user_inatomic(to, from, n) \ copy_from_user((to), (from), (n)) -static inline long copy_from_user(void *to, - const void __user *from, unsigned long n) -{ - might_sleep(); - if (access_ok(VERIFY_READ, from, n)) - return __copy_from_user(to, from, n); - return n; -} +#define copy_to_user(to, from, n) \ + (access_ok(VERIFY_WRITE, (to), (n)) ? \ + __copy_tofrom_user((void __user *)(to), \ + (__force const void __user *)(from), (n)) \ + : -EFAULT) -#define __copy_to_user(to, from, n) \ - __copy_tofrom_user((void __user *)(to), \ - (__force const void __user *)(from), (n)) +#define __copy_to_user(to, from, n) copy_to_user((to), (from), (n)) #define __copy_to_user_inatomic(to, from, n) copy_to_user((to), (from), (n)) -static inline long copy_to_user(void __user *to, - const void *from, unsigned long n) -{ - might_sleep(); - if (access_ok(VERIFY_WRITE, to, n)) - return __copy_to_user(to, from, n); - return n; -} +#define copy_from_user(to, from, n) \ + (access_ok(VERIFY_READ, (from), (n)) ? \ + __copy_tofrom_user((__force void __user *)(to), \ + (void __user *)(from), (n)) \ + : -EFAULT) -/* - * Copy a null terminated string from userspace. - */ extern int __strncpy_user(char *to, const char __user *from, int len); +extern int __strnlen_user(const char __user *sstr, int len); -#define __strncpy_from_user __strncpy_user +#define strncpy_from_user(to, from, len) \ + (access_ok(VERIFY_READ, from, 1) ? \ + __strncpy_user(to, from, len) : -EFAULT) +#define strnlen_user(str, len) \ + (access_ok(VERIFY_READ, str, 1) ? __strnlen_user(str, len) : 0) -static inline long -strncpy_from_user(char *dst, const char __user *src, long count) -{ - if (!access_ok(VERIFY_READ, src, 1)) - return -EFAULT; - return __strncpy_from_user(dst, src, count); -} +#endif /* CONFIG_MMU */ + +extern unsigned long __copy_tofrom_user(void __user *to, + const void __user *from, unsigned long size); /* - * Return the size of a string (including the ending 0) + * The exception table consists of pairs of addresses: the first is the + * address of an instruction that is allowed to fault, and the second is + * the address at which the program should continue. No registers are + * modified, so it is entirely up to the continuation code to figure out + * what to do. * - * Return 0 on exception, a value greater than N if too long + * All the routines below use bits of fixup code that are out of line + * with the main instruction path. This means when everything is well, + * we don't even have to jump over them. Further, they do not intrude + * on our cache or tlb entries. */ -extern int __strnlen_user(const char __user *sstr, int len); - -static inline long strnlen_user(const char __user *src, long n) -{ - if (!access_ok(VERIFY_READ, src, 1)) - return 0; - return __strnlen_user(src, n); -} +struct exception_table_entry { + unsigned long insn, fixup; +}; #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ diff --git a/trunk/arch/microblaze/kernel/cpu/cpuinfo.c b/trunk/arch/microblaze/kernel/cpu/cpuinfo.c index 255ef880351e..991d71311b0e 100644 --- a/trunk/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/trunk/arch/microblaze/kernel/cpu/cpuinfo.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/trunk/arch/microblaze/kernel/dma.c b/trunk/arch/microblaze/kernel/dma.c index ce72dd4967cf..b1084974fccd 100644 --- a/trunk/arch/microblaze/kernel/dma.c +++ b/trunk/arch/microblaze/kernel/dma.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -38,7 +37,7 @@ static inline void __dma_sync_page(unsigned long paddr, unsigned long offset, static unsigned long get_dma_direct_offset(struct device *dev) { - if (likely(dev)) + if (dev) return (unsigned long)dev->archdata.dma_data; return PCI_DRAM_OFFSET; /* FIXME Not sure if is correct */ diff --git a/trunk/arch/microblaze/kernel/head.S b/trunk/arch/microblaze/kernel/head.S index da6a5f5dc766..cb7815cfe5ab 100644 --- a/trunk/arch/microblaze/kernel/head.S +++ b/trunk/arch/microblaze/kernel/head.S @@ -51,12 +51,6 @@ swapper_pg_dir: .text ENTRY(_start) -#if CONFIG_KERNEL_BASE_ADDR == 0 - brai TOPHYS(real_start) - .org 0x100 -real_start: -#endif - mfs r1, rmsr andi r1, r1, ~2 mts rmsr, r1 @@ -105,8 +99,8 @@ no_fdt_arg: tophys(r4,r4) /* convert to phys address */ ori r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */ _copy_command_line: - lbu r2, r5, r6 /* r2=r5+r6 - r5 contain pointer to command line */ - sb r2, r4, r6 /* addr[r4+r6]= r2*/ + lbu r2, r5, r6 /* r7=r5+r6 - r5 contain pointer to command line */ + sb r2, r4, r6 /* addr[r4+r6]= r7*/ addik r6, r6, 1 /* increment counting */ bgtid r3, _copy_command_line /* loop for all entries */ addik r3, r3, -1 /* descrement loop */ @@ -134,7 +128,7 @@ _copy_bram: * virtual to physical. */ nop - addik r3, r0, MICROBLAZE_TLB_SIZE -1 /* Invalidate all TLB entries */ + addik r3, r0, 63 /* Invalidate all TLB entries */ _invalidate: mts rtlbx, r3 mts rtlbhi, r0 /* flush: ensure V is clear */ diff --git a/trunk/arch/microblaze/kernel/hw_exception_handler.S b/trunk/arch/microblaze/kernel/hw_exception_handler.S index 995a2123635b..2b86c03aa841 100644 --- a/trunk/arch/microblaze/kernel/hw_exception_handler.S +++ b/trunk/arch/microblaze/kernel/hw_exception_handler.S @@ -313,13 +313,13 @@ _hw_exception_handler: mfs r5, rmsr; nop swi r5, r1, 0; - mfs r4, resr + mfs r3, resr nop - mfs r3, rear; + mfs r4, rear; nop #ifndef CONFIG_MMU - andi r5, r4, 0x1000; /* Check ESR[DS] */ + andi r5, r3, 0x1000; /* Check ESR[DS] */ beqi r5, not_in_delay_slot; /* Branch if ESR[DS] not set */ mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ nop @@ -327,14 +327,13 @@ not_in_delay_slot: swi r17, r1, PT_R17 #endif - andi r5, r4, 0x1F; /* Extract ESR[EXC] */ + andi r5, r3, 0x1F; /* Extract ESR[EXC] */ #ifdef CONFIG_MMU /* Calculate exception vector offset = r5 << 2 */ addk r6, r5, r5; /* << 1 */ addk r6, r6, r6; /* << 2 */ -#ifdef DEBUG /* counting which exception happen */ lwi r5, r0, 0x200 + TOPHYS(r0_ram) addi r5, r5, 1 @@ -342,7 +341,6 @@ not_in_delay_slot: lwi r5, r6, 0x200 + TOPHYS(r0_ram) addi r5, r5, 1 swi r5, r6, 0x200 + TOPHYS(r0_ram) -#endif /* end */ /* Load the HW Exception vector */ lwi r6, r6, TOPHYS(_MB_HW_ExceptionVectorTable) @@ -378,7 +376,7 @@ handle_other_ex: /* Handle Other exceptions here */ swi r18, r1, PT_R18 or r5, r1, r0 - andi r6, r4, 0x1F; /* Load ESR[EC] */ + andi r6, r3, 0x1F; /* Load ESR[EC] */ lwi r7, r0, PER_CPU(KM) /* MS: saving current kernel mode to regs */ swi r7, r1, PT_MODE mfs r7, rfsr @@ -428,11 +426,11 @@ handle_other_ex: /* Handle Other exceptions here */ */ handle_unaligned_ex: /* Working registers already saved: R3, R4, R5, R6 - * R4 = ESR - * R3 = EAR + * R3 = ESR + * R4 = EAR */ #ifdef CONFIG_MMU - andi r6, r4, 0x1000 /* Check ESR[DS] */ + andi r6, r3, 0x1000 /* Check ESR[DS] */ beqi r6, _no_delayslot /* Branch if ESR[DS] not set */ mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ nop @@ -441,7 +439,7 @@ _no_delayslot: RESTORE_STATE; bri unaligned_data_trap #endif - andi r6, r4, 0x3E0; /* Mask and extract the register operand */ + andi r6, r3, 0x3E0; /* Mask and extract the register operand */ srl r6, r6; /* r6 >> 5 */ srl r6, r6; srl r6, r6; @@ -450,33 +448,33 @@ _no_delayslot: /* Store the register operand in a temporary location */ sbi r6, r0, TOPHYS(ex_reg_op); - andi r6, r4, 0x400; /* Extract ESR[S] */ + andi r6, r3, 0x400; /* Extract ESR[S] */ bnei r6, ex_sw; ex_lw: - andi r6, r4, 0x800; /* Extract ESR[W] */ + andi r6, r3, 0x800; /* Extract ESR[W] */ beqi r6, ex_lhw; - lbui r5, r3, 0; /* Exception address in r3 */ + lbui r5, r4, 0; /* Exception address in r4 */ /* Load a word, byte-by-byte from destination address and save it in tmp space */ sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); - lbui r5, r3, 1; + lbui r5, r4, 1; sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); - lbui r5, r3, 2; + lbui r5, r4, 2; sbi r5, r0, TOPHYS(ex_tmp_data_loc_2); - lbui r5, r3, 3; + lbui r5, r4, 3; sbi r5, r0, TOPHYS(ex_tmp_data_loc_3); - /* Get the destination register value into r4 */ - lwi r4, r0, TOPHYS(ex_tmp_data_loc_0); + /* Get the destination register value into r3 */ + lwi r3, r0, TOPHYS(ex_tmp_data_loc_0); bri ex_lw_tail; ex_lhw: - lbui r5, r3, 0; /* Exception address in r3 */ + lbui r5, r4, 0; /* Exception address in r4 */ /* Load a half-word, byte-by-byte from destination address and save it in tmp space */ sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); - lbui r5, r3, 1; + lbui r5, r4, 1; sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); - /* Get the destination register value into r4 */ - lhui r4, r0, TOPHYS(ex_tmp_data_loc_0); + /* Get the destination register value into r3 */ + lhui r3, r0, TOPHYS(ex_tmp_data_loc_0); ex_lw_tail: /* Get the destination register number into r5 */ lbui r5, r0, TOPHYS(ex_reg_op); @@ -504,25 +502,25 @@ ex_sw_tail: andi r6, r6, 0x800; /* Extract ESR[W] */ beqi r6, ex_shw; /* Get the word - delay slot */ - swi r4, r0, TOPHYS(ex_tmp_data_loc_0); + swi r3, r0, TOPHYS(ex_tmp_data_loc_0); /* Store the word, byte-by-byte into destination address */ - lbui r4, r0, TOPHYS(ex_tmp_data_loc_0); - sbi r4, r3, 0; - lbui r4, r0, TOPHYS(ex_tmp_data_loc_1); - sbi r4, r3, 1; - lbui r4, r0, TOPHYS(ex_tmp_data_loc_2); - sbi r4, r3, 2; - lbui r4, r0, TOPHYS(ex_tmp_data_loc_3); - sbi r4, r3, 3; + lbui r3, r0, TOPHYS(ex_tmp_data_loc_0); + sbi r3, r4, 0; + lbui r3, r0, TOPHYS(ex_tmp_data_loc_1); + sbi r3, r4, 1; + lbui r3, r0, TOPHYS(ex_tmp_data_loc_2); + sbi r3, r4, 2; + lbui r3, r0, TOPHYS(ex_tmp_data_loc_3); + sbi r3, r4, 3; bri ex_handler_done; ex_shw: /* Store the lower half-word, byte-by-byte into destination address */ - swi r4, r0, TOPHYS(ex_tmp_data_loc_0); - lbui r4, r0, TOPHYS(ex_tmp_data_loc_2); - sbi r4, r3, 0; - lbui r4, r0, TOPHYS(ex_tmp_data_loc_3); - sbi r4, r3, 1; + swi r3, r0, TOPHYS(ex_tmp_data_loc_0); + lbui r3, r0, TOPHYS(ex_tmp_data_loc_2); + sbi r3, r4, 0; + lbui r3, r0, TOPHYS(ex_tmp_data_loc_3); + sbi r3, r4, 1; ex_sw_end: /* Exception handling of store word, ends. */ ex_handler_done: @@ -562,16 +560,21 @@ ex_handler_done: */ mfs r11, rpid nop + bri 4 + mfs r3, rear /* Get faulting address */ + nop /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - ori r5, r0, CONFIG_KERNEL_START - cmpu r5, r3, r5 - bgti r5, ex3 + ori r4, r0, CONFIG_KERNEL_START + cmpu r4, r3, r4 + bgti r4, ex3 /* First, check if it was a zone fault (which means a user * tried to access a kernel or read-protected page - always * a SEGV). All other faults here must be stores, so no * need to check ESR_S as well. */ + mfs r4, resr + nop andi r4, r4, 0x800 /* ESR_Z - zone protection */ bnei r4, ex2 @@ -586,6 +589,8 @@ ex_handler_done: * tried to access a kernel or read-protected page - always * a SEGV). All other faults here must be stores, so no * need to check ESR_S as well. */ + mfs r4, resr + nop andi r4, r4, 0x800 /* ESR_Z */ bnei r4, ex2 /* get current task address */ @@ -660,6 +665,8 @@ ex_handler_done: * R3 = ESR */ + mfs r3, rear /* Get faulting address */ + nop RESTORE_STATE; bri page_fault_instr_trap @@ -670,15 +677,18 @@ ex_handler_done: */ handle_data_tlb_miss_exception: /* Working registers already saved: R3, R4, R5, R6 - * R3 = EAR, R4 = ESR + * R3 = ESR */ mfs r11, rpid nop + bri 4 + mfs r3, rear /* Get faulting address */ + nop /* If we are faulting a kernel address, we have to use the * kernel page tables. */ - ori r6, r0, CONFIG_KERNEL_START - cmpu r4, r3, r6 + ori r4, r0, CONFIG_KERNEL_START + cmpu r4, r3, r4 bgti r4, ex5 ori r4, r0, swapper_pg_dir mts rpid, r0 /* TLB will have 0 TID */ @@ -721,8 +731,9 @@ ex_handler_done: * Many of these bits are software only. Bits we don't set * here we (properly should) assume have the appropriate value. */ - brid finish_tlb_load andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ + + bri finish_tlb_load ex7: /* The bailout. Restore registers to pre-exception conditions * and call the heavyweights to help us out. @@ -743,6 +754,9 @@ ex_handler_done: */ mfs r11, rpid nop + bri 4 + mfs r3, rear /* Get faulting address */ + nop /* If we are faulting a kernel address, we have to use the * kernel page tables. @@ -778,7 +792,7 @@ ex_handler_done: lwi r4, r5, 0 /* Get Linux PTE */ andi r6, r4, _PAGE_PRESENT - beqi r6, ex10 + beqi r6, ex7 ori r4, r4, _PAGE_ACCESSED swi r4, r5, 0 @@ -791,8 +805,9 @@ ex_handler_done: * Many of these bits are software only. Bits we don't set * here we (properly should) assume have the appropriate value. */ - brid finish_tlb_load andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ + + bri finish_tlb_load ex10: /* The bailout. Restore registers to pre-exception conditions * and call the heavyweights to help us out. @@ -822,9 +837,9 @@ ex_handler_done: andi r5, r5, (MICROBLAZE_TLB_SIZE-1) ori r6, r0, 1 cmp r31, r5, r6 - blti r31, ex12 + blti r31, sem addik r5, r6, 1 - ex12: + sem: /* MS: save back current TLB index */ swi r5, r0, TOPHYS(tlb_index) @@ -844,6 +859,7 @@ ex_handler_done: nop /* Done...restore registers and get out of here. */ + ex12: mts rpid, r11 nop bri 4 diff --git a/trunk/arch/microblaze/kernel/misc.S b/trunk/arch/microblaze/kernel/misc.S index 7cf86498326c..df16c6287a8e 100644 --- a/trunk/arch/microblaze/kernel/misc.S +++ b/trunk/arch/microblaze/kernel/misc.S @@ -26,10 +26,9 @@ * We avoid flushing the pinned 0, 1 and possibly 2 entries. */ .globl _tlbia; -.type _tlbia, @function .align 4; _tlbia: - addik r12, r0, MICROBLAZE_TLB_SIZE - 1 /* flush all entries (63 - 3) */ + addik r12, r0, 63 /* flush all entries (63 - 3) */ /* isync */ _tlbia_1: mts rtlbx, r12 @@ -42,13 +41,11 @@ _tlbia_1: /* sync */ rtsd r15, 8 nop - .size _tlbia, . - _tlbia /* * Flush MMU TLB for a particular address (in r5) */ .globl _tlbie; -.type _tlbie, @function .align 4; _tlbie: mts rtlbsx, r5 /* look up the address in TLB */ @@ -62,20 +59,17 @@ _tlbie_1: rtsd r15, 8 nop - .size _tlbie, . - _tlbie - /* * Allocate TLB entry for early console */ .globl early_console_reg_tlb_alloc; -.type early_console_reg_tlb_alloc, @function .align 4; early_console_reg_tlb_alloc: /* * Load a TLB entry for the UART, so that microblaze_progress() can use * the UARTs nice and early. We use a 4k real==virtual mapping. */ - ori r4, r0, MICROBLAZE_TLB_SIZE - 1 + ori r4, r0, 63 mts rtlbx, r4 /* TLB slot 2 */ or r4,r5,r0 @@ -92,8 +86,6 @@ early_console_reg_tlb_alloc: rtsd r15, 8 nop - .size early_console_reg_tlb_alloc, . - early_console_reg_tlb_alloc - /* * Copy a whole page (4096 bytes). */ @@ -112,7 +104,6 @@ early_console_reg_tlb_alloc: #define DCACHE_LINE_BYTES (4 * 4) .globl copy_page; -.type copy_page, @function .align 4; copy_page: ori r11, r0, (PAGE_SIZE/DCACHE_LINE_BYTES) - 1 @@ -127,5 +118,3 @@ _copy_page_loop: addik r11, r11, -1 rtsd r15, 8 nop - - .size copy_page, . - copy_page diff --git a/trunk/arch/microblaze/kernel/module.c b/trunk/arch/microblaze/kernel/module.c index cbecf110dc30..5a45b1adfef1 100644 --- a/trunk/arch/microblaze/kernel/module.c +++ b/trunk/arch/microblaze/kernel/module.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/microblaze/kernel/of_platform.c b/trunk/arch/microblaze/kernel/of_platform.c index 0dc755286d38..1c6d684996d7 100644 --- a/trunk/arch/microblaze/kernel/of_platform.c +++ b/trunk/arch/microblaze/kernel/of_platform.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/microblaze/kernel/process.c b/trunk/arch/microblaze/kernel/process.c index 09bed44dfcd3..812f1bf06c9e 100644 --- a/trunk/arch/microblaze/kernel/process.c +++ b/trunk/arch/microblaze/kernel/process.c @@ -15,7 +15,6 @@ #include #include #include -#include /* for USER_DS macros */ #include void show_regs(struct pt_regs *regs) @@ -75,10 +74,7 @@ __setup("hlt", hlt_setup); void default_idle(void) { - if (likely(hlt_counter)) { - while (!need_resched()) - cpu_relax(); - } else { + if (!hlt_counter) { clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); local_irq_disable(); @@ -86,7 +82,9 @@ void default_idle(void) cpu_sleep(); local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG); - } + } else + while (!need_resched()) + cpu_relax(); } void cpu_idle(void) diff --git a/trunk/arch/microblaze/kernel/setup.c b/trunk/arch/microblaze/kernel/setup.c index 17c98dbcec88..f974ec7aa357 100644 --- a/trunk/arch/microblaze/kernel/setup.c +++ b/trunk/arch/microblaze/kernel/setup.c @@ -92,12 +92,6 @@ inline unsigned get_romfs_len(unsigned *addr) } #endif /* CONFIG_MTD_UCLINUX_EBSS */ -#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_SERIAL_UARTLITE_CONSOLE) -#define eprintk early_printk -#else -#define eprintk printk -#endif - void __init machine_early_init(const char *cmdline, unsigned int ram, unsigned int fdt, unsigned int msr) { @@ -145,32 +139,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, setup_early_printk(NULL); #endif - eprintk("Ramdisk addr 0x%08x, ", ram); + early_printk("Ramdisk addr 0x%08x, ", ram); if (fdt) - eprintk("FDT at 0x%08x\n", fdt); + early_printk("FDT at 0x%08x\n", fdt); else - eprintk("Compiled-in FDT at 0x%08x\n", + early_printk("Compiled-in FDT at 0x%08x\n", (unsigned int)_fdt_start); #ifdef CONFIG_MTD_UCLINUX - eprintk("Found romfs @ 0x%08x (0x%08x)\n", + early_printk("Found romfs @ 0x%08x (0x%08x)\n", romfs_base, romfs_size); - eprintk("#### klimit %p ####\n", old_klimit); + early_printk("#### klimit %p ####\n", old_klimit); BUG_ON(romfs_size < 0); /* What else can we do? */ - eprintk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", + early_printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", romfs_size, romfs_base, (unsigned)&_ebss); - eprintk("New klimit: 0x%08x\n", (unsigned)klimit); + early_printk("New klimit: 0x%08x\n", (unsigned)klimit); #endif #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR if (msr) - eprintk("!!!Your kernel has setup MSR instruction but " + early_printk("!!!Your kernel has setup MSR instruction but " "CPU don't have it %d\n", msr); #else if (!msr) - eprintk("!!!Your kernel not setup MSR instruction but " + early_printk("!!!Your kernel not setup MSR instruction but " "CPU have it %d\n", msr); #endif diff --git a/trunk/arch/microblaze/kernel/sys_microblaze.c b/trunk/arch/microblaze/kernel/sys_microblaze.c index f4e00b7f1259..9f3c205fb75b 100644 --- a/trunk/arch/microblaze/kernel/sys_microblaze.c +++ b/trunk/arch/microblaze/kernel/sys_microblaze.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/microblaze/kernel/traps.c b/trunk/arch/microblaze/kernel/traps.c index 5e4570ef515c..eaaaf805f31b 100644 --- a/trunk/arch/microblaze/kernel/traps.c +++ b/trunk/arch/microblaze/kernel/traps.c @@ -22,11 +22,13 @@ void trap_init(void) __enable_hw_exceptions(); } -static unsigned long kstack_depth_to_print = 24; +static int kstack_depth_to_print = 24; static int __init kstack_setup(char *s) { - return !strict_strtoul(s, 0, &kstack_depth_to_print); + kstack_depth_to_print = strict_strtoul(s, 0, NULL); + + return 1; } __setup("kstack=", kstack_setup); diff --git a/trunk/arch/microblaze/lib/Makefile b/trunk/arch/microblaze/lib/Makefile index 4dfe47d3cd91..b579db068c06 100644 --- a/trunk/arch/microblaze/lib/Makefile +++ b/trunk/arch/microblaze/lib/Makefile @@ -10,4 +10,5 @@ else lib-y += memcpy.o memmove.o endif -lib-y += uaccess_old.o +lib-$(CONFIG_NO_MMU) += uaccess.o +lib-$(CONFIG_MMU) += uaccess_old.o diff --git a/trunk/arch/microblaze/lib/fastcopy.S b/trunk/arch/microblaze/lib/fastcopy.S index fdc48bb065d8..02e3ab4eddf3 100644 --- a/trunk/arch/microblaze/lib/fastcopy.S +++ b/trunk/arch/microblaze/lib/fastcopy.S @@ -30,9 +30,8 @@ */ #include - .text + .globl memcpy - .type memcpy, @function .ent memcpy memcpy: @@ -346,11 +345,9 @@ a_done: rtsd r15, 8 nop -.size memcpy, . - memcpy .end memcpy /*----------------------------------------------------------------------------*/ .globl memmove - .type memmove, @function .ent memmove memmove: @@ -662,5 +659,4 @@ d_done: rtsd r15, 8 nop -.size memmove, . - memmove .end memmove diff --git a/trunk/arch/microblaze/lib/memcpy.c b/trunk/arch/microblaze/lib/memcpy.c index 014bac92bdff..cc2108b6b260 100644 --- a/trunk/arch/microblaze/lib/memcpy.c +++ b/trunk/arch/microblaze/lib/memcpy.c @@ -53,7 +53,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) const uint32_t *i_src; uint32_t *i_dst; - if (likely(c >= 4)) { + if (c >= 4) { unsigned value, buf_hold; /* Align the dstination to a word boundry. */ diff --git a/trunk/arch/microblaze/lib/memset.c b/trunk/arch/microblaze/lib/memset.c index ecfb663e1fc1..4df851d41a29 100644 --- a/trunk/arch/microblaze/lib/memset.c +++ b/trunk/arch/microblaze/lib/memset.c @@ -33,23 +33,22 @@ #ifdef __HAVE_ARCH_MEMSET void *memset(void *v_src, int c, __kernel_size_t n) { + char *src = v_src; #ifdef CONFIG_OPT_LIB_FUNCTION uint32_t *i_src; - uint32_t w32 = 0; + uint32_t w32; #endif /* Truncate c to 8 bits */ c = (c & 0xFF); #ifdef CONFIG_OPT_LIB_FUNCTION - if (unlikely(c)) { - /* Make a repeating word out of it */ - w32 = c; - w32 |= w32 << 8; - w32 |= w32 << 16; - } + /* Make a repeating word out of it */ + w32 = c; + w32 |= w32 << 8; + w32 |= w32 << 16; - if (likely(n >= 4)) { + if (n >= 4) { /* Align the destination to a word boundary */ /* This is done in an endian independant manner */ switch ((unsigned) src & 3) { diff --git a/trunk/arch/microblaze/lib/uaccess.c b/trunk/arch/microblaze/lib/uaccess.c new file mode 100644 index 000000000000..a853fe089c44 --- /dev/null +++ b/trunk/arch/microblaze/lib/uaccess.c @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2006 Atmark Techno, Inc. + * + * 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. + */ + +#include +#include + +#include + +long strnlen_user(const char __user *src, long count) +{ + return strlen(src) + 1; +} + +#define __do_strncpy_from_user(dst, src, count, res) \ + do { \ + char *tmp; \ + strncpy(dst, src, count); \ + for (tmp = dst; *tmp && count > 0; tmp++, count--) \ + ; \ + res = (tmp - dst); \ + } while (0) + +long __strncpy_from_user(char *dst, const char __user *src, long count) +{ + long res; + __do_strncpy_from_user(dst, src, count, res); + return res; +} + +long strncpy_from_user(char *dst, const char __user *src, long count) +{ + long res = -EFAULT; + if (access_ok(VERIFY_READ, src, 1)) + __do_strncpy_from_user(dst, src, count, res); + return res; +} + +unsigned long __copy_tofrom_user(void __user *to, + const void __user *from, unsigned long size) +{ + memcpy(to, from, size); + return 0; +} diff --git a/trunk/arch/microblaze/lib/uaccess_old.S b/trunk/arch/microblaze/lib/uaccess_old.S index 5810cec54a7a..67f991c14b8a 100644 --- a/trunk/arch/microblaze/lib/uaccess_old.S +++ b/trunk/arch/microblaze/lib/uaccess_old.S @@ -22,7 +22,6 @@ .text .globl __strncpy_user; -.type __strncpy_user, @function .align 4; __strncpy_user: @@ -51,7 +50,7 @@ __strncpy_user: 3: rtsd r15,8 nop - .size __strncpy_user, . - __strncpy_user + .section .fixup, "ax" .align 2 @@ -73,7 +72,6 @@ __strncpy_user: .text .globl __strnlen_user; -.type __strnlen_user, @function .align 4; __strnlen_user: addik r3,r6,0 @@ -92,7 +90,7 @@ __strnlen_user: 3: rtsd r15,8 nop - .size __strnlen_user, . - __strnlen_user + .section .fixup,"ax" 4: @@ -110,7 +108,6 @@ __strnlen_user: */ .text .globl __copy_tofrom_user; -.type __copy_tofrom_user, @function .align 4; __copy_tofrom_user: /* @@ -119,34 +116,20 @@ __copy_tofrom_user: * r7, r3 - count * r4 - tempval */ - beqid r7, 3f /* zero size is not likely */ - andi r3, r7, 0x3 /* filter add count */ - bneid r3, 4f /* if is odd value then byte copying */ - or r3, r5, r6 /* find if is any to/from unaligned */ - andi r3, r3, 0x3 /* mask unaligned */ - bneid r3, 1f /* it is unaligned -> then jump */ - or r3, r0, r0 - -/* at least one 4 byte copy */ -5: lw r4, r6, r3 -6: sw r4, r5, r3 - addik r7, r7, -4 - bneid r7, 5b - addik r3, r3, 4 - addik r3, r7, 0 - rtsd r15, 8 - nop -4: or r3, r0, r0 -1: lbu r4,r6,r3 -2: sb r4,r5,r3 - addik r7,r7,-1 - bneid r7,1b - addik r3,r3,1 /* delay slot */ -3: addik r3,r7,0 + beqi r3,3f +1: + lbu r4,r6,r0 + addik r6,r6,1 +2: + sb r4,r5,r0 + addik r3,r3,-1 + bneid r3,1b + addik r5,r5,1 /* delay slot */ +3: rtsd r15,8 nop - .size __copy_tofrom_user, . - __copy_tofrom_user + .section __ex_table,"a" - .word 1b,3b,2b,3b,5b,3b,6b,3b + .word 1b,3b,2b,3b diff --git a/trunk/arch/microblaze/mm/consistent.c b/trunk/arch/microblaze/mm/consistent.c index f956e24fe49c..a9b443e3fb98 100644 --- a/trunk/arch/microblaze/mm/consistent.c +++ b/trunk/arch/microblaze/mm/consistent.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/microblaze/mm/fault.c b/trunk/arch/microblaze/mm/fault.c index 7af87f4b2c2c..d9d249a66ff2 100644 --- a/trunk/arch/microblaze/mm/fault.c +++ b/trunk/arch/microblaze/mm/fault.c @@ -106,7 +106,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, regs->esr = error_code; /* On a kernel SLB miss we can only check for a valid exception entry */ - if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) { + if (kernel_mode(regs) && (address >= TASK_SIZE)) { printk(KERN_WARNING "kernel task_size exceed"); _exception(SIGSEGV, regs, code, address); } @@ -122,7 +122,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, } #endif /* CONFIG_KGDB */ - if (unlikely(in_atomic() || !mm)) { + if (in_atomic() || !mm) { if (kernel_mode(regs)) goto bad_area_nosemaphore; @@ -150,7 +150,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, * source. If this is invalid we can skip the address space check, * thus avoiding the deadlock. */ - if (unlikely(!down_read_trylock(&mm->mmap_sem))) { + if (!down_read_trylock(&mm->mmap_sem)) { if (kernel_mode(regs) && !search_exception_tables(regs->pc)) goto bad_area_nosemaphore; @@ -158,16 +158,16 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, } vma = find_vma(mm, address); - if (unlikely(!vma)) + if (!vma) goto bad_area; if (vma->vm_start <= address) goto good_area; - if (unlikely(!(vma->vm_flags & VM_GROWSDOWN))) + if (!(vma->vm_flags & VM_GROWSDOWN)) goto bad_area; - if (unlikely(!is_write)) + if (!is_write) goto bad_area; /* @@ -179,7 +179,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, * before setting the user r1. Thus we allow the stack to * expand to 1MB without further checks. */ - if (unlikely(address + 0x100000 < vma->vm_end)) { + if (address + 0x100000 < vma->vm_end) { /* get user regs even if this fault is in kernel mode */ struct pt_regs *uregs = current->thread.regs; @@ -209,15 +209,15 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, code = SEGV_ACCERR; /* a write */ - if (unlikely(is_write)) { - if (unlikely(!(vma->vm_flags & VM_WRITE))) + if (is_write) { + if (!(vma->vm_flags & VM_WRITE)) goto bad_area; /* a read */ } else { /* protection fault */ - if (unlikely(error_code & 0x08000000)) + if (error_code & 0x08000000) goto bad_area; - if (unlikely(!(vma->vm_flags & (VM_READ | VM_EXEC)))) + if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; } @@ -235,7 +235,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, goto do_sigbus; BUG(); } - if (unlikely(fault & VM_FAULT_MAJOR)) + if (fault & VM_FAULT_MAJOR) current->maj_flt++; else current->min_flt++; diff --git a/trunk/arch/microblaze/mm/init.c b/trunk/arch/microblaze/mm/init.c index f42c2dde8b1c..1608e2e1a44a 100644 --- a/trunk/arch/microblaze/mm/init.c +++ b/trunk/arch/microblaze/mm/init.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -166,6 +165,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) for (addr = begin; addr < end; addr += PAGE_SIZE) { ClearPageReserved(virt_to_page(addr)); init_page_count(virt_to_page(addr)); + memset((void *)addr, 0xcc, PAGE_SIZE); free_page(addr); totalram_pages++; } @@ -208,6 +208,14 @@ void __init mem_init(void) } #ifndef CONFIG_MMU +/* Check against bounds of physical memory */ +int ___range_ok(unsigned long addr, unsigned long size) +{ + return ((addr < memory_start) || + ((addr + size) > memory_end)); +} +EXPORT_SYMBOL(___range_ok); + int page_is_ram(unsigned long pfn) { return __range_ok(pfn, 0); diff --git a/trunk/arch/microblaze/mm/pgtable.c b/trunk/arch/microblaze/mm/pgtable.c index d31312cde6ea..63a6fd07c48f 100644 --- a/trunk/arch/microblaze/mm/pgtable.c +++ b/trunk/arch/microblaze/mm/pgtable.c @@ -154,7 +154,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags) err = 0; set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); - if (unlikely(mem_init_done)) + if (mem_init_done) flush_HPTE(0, va, pmd_val(*pd)); /* flush_HPTE(0, va, pg); */ } diff --git a/trunk/arch/microblaze/pci/pci-common.c b/trunk/arch/microblaze/pci/pci-common.c index 740bb32ec57e..0be34350d733 100644 --- a/trunk/arch/microblaze/pci/pci-common.c +++ b/trunk/arch/microblaze/pci/pci-common.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/microblaze/pci/pci_32.c b/trunk/arch/microblaze/pci/pci_32.c index 3c3d808d7ce0..7e0c94f501cc 100644 --- a/trunk/arch/microblaze/pci/pci_32.c +++ b/trunk/arch/microblaze/pci/pci_32.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/jazz/jazzdma.c b/trunk/arch/mips/jazz/jazzdma.c index 9ce9f64cb76f..0d64d0f46418 100644 --- a/trunk/arch/mips/jazz/jazzdma.c +++ b/trunk/arch/mips/jazz/jazzdma.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mips/kernel/irq.c b/trunk/arch/mips/kernel/irq.c index c6345f579a8a..981f86c26168 100644 --- a/trunk/arch/mips/kernel/irq.c +++ b/trunk/arch/mips/kernel/irq.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/kernel/linux32.c b/trunk/arch/mips/kernel/linux32.c index c2dab140dc98..a39d0597a375 100644 --- a/trunk/arch/mips/kernel/linux32.c +++ b/trunk/arch/mips/kernel/linux32.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/kernel/process.c b/trunk/arch/mips/kernel/process.c index 463b71b90a00..f3d73e1831c1 100644 --- a/trunk/arch/mips/kernel/process.c +++ b/trunk/arch/mips/kernel/process.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/kernel/rtlx.c b/trunk/arch/mips/kernel/rtlx.c index 26f9b9ab19cc..dcaed1bbbfe5 100644 --- a/trunk/arch/mips/kernel/rtlx.c +++ b/trunk/arch/mips/kernel/rtlx.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/kernel/smtc.c b/trunk/arch/mips/kernel/smtc.c index 25e825aea327..23499b5bd9c3 100644 --- a/trunk/arch/mips/kernel/smtc.c +++ b/trunk/arch/mips/kernel/smtc.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/kernel/syscall.c b/trunk/arch/mips/kernel/syscall.c index 9587abc67f35..e96b1c30c7aa 100644 --- a/trunk/arch/mips/kernel/syscall.c +++ b/trunk/arch/mips/kernel/syscall.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/mipssim/sim_int.c b/trunk/arch/mips/mipssim/sim_int.c index 5c779be6f082..46067ad542dc 100644 --- a/trunk/arch/mips/mipssim/sim_int.c +++ b/trunk/arch/mips/mipssim/sim_int.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/trunk/arch/mips/mm/dma-default.c b/trunk/arch/mips/mm/dma-default.c index 9547bc0cf188..9367e33fbd18 100644 --- a/trunk/arch/mips/mm/dma-default.c +++ b/trunk/arch/mips/mm/dma-default.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/mm/hugetlbpage.c b/trunk/arch/mips/mm/hugetlbpage.c index a7fee0dfb7a9..cd0660c51f28 100644 --- a/trunk/arch/mips/mm/hugetlbpage.c +++ b/trunk/arch/mips/mm/hugetlbpage.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/mm/init.c b/trunk/arch/mips/mm/init.c index 2efcbd24c82f..12539af38a99 100644 --- a/trunk/arch/mips/mm/init.c +++ b/trunk/arch/mips/mm/init.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/mm/ioremap.c b/trunk/arch/mips/mm/ioremap.c index cacfd31e8ec9..0c43248347bd 100644 --- a/trunk/arch/mips/mm/ioremap.c +++ b/trunk/arch/mips/mm/ioremap.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mips/mti-malta/malta-int.c b/trunk/arch/mips/mti-malta/malta-int.c index 15949b0be811..2cb5ae790203 100644 --- a/trunk/arch/mips/mti-malta/malta-int.c +++ b/trunk/arch/mips/mti-malta/malta-int.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/nxp/pnx833x/common/reset.c b/trunk/arch/mips/nxp/pnx833x/common/reset.c index e0ea96d29fde..a9bc9bacad2b 100644 --- a/trunk/arch/mips/nxp/pnx833x/common/reset.c +++ b/trunk/arch/mips/nxp/pnx833x/common/reset.c @@ -22,6 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include diff --git a/trunk/arch/mips/nxp/pnx8550/common/int.c b/trunk/arch/mips/nxp/pnx8550/common/int.c index cfed5051dc6d..7aca7d5375e5 100644 --- a/trunk/arch/mips/nxp/pnx8550/common/int.c +++ b/trunk/arch/mips/nxp/pnx8550/common/int.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/nxp/pnx8550/common/proc.c b/trunk/arch/mips/nxp/pnx8550/common/proc.c index 3bba5ec828e8..af094cd1d85b 100644 --- a/trunk/arch/mips/nxp/pnx8550/common/proc.c +++ b/trunk/arch/mips/nxp/pnx8550/common/proc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/nxp/pnx8550/common/reset.c b/trunk/arch/mips/nxp/pnx8550/common/reset.c index 76bc3ec634ee..7b2cbc5b2c7c 100644 --- a/trunk/arch/mips/nxp/pnx8550/common/reset.c +++ b/trunk/arch/mips/nxp/pnx8550/common/reset.c @@ -20,6 +20,7 @@ * Reset the PNX8550 board. * */ +#include #include #include diff --git a/trunk/arch/mips/pci/ops-titan-ht.c b/trunk/arch/mips/pci/ops-titan-ht.c index 749c1922d420..46c636c27e06 100644 --- a/trunk/arch/mips/pci/ops-titan-ht.c +++ b/trunk/arch/mips/pci/ops-titan-ht.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/trunk/arch/mips/pmc-sierra/msp71xx/msp_prom.c index db00deb59b9c..db98d87a0922 100644 --- a/trunk/arch/mips/pmc-sierra/msp71xx/msp_prom.c +++ b/trunk/arch/mips/pmc-sierra/msp71xx/msp_prom.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mips/pmc-sierra/yosemite/ht.c b/trunk/arch/mips/pmc-sierra/yosemite/ht.c index 63be40e470db..fd22597edb64 100644 --- a/trunk/arch/mips/pmc-sierra/yosemite/ht.c +++ b/trunk/arch/mips/pmc-sierra/yosemite/ht.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/mips/pmc-sierra/yosemite/irq.c b/trunk/arch/mips/pmc-sierra/yosemite/irq.c index 51021cfd04bc..5f673eba142c 100644 --- a/trunk/arch/mips/pmc-sierra/yosemite/irq.c +++ b/trunk/arch/mips/pmc-sierra/yosemite/irq.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/powertv/asic/asic_devices.c b/trunk/arch/mips/powertv/asic/asic_devices.c index 8ee77887306a..217424231eb6 100644 --- a/trunk/arch/mips/powertv/asic/asic_devices.c +++ b/trunk/arch/mips/powertv/asic/asic_devices.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mips/powertv/asic/asic_int.c b/trunk/arch/mips/powertv/asic/asic_int.c index 529c44a52d64..325fab9685d1 100644 --- a/trunk/arch/mips/powertv/asic/asic_int.c +++ b/trunk/arch/mips/powertv/asic/asic_int.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/rb532/irq.c b/trunk/arch/mips/rb532/irq.c index ea6cec3c1e0d..f07882029a90 100644 --- a/trunk/arch/mips/rb532/irq.c +++ b/trunk/arch/mips/rb532/irq.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/mips/sgi-ip27/ip27-irq.c b/trunk/arch/mips/sgi-ip27/ip27-irq.c index 6a123ea72de5..c1c8e40d65d6 100644 --- a/trunk/arch/mips/sgi-ip27/ip27-irq.c +++ b/trunk/arch/mips/sgi-ip27/ip27-irq.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/sgi-ip32/ip32-irq.c b/trunk/arch/mips/sgi-ip32/ip32-irq.c index eb40824b172a..d8b65204d288 100644 --- a/trunk/arch/mips/sgi-ip32/ip32-irq.c +++ b/trunk/arch/mips/sgi-ip32/ip32-irq.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/sibyte/bcm1480/irq.c b/trunk/arch/mips/sibyte/bcm1480/irq.c index 7a8b0a8b643a..06e25d949768 100644 --- a/trunk/arch/mips/sibyte/bcm1480/irq.c +++ b/trunk/arch/mips/sibyte/bcm1480/irq.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/mips/sibyte/common/sb_tbprof.c b/trunk/arch/mips/sibyte/common/sb_tbprof.c index d4ed7a9156f5..ed2453eab5cb 100644 --- a/trunk/arch/mips/sibyte/common/sb_tbprof.c +++ b/trunk/arch/mips/sibyte/common/sb_tbprof.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mips/sibyte/sb1250/irq.c b/trunk/arch/mips/sibyte/sb1250/irq.c index 62371f772553..ab44a2f59ee4 100644 --- a/trunk/arch/mips/sibyte/sb1250/irq.c +++ b/trunk/arch/mips/sibyte/sb1250/irq.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/mips/txx9/generic/pci.c b/trunk/arch/mips/txx9/generic/pci.c index 9a0be810cafa..707cfa9c547d 100644 --- a/trunk/arch/mips/txx9/generic/pci.c +++ b/trunk/arch/mips/txx9/generic/pci.c @@ -20,7 +20,6 @@ #include #ifdef CONFIG_TOSHIBA_FPCIB0 #include -#include #include #include #endif diff --git a/trunk/arch/mips/txx9/generic/setup.c b/trunk/arch/mips/txx9/generic/setup.c index adc69291f9e2..95184a0a1ae6 100644 --- a/trunk/arch/mips/txx9/generic/setup.c +++ b/trunk/arch/mips/txx9/generic/setup.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mips/txx9/generic/spi_eeprom.c b/trunk/arch/mips/txx9/generic/spi_eeprom.c index 103abc13d623..75c347238f47 100644 --- a/trunk/arch/mips/txx9/generic/spi_eeprom.c +++ b/trunk/arch/mips/txx9/generic/spi_eeprom.c @@ -10,7 +10,6 @@ * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) */ #include -#include #include #include #include diff --git a/trunk/arch/mips/txx9/rbtx4939/setup.c b/trunk/arch/mips/txx9/rbtx4939/setup.c index 7dc0fafbec80..b0c241ecf603 100644 --- a/trunk/arch/mips/txx9/rbtx4939/setup.c +++ b/trunk/arch/mips/txx9/rbtx4939/setup.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mn10300/kernel/process.c b/trunk/arch/mn10300/kernel/process.c index 82b817c7f7b6..ec8a21df1142 100644 --- a/trunk/arch/mn10300/kernel/process.c +++ b/trunk/arch/mn10300/kernel/process.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/mn10300/kernel/setup.c b/trunk/arch/mn10300/kernel/setup.c index d464affcba0e..3f24c298a3af 100644 --- a/trunk/arch/mn10300/kernel/setup.c +++ b/trunk/arch/mn10300/kernel/setup.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/mn10300/mm/dma-alloc.c b/trunk/arch/mn10300/mm/dma-alloc.c index 4e34880bea03..ee82d624b3c6 100644 --- a/trunk/arch/mn10300/mm/dma-alloc.c +++ b/trunk/arch/mn10300/mm/dma-alloc.c @@ -14,7 +14,6 @@ #include #include #include -#include #include static unsigned long pci_sram_allocated = 0xbc000000; diff --git a/trunk/arch/mn10300/mm/init.c b/trunk/arch/mn10300/mm/init.c index 6e6bc0e51521..dd27a9a35152 100644 --- a/trunk/arch/mn10300/mm/init.c +++ b/trunk/arch/mn10300/mm/init.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/mn10300/mm/pgtable.c b/trunk/arch/mn10300/mm/pgtable.c index 9c1624c9e4e9..baffc581e031 100644 --- a/trunk/arch/mn10300/mm/pgtable.c +++ b/trunk/arch/mn10300/mm/pgtable.c @@ -12,11 +12,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/trunk/arch/mn10300/unit-asb2305/pci-irq.c b/trunk/arch/mn10300/unit-asb2305/pci-irq.c index 91212ea71e69..58cfb44f0acf 100644 --- a/trunk/arch/mn10300/unit-asb2305/pci-irq.c +++ b/trunk/arch/mn10300/unit-asb2305/pci-irq.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/parisc/hpux/fs.c b/trunk/arch/parisc/hpux/fs.c index 6935123178eb..54075360a8fd 100644 --- a/trunk/arch/parisc/hpux/fs.c +++ b/trunk/arch/parisc/hpux/fs.c @@ -26,8 +26,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/trunk/arch/parisc/kernel/module.c b/trunk/arch/parisc/kernel/module.c index 159a2b81e90c..212074653df7 100644 --- a/trunk/arch/parisc/kernel/module.c +++ b/trunk/arch/parisc/kernel/module.c @@ -61,7 +61,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/parisc/kernel/pci-dma.c b/trunk/arch/parisc/kernel/pci-dma.c index a029f74a3c5c..c07f618ff7da 100644 --- a/trunk/arch/parisc/kernel/pci-dma.c +++ b/trunk/arch/parisc/kernel/pci-dma.c @@ -18,11 +18,11 @@ */ #include -#include #include #include #include #include +#include #include #include #include diff --git a/trunk/arch/parisc/kernel/pci.c b/trunk/arch/parisc/kernel/pci.c index 9efd97405317..38372e7cbb88 100644 --- a/trunk/arch/parisc/kernel/pci.c +++ b/trunk/arch/parisc/kernel/pci.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/parisc/kernel/process.c b/trunk/arch/parisc/kernel/process.c index 76332dadc6e9..1f3aa8db0203 100644 --- a/trunk/arch/parisc/kernel/process.c +++ b/trunk/arch/parisc/kernel/process.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/parisc/kernel/signal32.c b/trunk/arch/parisc/kernel/signal32.c index e14132430762..fb59852006de 100644 --- a/trunk/arch/parisc/kernel/signal32.c +++ b/trunk/arch/parisc/kernel/signal32.c @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/trunk/arch/parisc/kernel/smp.c b/trunk/arch/parisc/kernel/smp.c index 69d63d354ef0..3f2fce8ce6b6 100644 --- a/trunk/arch/parisc/kernel/smp.c +++ b/trunk/arch/parisc/kernel/smp.c @@ -18,6 +18,7 @@ */ #include #include +#include #include #include diff --git a/trunk/arch/parisc/mm/init.c b/trunk/arch/parisc/mm/init.c index f4f4d700833a..13b6e3e59b99 100644 --- a/trunk/arch/parisc/mm/init.c +++ b/trunk/arch/parisc/mm/init.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include /* for hppa_dma_ops and pcxl_dma_ops */ diff --git a/trunk/arch/powerpc/kernel/cacheinfo.c b/trunk/arch/powerpc/kernel/cacheinfo.c index a3c684b4c862..01fe9ce28379 100644 --- a/trunk/arch/powerpc/kernel/cacheinfo.c +++ b/trunk/arch/powerpc/kernel/cacheinfo.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "cacheinfo.h" diff --git a/trunk/arch/powerpc/kernel/dma.c b/trunk/arch/powerpc/kernel/dma.c index 6c1df5757cd6..6215062caf8c 100644 --- a/trunk/arch/powerpc/kernel/dma.c +++ b/trunk/arch/powerpc/kernel/dma.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/ibmebus.c b/trunk/arch/powerpc/kernel/ibmebus.c index 71cf280da184..a4c8b38b0ba1 100644 --- a/trunk/arch/powerpc/kernel/ibmebus.c +++ b/trunk/arch/powerpc/kernel/ibmebus.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/kprobes.c b/trunk/arch/powerpc/kernel/kprobes.c index b36f074524ad..3fd1af902112 100644 --- a/trunk/arch/powerpc/kernel/kprobes.c +++ b/trunk/arch/powerpc/kernel/kprobes.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/lparcfg.c b/trunk/arch/powerpc/kernel/lparcfg.c index c2c70e1b32cd..d09d1c615150 100644 --- a/trunk/arch/powerpc/kernel/lparcfg.c +++ b/trunk/arch/powerpc/kernel/lparcfg.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/misc.S b/trunk/arch/powerpc/kernel/misc.S index 22e507c8a556..b485a87c94e1 100644 --- a/trunk/arch/powerpc/kernel/misc.S +++ b/trunk/arch/powerpc/kernel/misc.S @@ -128,6 +128,7 @@ _GLOBAL(__restore_cpu_power7) /* place holder */ blr +#ifdef CONFIG_EVENT_TRACING /* * Get a minimal set of registers for our caller's nth caller. * r3 = regs pointer, r5 = n. @@ -153,3 +154,4 @@ _GLOBAL(perf_arch_fetch_caller_regs) PPC_STL r4,_NIP-STACK_FRAME_OVERHEAD(r3) PPC_STL r7,_LINK-STACK_FRAME_OVERHEAD(r3) blr +#endif /* CONFIG_EVENT_TRACING */ diff --git a/trunk/arch/powerpc/kernel/of_platform.c b/trunk/arch/powerpc/kernel/of_platform.c index 6c1dfc3ff8bc..666d08db319e 100644 --- a/trunk/arch/powerpc/kernel/of_platform.c +++ b/trunk/arch/powerpc/kernel/of_platform.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/pci-common.c b/trunk/arch/powerpc/kernel/pci-common.c index 0c0567e58409..f3c42ce516e7 100644 --- a/trunk/arch/powerpc/kernel/pci-common.c +++ b/trunk/arch/powerpc/kernel/pci-common.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/pci_32.c b/trunk/arch/powerpc/kernel/pci_32.c index e7db5b48004a..c13668cf36d9 100644 --- a/trunk/arch/powerpc/kernel/pci_32.c +++ b/trunk/arch/powerpc/kernel/pci_32.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/pci_dn.c b/trunk/arch/powerpc/kernel/pci_dn.c index d56b35ee7f74..d5e36e5dc7c2 100644 --- a/trunk/arch/powerpc/kernel/pci_dn.c +++ b/trunk/arch/powerpc/kernel/pci_dn.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/proc_powerpc.c b/trunk/arch/powerpc/kernel/proc_powerpc.c index c8ae3714e79b..1ed3b8d7981e 100644 --- a/trunk/arch/powerpc/kernel/proc_powerpc.c +++ b/trunk/arch/powerpc/kernel/proc_powerpc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/powerpc/kernel/rtas.c b/trunk/arch/powerpc/kernel/rtas.c index 74367841615a..fd0d29493fd6 100644 --- a/trunk/arch/powerpc/kernel/rtas.c +++ b/trunk/arch/powerpc/kernel/rtas.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/rtas_flash.c b/trunk/arch/powerpc/kernel/rtas_flash.c index bfc2abafac44..a85117d5c9a4 100644 --- a/trunk/arch/powerpc/kernel/rtas_flash.c +++ b/trunk/arch/powerpc/kernel/rtas_flash.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/rtasd.c b/trunk/arch/powerpc/kernel/rtasd.c index 4190eae7850a..2e4832ab2108 100644 --- a/trunk/arch/powerpc/kernel/rtasd.c +++ b/trunk/arch/powerpc/kernel/rtasd.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/smp-tbsync.c b/trunk/arch/powerpc/kernel/smp-tbsync.c index 03e45c4a9ef1..a5e54526403d 100644 --- a/trunk/arch/powerpc/kernel/smp-tbsync.c +++ b/trunk/arch/powerpc/kernel/smp-tbsync.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/softemu8xx.c b/trunk/arch/powerpc/kernel/softemu8xx.c index af0e8290b4fc..23c8c5e7dc4d 100644 --- a/trunk/arch/powerpc/kernel/softemu8xx.c +++ b/trunk/arch/powerpc/kernel/softemu8xx.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/powerpc/kernel/sys_ppc32.c b/trunk/arch/powerpc/kernel/sys_ppc32.c index 19471a1cef1a..c5a4732bcc48 100644 --- a/trunk/arch/powerpc/kernel/sys_ppc32.c +++ b/trunk/arch/powerpc/kernel/sys_ppc32.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kernel/traps.c b/trunk/arch/powerpc/kernel/traps.c index 29d128eb6c43..696626a2e835 100644 --- a/trunk/arch/powerpc/kernel/traps.c +++ b/trunk/arch/powerpc/kernel/traps.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/kernel/vio.c b/trunk/arch/powerpc/kernel/vio.c index 82237176a2a3..77f64218abf3 100644 --- a/trunk/arch/powerpc/kernel/vio.c +++ b/trunk/arch/powerpc/kernel/vio.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kvm/44x.c b/trunk/arch/powerpc/kvm/44x.c index 689a57c2ac80..f4d1b55aa70b 100644 --- a/trunk/arch/powerpc/kvm/44x.c +++ b/trunk/arch/powerpc/kvm/44x.c @@ -18,7 +18,6 @@ */ #include -#include #include #include diff --git a/trunk/arch/powerpc/kvm/book3s.c b/trunk/arch/powerpc/kvm/book3s.c index 25da07fd9f77..9a271f0929c7 100644 --- a/trunk/arch/powerpc/kvm/book3s.c +++ b/trunk/arch/powerpc/kvm/book3s.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/kvm/booke.c b/trunk/arch/powerpc/kvm/booke.c index 2a3a1953d4bd..4d686cc6b260 100644 --- a/trunk/arch/powerpc/kvm/booke.c +++ b/trunk/arch/powerpc/kvm/booke.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kvm/e500.c b/trunk/arch/powerpc/kvm/e500.c index 669a5c5fc7d7..efa1198940ab 100644 --- a/trunk/arch/powerpc/kvm/e500.c +++ b/trunk/arch/powerpc/kvm/e500.c @@ -13,7 +13,6 @@ */ #include -#include #include #include diff --git a/trunk/arch/powerpc/kvm/e500_tlb.c b/trunk/arch/powerpc/kvm/e500_tlb.c index 21011e12caeb..0d772e6b6318 100644 --- a/trunk/arch/powerpc/kvm/e500_tlb.c +++ b/trunk/arch/powerpc/kvm/e500_tlb.c @@ -13,7 +13,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/powerpc/kvm/powerpc.c b/trunk/arch/powerpc/kvm/powerpc.c index 297fcd2ff7d0..51aedd7f16bc 100644 --- a/trunk/arch/powerpc/kvm/powerpc.c +++ b/trunk/arch/powerpc/kvm/powerpc.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/lib/devres.c b/trunk/arch/powerpc/lib/devres.c index deac4d30daf4..292115d98ea9 100644 --- a/trunk/arch/powerpc/lib/devres.c +++ b/trunk/arch/powerpc/lib/devres.c @@ -8,7 +8,6 @@ */ #include /* devres_*(), devm_ioremap_release() */ -#include #include /* ioremap_flags() */ #include /* EXPORT_SYMBOL() */ diff --git a/trunk/arch/powerpc/mm/dma-noncoherent.c b/trunk/arch/powerpc/mm/dma-noncoherent.c index 757c0bed9a91..36692f5c9a76 100644 --- a/trunk/arch/powerpc/mm/dma-noncoherent.c +++ b/trunk/arch/powerpc/mm/dma-noncoherent.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/powerpc/mm/hugetlbpage.c b/trunk/arch/powerpc/mm/hugetlbpage.c index 9bb249c3046e..123f7070238a 100644 --- a/trunk/arch/powerpc/mm/hugetlbpage.c +++ b/trunk/arch/powerpc/mm/hugetlbpage.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/mm/init_32.c b/trunk/arch/powerpc/mm/init_32.c index 767333005eb4..b1dbd9ee87cc 100644 --- a/trunk/arch/powerpc/mm/init_32.c +++ b/trunk/arch/powerpc/mm/init_32.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/mm/init_64.c b/trunk/arch/powerpc/mm/init_64.c index d7fa50b09b4a..776f28d02b6b 100644 --- a/trunk/arch/powerpc/mm/init_64.c +++ b/trunk/arch/powerpc/mm/init_64.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c index 0f594d774bf7..448f972b22f5 100644 --- a/trunk/arch/powerpc/mm/mem.c +++ b/trunk/arch/powerpc/mm/mem.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/mm/mmu_context_hash64.c b/trunk/arch/powerpc/mm/mmu_context_hash64.c index 2535828aa84b..51622daae09d 100644 --- a/trunk/arch/powerpc/mm/mmu_context_hash64.c +++ b/trunk/arch/powerpc/mm/mmu_context_hash64.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/powerpc/mm/mmu_context_nohash.c b/trunk/arch/powerpc/mm/mmu_context_nohash.c index 1f2d9ff09895..dbc692145ecb 100644 --- a/trunk/arch/powerpc/mm/mmu_context_nohash.c +++ b/trunk/arch/powerpc/mm/mmu_context_nohash.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/mm/pgtable.c b/trunk/arch/powerpc/mm/pgtable.c index ebc2f38eb381..99df697c601a 100644 --- a/trunk/arch/powerpc/mm/pgtable.c +++ b/trunk/arch/powerpc/mm/pgtable.c @@ -22,7 +22,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/powerpc/mm/pgtable_32.c b/trunk/arch/powerpc/mm/pgtable_32.c index b9243e7557ae..573b3bd1c45b 100644 --- a/trunk/arch/powerpc/mm/pgtable_32.c +++ b/trunk/arch/powerpc/mm/pgtable_32.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/mm/pgtable_64.c b/trunk/arch/powerpc/mm/pgtable_64.c index d95679a5fb29..853d5565eed5 100644 --- a/trunk/arch/powerpc/mm/pgtable_64.c +++ b/trunk/arch/powerpc/mm/pgtable_64.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/mm/subpage-prot.c b/trunk/arch/powerpc/mm/subpage-prot.c index e4f8f1fc81a5..a040b81e93bd 100644 --- a/trunk/arch/powerpc/mm/subpage-prot.c +++ b/trunk/arch/powerpc/mm/subpage-prot.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/oprofile/cell/spu_task_sync.c b/trunk/arch/powerpc/oprofile/cell/spu_task_sync.c index 642fca137ccb..6b793aeda72e 100644 --- a/trunk/arch/powerpc/oprofile/cell/spu_task_sync.c +++ b/trunk/arch/powerpc/oprofile/cell/spu_task_sync.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "pr_util.h" diff --git a/trunk/arch/powerpc/oprofile/cell/vma_map.c b/trunk/arch/powerpc/oprofile/cell/vma_map.c index c579b16845da..c591339daf58 100644 --- a/trunk/arch/powerpc/oprofile/cell/vma_map.c +++ b/trunk/arch/powerpc/oprofile/cell/vma_map.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "pr_util.h" diff --git a/trunk/arch/powerpc/platforms/44x/warp.c b/trunk/arch/powerpc/platforms/44x/warp.c index 8f771395f424..e5c1b096c3e1 100644 --- a/trunk/arch/powerpc/platforms/44x/warp.c +++ b/trunk/arch/powerpc/platforms/44x/warp.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index fda7c2a18282..2b8d8ef32e4e 100644 --- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index a60ee39d3b78..5d7cc88dae6b 100644 --- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpt.c @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index d4f8be307cd5..929d017535a3 100644 --- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c @@ -481,8 +481,6 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match) if (rc) goto err_bcom_rx_irq; - lpbfifo.dma_irqs_enabled = 1; - /* Request the Bestcomm transmit (memory --> fifo) task and IRQ */ lpbfifo.bcom_tx_task = bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA, diff --git a/trunk/arch/powerpc/platforms/82xx/ep8248e.c b/trunk/arch/powerpc/platforms/82xx/ep8248e.c index f21555d3395a..f9aee182e6f7 100644 --- a/trunk/arch/powerpc/platforms/82xx/ep8248e.c +++ b/trunk/arch/powerpc/platforms/82xx/ep8248e.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/trunk/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 5a55d87d6bd6..d4a09f8705b5 100644 --- a/trunk/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/trunk/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/trunk/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index d119a7c1c17a..82a9bcb858b6 100644 --- a/trunk/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/trunk/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/86xx/gef_gpio.c b/trunk/arch/powerpc/platforms/86xx/gef_gpio.c index b8cb08dbd89c..11f7b2b6f49e 100644 --- a/trunk/arch/powerpc/platforms/86xx/gef_gpio.c +++ b/trunk/arch/powerpc/platforms/86xx/gef_gpio.c @@ -26,7 +26,6 @@ #include #include #include -#include #define GEF_GPIO_DIRECT 0x00 #define GEF_GPIO_IN 0x04 diff --git a/trunk/arch/powerpc/platforms/8xx/m8xx_setup.c b/trunk/arch/powerpc/platforms/8xx/m8xx_setup.c index 60168c1f98fe..242954c4293f 100644 --- a/trunk/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/trunk/arch/powerpc/platforms/8xx/m8xx_setup.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/axon_msi.c b/trunk/arch/powerpc/platforms/cell/axon_msi.c index 8efe48192f3f..96fe896f6df3 100644 --- a/trunk/arch/powerpc/platforms/cell/axon_msi.c +++ b/trunk/arch/powerpc/platforms/cell/axon_msi.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/celleb_pci.c b/trunk/arch/powerpc/platforms/cell/celleb_pci.c index 404d1fc04d59..00eaaa71630f 100644 --- a/trunk/arch/powerpc/platforms/cell/celleb_pci.c +++ b/trunk/arch/powerpc/platforms/cell/celleb_pci.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c index a881bbee8de0..7fca09f990ba 100644 --- a/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/iommu.c b/trunk/arch/powerpc/platforms/cell/iommu.c index e3ec4976fae7..ca5bfdfe47f2 100644 --- a/trunk/arch/powerpc/platforms/cell/iommu.c +++ b/trunk/arch/powerpc/platforms/cell/iommu.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/ras.c b/trunk/arch/powerpc/platforms/cell/ras.c index 1d3c4effea10..608fd2b584c9 100644 --- a/trunk/arch/powerpc/platforms/cell/ras.c +++ b/trunk/arch/powerpc/platforms/cell/ras.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/setup.c b/trunk/arch/powerpc/platforms/cell/setup.c index 50385db586bd..59305369f6b2 100644 --- a/trunk/arch/powerpc/platforms/cell/setup.c +++ b/trunk/arch/powerpc/platforms/cell/setup.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spider-pci.c b/trunk/arch/powerpc/platforms/cell/spider-pci.c index ca7731c0b595..5122ec145271 100644 --- a/trunk/arch/powerpc/platforms/cell/spider-pci.c +++ b/trunk/arch/powerpc/platforms/cell/spider-pci.c @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spu_manage.c b/trunk/arch/powerpc/platforms/cell/spu_manage.c index f465d474ad9b..891f18e337a2 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_manage.c +++ b/trunk/arch/powerpc/platforms/cell/spu_manage.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/trunk/arch/powerpc/platforms/cell/spu_priv1_mmio.c index 121aec353f26..1410443731eb 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ b/trunk/arch/powerpc/platforms/cell/spu_priv1_mmio.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spufs/coredump.c b/trunk/arch/powerpc/platforms/cell/spufs/coredump.c index 6cf3ec628527..eea120229cdb 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/coredump.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spufs/file.c b/trunk/arch/powerpc/platforms/cell/spufs/file.c index 5c2808252516..64a4c2d85f7c 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/file.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/file.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/trunk/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index a101abf17504..0e9f325c9ff7 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spufs/sched.c b/trunk/arch/powerpc/platforms/cell/spufs/sched.c index 0b0466284932..4678078fede8 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/sched.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/sched.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/cell/spufs/syscalls.c b/trunk/arch/powerpc/platforms/cell/spufs/syscalls.c index 187a7d32f86a..c23617c6baf3 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/syscalls.c @@ -3,7 +3,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/powerpc/platforms/chrp/nvram.c b/trunk/arch/powerpc/platforms/chrp/nvram.c index ba3588f2d8e0..8efd4244701c 100644 --- a/trunk/arch/powerpc/platforms/chrp/nvram.c +++ b/trunk/arch/powerpc/platforms/chrp/nvram.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/chrp/setup.c b/trunk/arch/powerpc/platforms/chrp/setup.c index 8553cc49e0d6..8f41685d8f42 100644 --- a/trunk/arch/powerpc/platforms/chrp/setup.c +++ b/trunk/arch/powerpc/platforms/chrp/setup.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/iommu.c b/trunk/arch/powerpc/platforms/iseries/iommu.c index ce61cea0afb5..9d53cb481a7c 100644 --- a/trunk/arch/powerpc/platforms/iseries/iommu.c +++ b/trunk/arch/powerpc/platforms/iseries/iommu.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/mf.c b/trunk/arch/powerpc/platforms/iseries/mf.c index d2c1d497846e..6617915bcb1a 100644 --- a/trunk/arch/powerpc/platforms/iseries/mf.c +++ b/trunk/arch/powerpc/platforms/iseries/mf.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/pci.c b/trunk/arch/powerpc/platforms/iseries/pci.c index b841c9a9db87..175aac8ca7e5 100644 --- a/trunk/arch/powerpc/platforms/iseries/pci.c +++ b/trunk/arch/powerpc/platforms/iseries/pci.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/vio.c b/trunk/arch/powerpc/platforms/iseries/vio.c index 00b6730bc48f..2aa8b5631beb 100644 --- a/trunk/arch/powerpc/platforms/iseries/vio.c +++ b/trunk/arch/powerpc/platforms/iseries/vio.c @@ -22,7 +22,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/viopath.c b/trunk/arch/powerpc/platforms/iseries/viopath.c index b5f05d943a90..5aea94f30836 100644 --- a/trunk/arch/powerpc/platforms/iseries/viopath.c +++ b/trunk/arch/powerpc/platforms/iseries/viopath.c @@ -29,7 +29,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/maple/setup.c b/trunk/arch/powerpc/platforms/maple/setup.c index 39df70529d29..0636a3df6978 100644 --- a/trunk/arch/powerpc/platforms/maple/setup.c +++ b/trunk/arch/powerpc/platforms/maple/setup.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pasemi/dma_lib.c b/trunk/arch/powerpc/platforms/pasemi/dma_lib.c index 09695ae50f91..a6152d922243 100644 --- a/trunk/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/trunk/arch/powerpc/platforms/pasemi/dma_lib.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/pasemi/gpio_mdio.c b/trunk/arch/powerpc/platforms/pasemi/gpio_mdio.c index 0f881f64583e..3bf546797cbb 100644 --- a/trunk/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/trunk/arch/powerpc/platforms/pasemi/gpio_mdio.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pasemi/setup.c b/trunk/arch/powerpc/platforms/pasemi/setup.c index ac6fdd973291..242f8095c2df 100644 --- a/trunk/arch/powerpc/platforms/pasemi/setup.c +++ b/trunk/arch/powerpc/platforms/pasemi/setup.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/cpufreq_32.c b/trunk/arch/powerpc/platforms/powermac/cpufreq_32.c index 1e9eba175ff0..d4f127d18141 100644 --- a/trunk/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/trunk/arch/powerpc/platforms/powermac/cpufreq_32.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/cpufreq_64.c b/trunk/arch/powerpc/platforms/powermac/cpufreq_64.c index 3ca09d3ccce3..3ed288e68ec4 100644 --- a/trunk/arch/powerpc/platforms/powermac/cpufreq_64.c +++ b/trunk/arch/powerpc/platforms/powermac/cpufreq_64.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/low_i2c.c b/trunk/arch/powerpc/platforms/powermac/low_i2c.c index f45331ab97cb..345e2da56767 100644 --- a/trunk/arch/powerpc/platforms/powermac/low_i2c.c +++ b/trunk/arch/powerpc/platforms/powermac/low_i2c.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/nvram.c b/trunk/arch/powerpc/platforms/powermac/nvram.c index b1cdcf94aa8e..80a5258d0364 100644 --- a/trunk/arch/powerpc/platforms/powermac/nvram.c +++ b/trunk/arch/powerpc/platforms/powermac/nvram.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/pfunc_core.c b/trunk/arch/powerpc/platforms/powermac/pfunc_core.c index cec635942657..ede49e78a8da 100644 --- a/trunk/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/trunk/arch/powerpc/platforms/powermac/pfunc_core.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/powermac/setup.c b/trunk/arch/powerpc/platforms/powermac/setup.c index 15c2241f9c72..c20522656367 100644 --- a/trunk/arch/powerpc/platforms/powermac/setup.c +++ b/trunk/arch/powerpc/platforms/powermac/setup.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/ps3/device-init.c b/trunk/arch/powerpc/platforms/ps3/device-init.c index b341018326df..bb028f165fb3 100644 --- a/trunk/arch/powerpc/platforms/ps3/device-init.c +++ b/trunk/arch/powerpc/platforms/ps3/device-init.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/ps3/mm.c b/trunk/arch/powerpc/platforms/ps3/mm.c index 7925751e464a..e81b028a2a48 100644 --- a/trunk/arch/powerpc/platforms/ps3/mm.c +++ b/trunk/arch/powerpc/platforms/ps3/mm.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/ps3/os-area.c b/trunk/arch/powerpc/platforms/ps3/os-area.c index dd521a181f23..d6487a9c8019 100644 --- a/trunk/arch/powerpc/platforms/ps3/os-area.c +++ b/trunk/arch/powerpc/platforms/ps3/os-area.c @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/powerpc/platforms/ps3/spu.c b/trunk/arch/powerpc/platforms/ps3/spu.c index 39a472e9e80f..b3c6a993f9f3 100644 --- a/trunk/arch/powerpc/platforms/ps3/spu.c +++ b/trunk/arch/powerpc/platforms/ps3/spu.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/ps3/system-bus.c b/trunk/arch/powerpc/platforms/ps3/system-bus.c index 6d09f5e3e7e4..e34b305a7a52 100644 --- a/trunk/arch/powerpc/platforms/ps3/system-bus.c +++ b/trunk/arch/powerpc/platforms/ps3/system-bus.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/cmm.c b/trunk/arch/powerpc/platforms/pseries/cmm.c index f4803868642c..a277f2e28dbc 100644 --- a/trunk/arch/powerpc/platforms/pseries/cmm.c +++ b/trunk/arch/powerpc/platforms/pseries/cmm.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/dlpar.c b/trunk/arch/powerpc/platforms/pseries/dlpar.c index e1682bc168a3..37bce52526da 100644 --- a/trunk/arch/powerpc/platforms/pseries/dlpar.c +++ b/trunk/arch/powerpc/platforms/pseries/dlpar.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "offline_states.h" #include diff --git a/trunk/arch/powerpc/platforms/pseries/dtl.c b/trunk/arch/powerpc/platforms/pseries/dtl.c index a00addb55945..c5f3116b6ca5 100644 --- a/trunk/arch/powerpc/platforms/pseries/dtl.c +++ b/trunk/arch/powerpc/platforms/pseries/dtl.c @@ -21,7 +21,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/eeh_cache.c b/trunk/arch/powerpc/platforms/pseries/eeh_cache.c index 30b987b73c20..ce37040af870 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh_cache.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/eeh_event.c b/trunk/arch/powerpc/platforms/pseries/eeh_event.c index 2ec500c130b5..ec5df8f519c7 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh_event.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh_event.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/nvram.c b/trunk/arch/powerpc/platforms/pseries/nvram.c index bc3c7f2abd79..42f7e384e6c4 100644 --- a/trunk/arch/powerpc/platforms/pseries/nvram.c +++ b/trunk/arch/powerpc/platforms/pseries/nvram.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/phyp_dump.c b/trunk/arch/powerpc/platforms/pseries/phyp_dump.c index 7ebd9e88d369..225a50ab14be 100644 --- a/trunk/arch/powerpc/platforms/pseries/phyp_dump.c +++ b/trunk/arch/powerpc/platforms/pseries/phyp_dump.c @@ -11,7 +11,6 @@ * */ -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/ras.c b/trunk/arch/powerpc/platforms/pseries/ras.c index db940d2c39a0..d20b96e22c2e 100644 --- a/trunk/arch/powerpc/platforms/pseries/ras.c +++ b/trunk/arch/powerpc/platforms/pseries/ras.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/reconfig.c b/trunk/arch/powerpc/platforms/pseries/reconfig.c index 1a58637bcea5..a2305d29bbbd 100644 --- a/trunk/arch/powerpc/platforms/pseries/reconfig.c +++ b/trunk/arch/powerpc/platforms/pseries/reconfig.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/scanlog.c b/trunk/arch/powerpc/platforms/pseries/scanlog.c index 80e9e7652a4d..1b45c458f952 100644 --- a/trunk/arch/powerpc/platforms/pseries/scanlog.c +++ b/trunk/arch/powerpc/platforms/pseries/scanlog.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/pseries/setup.c b/trunk/arch/powerpc/platforms/pseries/setup.c index 6710761bf60f..ca5f2e10972c 100644 --- a/trunk/arch/powerpc/platforms/pseries/setup.c +++ b/trunk/arch/powerpc/platforms/pseries/setup.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/cpm1.c b/trunk/arch/powerpc/sysdev/cpm1.c index 4dae3698bf24..ecad10d4e928 100644 --- a/trunk/arch/powerpc/sysdev/cpm1.c +++ b/trunk/arch/powerpc/sysdev/cpm1.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/cpm_common.c b/trunk/arch/powerpc/sysdev/cpm_common.c index 88b9812c854f..9de72c96e6d1 100644 --- a/trunk/arch/powerpc/sysdev/cpm_common.c +++ b/trunk/arch/powerpc/sysdev/cpm_common.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/sysdev/dart_iommu.c b/trunk/arch/powerpc/sysdev/dart_iommu.c index c8b96ed7c015..bafc3f85360d 100644 --- a/trunk/arch/powerpc/sysdev/dart_iommu.c +++ b/trunk/arch/powerpc/sysdev/dart_iommu.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/fsl_gtm.c b/trunk/arch/powerpc/sysdev/fsl_gtm.c index eca4545dd52e..714ec02fed2e 100644 --- a/trunk/arch/powerpc/sysdev/fsl_gtm.c +++ b/trunk/arch/powerpc/sysdev/fsl_gtm.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #define GTCFR_STP(x) ((x) & 1 ? 1 << 5 : 1 << 1) diff --git a/trunk/arch/powerpc/sysdev/fsl_msi.c b/trunk/arch/powerpc/sysdev/fsl_msi.c index 3482e3fd89c0..e094367d7739 100644 --- a/trunk/arch/powerpc/sysdev/fsl_msi.c +++ b/trunk/arch/powerpc/sysdev/fsl_msi.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/fsl_pci.c b/trunk/arch/powerpc/sysdev/fsl_pci.c index a14760fe513a..e1a028c1f18d 100644 --- a/trunk/arch/powerpc/sysdev/fsl_pci.c +++ b/trunk/arch/powerpc/sysdev/fsl_pci.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/sysdev/fsl_rio.c b/trunk/arch/powerpc/sysdev/fsl_rio.c index 71fba88f50db..757a83fe5e59 100644 --- a/trunk/arch/powerpc/sysdev/fsl_rio.c +++ b/trunk/arch/powerpc/sysdev/fsl_rio.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/powerpc/sysdev/mpc8xxx_gpio.c b/trunk/arch/powerpc/sysdev/mpc8xxx_gpio.c index 6478eb10691a..ee1c0e1cf4a7 100644 --- a/trunk/arch/powerpc/sysdev/mpc8xxx_gpio.c +++ b/trunk/arch/powerpc/sysdev/mpc8xxx_gpio.c @@ -15,7 +15,6 @@ #include #include #include -#include #define MPC8XXX_GPIO_PINS 32 diff --git a/trunk/arch/powerpc/sysdev/mpic.c b/trunk/arch/powerpc/sysdev/mpic.c index 260295b10557..339e8a3e26d2 100644 --- a/trunk/arch/powerpc/sysdev/mpic.c +++ b/trunk/arch/powerpc/sysdev/mpic.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/sysdev/msi_bitmap.c b/trunk/arch/powerpc/sysdev/msi_bitmap.c index 5287e95cec3a..5a32cbef9b6c 100644 --- a/trunk/arch/powerpc/sysdev/msi_bitmap.c +++ b/trunk/arch/powerpc/sysdev/msi_bitmap.c @@ -8,7 +8,6 @@ * */ -#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/of_rtc.c b/trunk/arch/powerpc/sysdev/of_rtc.c index c9e803f3e267..3d54450640c1 100644 --- a/trunk/arch/powerpc/sysdev/of_rtc.c +++ b/trunk/arch/powerpc/sysdev/of_rtc.c @@ -12,7 +12,6 @@ #include #include #include -#include static __initdata struct { const char *compatible; diff --git a/trunk/arch/powerpc/sysdev/pmi.c b/trunk/arch/powerpc/sysdev/pmi.c index 652652db4ce2..aaa915998eb6 100644 --- a/trunk/arch/powerpc/sysdev/pmi.c +++ b/trunk/arch/powerpc/sysdev/pmi.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/ppc4xx_gpio.c b/trunk/arch/powerpc/sysdev/ppc4xx_gpio.c index 3812fc366bec..110efe2a54fc 100644 --- a/trunk/arch/powerpc/sysdev/ppc4xx_gpio.c +++ b/trunk/arch/powerpc/sysdev/ppc4xx_gpio.c @@ -29,7 +29,6 @@ #include #include #include -#include #define GPIO_MASK(gpio) (0x80000000 >> (gpio)) #define GPIO_MASK2(gpio) (0xc0000000 >> ((gpio) * 2)) diff --git a/trunk/arch/powerpc/sysdev/ppc4xx_pci.c b/trunk/arch/powerpc/sysdev/ppc4xx_pci.c index 106d767bf65b..8aa33021e50b 100644 --- a/trunk/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/trunk/arch/powerpc/sysdev/ppc4xx_pci.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/powerpc/sysdev/qe_lib/gpio.c b/trunk/arch/powerpc/sysdev/qe_lib/gpio.c index dc8f8d618074..8e7a7767dd5c 100644 --- a/trunk/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/trunk/arch/powerpc/sysdev/qe_lib/gpio.c @@ -19,7 +19,6 @@ #include #include #include -#include #include struct qe_gpio_chip { diff --git a/trunk/arch/powerpc/sysdev/qe_lib/ucc.c b/trunk/arch/powerpc/sysdev/qe_lib/ucc.c index fa589b21dbcd..ebb442ea1917 100644 --- a/trunk/arch/powerpc/sysdev/qe_lib/ucc.c +++ b/trunk/arch/powerpc/sysdev/qe_lib/ucc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/powerpc/sysdev/simple_gpio.c b/trunk/arch/powerpc/sysdev/simple_gpio.c index d5fb173e588c..43c4569e24b7 100644 --- a/trunk/arch/powerpc/sysdev/simple_gpio.c +++ b/trunk/arch/powerpc/sysdev/simple_gpio.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "simple_gpio.h" diff --git a/trunk/arch/powerpc/sysdev/tsi108_pci.c b/trunk/arch/powerpc/sysdev/tsi108_pci.c index 0ab9281e49ae..595034cfb85a 100644 --- a/trunk/arch/powerpc/sysdev/tsi108_pci.c +++ b/trunk/arch/powerpc/sysdev/tsi108_pci.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/s390/appldata/appldata_mem.c b/trunk/arch/s390/appldata/appldata_mem.c index e43fe7537031..4188cbe63a54 100644 --- a/trunk/arch/s390/appldata/appldata_mem.c +++ b/trunk/arch/s390/appldata/appldata_mem.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/s390/appldata/appldata_net_sum.c b/trunk/arch/s390/appldata/appldata_net_sum.c index 9a9586f4103f..4ce7fa95880f 100644 --- a/trunk/arch/s390/appldata/appldata_net_sum.c +++ b/trunk/arch/s390/appldata/appldata_net_sum.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/s390/crypto/prng.c b/trunk/arch/s390/crypto/prng.c index aa819dac2360..a3209906739e 100644 --- a/trunk/arch/s390/crypto/prng.c +++ b/trunk/arch/s390/crypto/prng.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/s390/hypfs/hypfs_diag.c b/trunk/arch/s390/hypfs/hypfs_diag.c index 5b1acdba6495..87cf523192e9 100644 --- a/trunk/arch/s390/hypfs/hypfs_diag.c +++ b/trunk/arch/s390/hypfs/hypfs_diag.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/s390/hypfs/inode.c b/trunk/arch/s390/hypfs/inode.c index c53f8ac825ca..cd128b07beda 100644 --- a/trunk/arch/s390/hypfs/inode.c +++ b/trunk/arch/s390/hypfs/inode.c @@ -14,8 +14,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/trunk/arch/s390/kernel/compat_linux.c b/trunk/arch/s390/kernel/compat_linux.c index 73b624ed9cd8..11c3aba664ea 100644 --- a/trunk/arch/s390/kernel/compat_linux.c +++ b/trunk/arch/s390/kernel/compat_linux.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -51,7 +52,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/s390/kernel/ipl.c b/trunk/arch/s390/kernel/ipl.c index 72c8b0d070c8..7eedbbcb54aa 100644 --- a/trunk/arch/s390/kernel/ipl.c +++ b/trunk/arch/s390/kernel/ipl.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/kernel/kprobes.c b/trunk/arch/s390/kernel/kprobes.c index 3d34eef5a2c3..86783efa24ee 100644 --- a/trunk/arch/s390/kernel/kprobes.c +++ b/trunk/arch/s390/kernel/kprobes.c @@ -29,7 +29,6 @@ #include #include #include -#include DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); diff --git a/trunk/arch/s390/kernel/process.c b/trunk/arch/s390/kernel/process.c index 1039fdea15b5..00b6d1d292f2 100644 --- a/trunk/arch/s390/kernel/process.c +++ b/trunk/arch/s390/kernel/process.c @@ -16,9 +16,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/trunk/arch/s390/kernel/setup.c b/trunk/arch/s390/kernel/setup.c index 91625f759ccd..ba363d99de43 100644 --- a/trunk/arch/s390/kernel/setup.c +++ b/trunk/arch/s390/kernel/setup.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index e4d98de83dd8..d7d24fc3d6b7 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/kernel/sysinfo.c b/trunk/arch/s390/kernel/sysinfo.c index a0ffc7717ed6..b5e75e1061c8 100644 --- a/trunk/arch/s390/kernel/sysinfo.c +++ b/trunk/arch/s390/kernel/sysinfo.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/kernel/time.c b/trunk/arch/s390/kernel/time.c index fba6dec156bf..aa2483e460f3 100644 --- a/trunk/arch/s390/kernel/time.c +++ b/trunk/arch/s390/kernel/time.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/kvm/interrupt.c b/trunk/arch/s390/kvm/interrupt.c index 35c21bf910c5..834774d8d5f3 100644 --- a/trunk/arch/s390/kvm/interrupt.c +++ b/trunk/arch/s390/kvm/interrupt.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include "kvm-s390.h" diff --git a/trunk/arch/s390/kvm/priv.c b/trunk/arch/s390/kvm/priv.c index 44205507717c..28c55677eb39 100644 --- a/trunk/arch/s390/kvm/priv.c +++ b/trunk/arch/s390/kvm/priv.c @@ -12,7 +12,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/s390/kvm/sigp.c b/trunk/arch/s390/kvm/sigp.c index eff3c5989b46..241a48459b66 100644 --- a/trunk/arch/s390/kvm/sigp.c +++ b/trunk/arch/s390/kvm/sigp.c @@ -14,7 +14,6 @@ #include #include -#include #include "gaccess.h" #include "kvm-s390.h" diff --git a/trunk/arch/s390/mm/cmm.c b/trunk/arch/s390/mm/cmm.c index f87b34731e1d..f16bd04e39e9 100644 --- a/trunk/arch/s390/mm/cmm.c +++ b/trunk/arch/s390/mm/cmm.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/mm/init.c b/trunk/arch/s390/mm/init.c index acc91c75bc94..d5865e4024ce 100644 --- a/trunk/arch/s390/mm/init.c +++ b/trunk/arch/s390/mm/init.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/s390/mm/page-states.c b/trunk/arch/s390/mm/page-states.c index a90d45e9dfb0..098923ae458f 100644 --- a/trunk/arch/s390/mm/page-states.c +++ b/trunk/arch/s390/mm/page-states.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #define ESSA_SET_STABLE 1 diff --git a/trunk/arch/s390/mm/pgtable.c b/trunk/arch/s390/mm/pgtable.c index 8d999249d357..ad621e06ada3 100644 --- a/trunk/arch/s390/mm/pgtable.c +++ b/trunk/arch/s390/mm/pgtable.c @@ -6,11 +6,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/trunk/arch/s390/mm/vmem.c b/trunk/arch/s390/mm/vmem.c index 8ea3144b45b8..300ab012b0fd 100644 --- a/trunk/arch/s390/mm/vmem.c +++ b/trunk/arch/s390/mm/vmem.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/score/kernel/sys_score.c b/trunk/arch/score/kernel/sys_score.c index 651096ff8db4..856ed68a58e6 100644 --- a/trunk/arch/score/kernel/sys_score.c +++ b/trunk/arch/score/kernel/sys_score.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/score/mm/init.c b/trunk/arch/score/mm/init.c index 50fdec54c70a..7f001bbedb00 100644 --- a/trunk/arch/score/mm/init.c +++ b/trunk/arch/score/mm/init.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sh/configs/ecovec24_defconfig b/trunk/arch/sh/configs/ecovec24_defconfig index 6041c66dd10e..18e3356406f3 100644 --- a/trunk/arch/sh/configs/ecovec24_defconfig +++ b/trunk/arch/sh/configs/ecovec24_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.34-rc2 -# Mon Mar 29 02:21:58 2010 +# Linux kernel version: 2.6.33-rc2 +# Mon Jan 4 11:20:36 2010 # CONFIG_SUPERH=y CONFIG_SUPERH32=y @@ -13,8 +13,8 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y CONFIG_IRQ_PER_CPU=y -CONFIG_SPARSE_IRQ=y CONFIG_GENERIC_GPIO=y CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -32,7 +32,6 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_DMA_NONCOHERENT=y -CONFIG_NEED_DMA_MAP_STATE=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_CONSTRUCTORS=y @@ -48,11 +47,9 @@ CONFIG_LOCALVERSION="" CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_LZO=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set -# CONFIG_KERNEL_LZO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y @@ -74,8 +71,14 @@ CONFIG_RCU_FANOUT=32 # CONFIG_TREE_RCU_TRACE is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 +CONFIG_GROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_RT_GROUP_SCHED is not set +CONFIG_USER_SCHED=y +# CONFIG_CGROUP_SCHED is not set # CONFIG_CGROUPS is not set -# CONFIG_SYSFS_DEPRECATED_V2 is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y # CONFIG_RELAY is not set # CONFIG_NAMESPACES is not set # CONFIG_BLK_DEV_INITRD is not set @@ -104,7 +107,7 @@ CONFIG_PERF_USE_VMALLOC=y # # Kernel Performance Events And Counters # -CONFIG_PERF_EVENTS=y +# CONFIG_PERF_EVENTS is not set # CONFIG_PERF_COUNTERS is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=y @@ -113,13 +116,13 @@ CONFIG_SLAB=y # CONFIG_SLOB is not set # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y # # GCOV-based kernel profiling @@ -231,12 +234,12 @@ CONFIG_CPU_SUBTYPE_SH7724=y CONFIG_QUICKLIST=y CONFIG_MMU=y CONFIG_PAGE_OFFSET=0x80000000 -CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_MEMORY_START=0x08000000 CONFIG_MEMORY_SIZE=0x10000000 CONFIG_29BIT=y -# CONFIG_PMB is not set -CONFIG_X2TLB=y +# CONFIG_PMB_ENABLE is not set +# CONFIG_X2TLB is not set CONFIG_VSYSCALL=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y @@ -244,8 +247,6 @@ CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_MAX_ACTIVE_REGIONS=1 CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_IOREMAP_FIXED=y -CONFIG_UNCACHED_MAPPING=y CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set @@ -261,7 +262,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 -CONFIG_NR_QUICK=1 +CONFIG_NR_QUICK=2 # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 @@ -336,6 +337,7 @@ CONFIG_SECCOMP=y # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_GUSA=y +# CONFIG_SPARSE_IRQ is not set # # Boot options @@ -345,7 +347,7 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000 CONFIG_ENTRY_OFFSET=0x00001000 CONFIG_CMDLINE_OVERWRITE=y # CONFIG_CMDLINE_EXTEND is not set -CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=248M memchunk.vpu=8m memchunk.veu0=4m" +CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=120M memchunk.vpu=4m" # # Bus options @@ -371,7 +373,6 @@ CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # CONFIG_HIBERNATION is not set CONFIG_PM_RUNTIME=y -CONFIG_PM_OPS=y # CONFIG_CPU_IDLE is not set CONFIG_NET=y @@ -379,6 +380,7 @@ CONFIG_NET=y # Networking options # CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -443,45 +445,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set -CONFIG_IRDA=y - -# -# IrDA protocols -# -# CONFIG_IRLAN is not set -# CONFIG_IRCOMM is not set -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -# CONFIG_IRDA_CACHE_LAST_LSAP is not set -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -# CONFIG_IRTTY_SIR is not set - -# -# Dongle support -# -CONFIG_SH_SIR=y -# CONFIG_KINGSUN_DONGLE is not set -# CONFIG_KSDAZZLE_DONGLE is not set -# CONFIG_KS959_DONGLE is not set - -# -# FIR device drivers -# -# CONFIG_USB_IRDA is not set -# CONFIG_SIGMATEL_FIR is not set -# CONFIG_MCS_FIR is not set +# CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set CONFIG_WIRELESS=y @@ -592,7 +556,6 @@ CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_NANDSIM is not set # CONFIG_MTD_NAND_PLATFORM is not set # CONFIG_MTD_ALAUDA is not set -# CONFIG_MTD_NAND_SH_FLCTL is not set # CONFIG_MTD_ONENAND is not set # @@ -634,7 +597,6 @@ CONFIG_MISC_DEVICES=y # CONFIG_ICS932S401 is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_ISL29003 is not set -# CONFIG_SENSORS_TSL2550 is not set # CONFIG_DS1682 is not set # CONFIG_TI_DAC7512 is not set # CONFIG_C2PORT is not set @@ -654,7 +616,6 @@ CONFIG_HAVE_IDE=y # # SCSI device support # -CONFIG_SCSI_MOD=y # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y CONFIG_SCSI_DMA=y @@ -807,29 +768,7 @@ CONFIG_KEYBOARD_SH_KEYSC=y # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_AD7877 is not set -# CONFIG_TOUCHSCREEN_AD7879_I2C is not set -# CONFIG_TOUCHSCREEN_AD7879_SPI is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_DYNAPRO is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -CONFIG_TOUCHSCREEN_TSC2007=y -# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # @@ -863,10 +802,10 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6 CONFIG_SERIAL_SH_SCI_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_TIMBERDALE is not set CONFIG_UNIX98_PTYS=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -# CONFIG_LEGACY_PTYS is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set @@ -891,7 +830,6 @@ CONFIG_I2C_HELPER_AUTO=y # CONFIG_I2C_OCORES is not set CONFIG_I2C_SH_MOBILE=y # CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set # # External I2C/SMBus adapter drivers @@ -905,9 +843,15 @@ CONFIG_I2C_SH_MOBILE=y # # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set CONFIG_SPI=y CONFIG_SPI_MASTER=y @@ -938,16 +882,13 @@ CONFIG_GPIOLIB=y # # Memory mapped GPIO expanders: # -# CONFIG_GPIO_IT8761E is not set # # I2C GPIO expanders: # -# CONFIG_GPIO_MAX7300 is not set # CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_PCA953X is not set # CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_ADP5588 is not set # # PCI GPIO expanders: @@ -978,26 +919,23 @@ CONFIG_SSB_POSSIBLE=y # # Multifunction device drivers # -CONFIG_MFD_CORE=y -# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_CORE is not set # CONFIG_MFD_SM501 is not set -CONFIG_MFD_SH_MOBILE_SDHI=y +# CONFIG_MFD_SH_MOBILE_SDHI is not set # CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set # CONFIG_TPS65010 is not set # CONFIG_TWL4030_CORE is not set # CONFIG_MFD_TMIO is not set # CONFIG_PMIC_DA903X is not set # CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_WM8400 is not set # CONFIG_MFD_WM831X is not set # CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set # CONFIG_MFD_PCF50633 is not set # CONFIG_MFD_MC13783 is not set # CONFIG_AB3100_CORE is not set # CONFIG_EZX_PCAP is not set +# CONFIG_MFD_88PM8607 is not set # CONFIG_AB4500_CORE is not set # CONFIG_REGULATOR is not set CONFIG_MEDIA_SUPPORT=y @@ -1047,10 +985,10 @@ CONFIG_SOC_CAMERA=y # CONFIG_SOC_CAMERA_MT9M001 is not set # CONFIG_SOC_CAMERA_MT9M111 is not set # CONFIG_SOC_CAMERA_MT9T031 is not set -CONFIG_SOC_CAMERA_MT9T112=y +# CONFIG_SOC_CAMERA_MT9T112 is not set # CONFIG_SOC_CAMERA_MT9V022 is not set # CONFIG_SOC_CAMERA_RJ54N1 is not set -CONFIG_SOC_CAMERA_TW9910=y +# CONFIG_SOC_CAMERA_TW9910 is not set # CONFIG_SOC_CAMERA_PLATFORM is not set # CONFIG_SOC_CAMERA_OV772X is not set # CONFIG_SOC_CAMERA_OV9640 is not set @@ -1063,7 +1001,6 @@ CONFIG_RADIO_ADAPTERS=y # CONFIG_RADIO_SI470X is not set # CONFIG_USB_MR800 is not set # CONFIG_RADIO_TEA5764 is not set -# CONFIG_RADIO_SAA7706H is not set # CONFIG_RADIO_TEF6862 is not set # CONFIG_DAB is not set @@ -1097,7 +1034,6 @@ CONFIG_FB_DEFERRED_IO=y # # CONFIG_FB_S1D13XXX is not set CONFIG_FB_SH_MOBILE_LCDC=y -# CONFIG_FB_TMIO is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set @@ -1126,46 +1062,7 @@ CONFIG_LOGO=y # CONFIG_LOGO_SUPERH_MONO is not set # CONFIG_LOGO_SUPERH_VGA16 is not set CONFIG_LOGO_SUPERH_CLUT224=y -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_JACK=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_SEQ_DUMMY=y -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_SEQUENCER_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_SUPERH=y -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y - -# -# SoC Audio support for SuperH -# -CONFIG_SND_SOC_SH4_FSI=y -# CONFIG_SND_FSI_AK4642 is not set -CONFIG_SND_FSI_DA7210=y -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SOC_DA7210=y -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HIDRAW is not set @@ -1180,7 +1077,6 @@ CONFIG_USB_HID=y # # Special HID drivers # -# CONFIG_HID_3M_PCT is not set # CONFIG_HID_A4TECH is not set # CONFIG_HID_APPLE is not set # CONFIG_HID_BELKIN is not set @@ -1195,16 +1091,12 @@ CONFIG_USB_HID=y # CONFIG_HID_KENSINGTON is not set # CONFIG_HID_LOGITECH is not set # CONFIG_HID_MICROSOFT is not set -# CONFIG_HID_MOSART is not set # CONFIG_HID_MONTEREY is not set # CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set # CONFIG_HID_PANTHERLORD is not set # CONFIG_HID_PETALYNX is not set -# CONFIG_HID_QUANTA is not set # CONFIG_HID_SAMSUNG is not set # CONFIG_HID_SONY is not set -# CONFIG_HID_STANTUM is not set # CONFIG_HID_SUNPLUS is not set # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set @@ -1244,7 +1136,6 @@ CONFIG_USB_MON=y # CONFIG_USB_SL811_HCD is not set CONFIG_USB_R8A66597_HCD=y # CONFIG_USB_HWA_HCD is not set -# CONFIG_USB_GADGET_MUSB_HDRC is not set # # USB Device Class drivers @@ -1297,6 +1188,7 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set @@ -1308,45 +1200,8 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=2 -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_ATMEL_USBA is not set -# CONFIG_USB_GADGET_FSL_USB2 is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_PXA25X is not set -CONFIG_USB_GADGET_R8A66597=y -CONFIG_USB_R8A66597=y -# CONFIG_USB_GADGET_PXA27X is not set -# CONFIG_USB_GADGET_S3C_HSOTG is not set -# CONFIG_USB_GADGET_IMX is not set -# CONFIG_USB_GADGET_S3C2410 is not set -# CONFIG_USB_GADGET_M66592 is not set -# CONFIG_USB_GADGET_AMD5536UDC is not set -# CONFIG_USB_GADGET_FSL_QE is not set -# CONFIG_USB_GADGET_CI13XXX is not set -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LANGWELL is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -CONFIG_USB_GADGET_DUALSPEED=y -# CONFIG_USB_ZERO is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_GADGETFS is not set -CONFIG_USB_FILE_STORAGE=m -# CONFIG_USB_FILE_STORAGE_TEST is not set -# CONFIG_USB_MASS_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set -# CONFIG_USB_MIDI_GADGET is not set -# CONFIG_USB_G_PRINTER is not set -# CONFIG_USB_CDC_COMPOSITE is not set -# CONFIG_USB_G_NOKIA is not set -# CONFIG_USB_G_MULTI is not set +# CONFIG_USB_VST is not set +# CONFIG_USB_GADGET is not set # # OTG and related infrastructure @@ -1369,8 +1224,10 @@ CONFIG_MMC_BLOCK_BOUNCE=y # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_AT91 is not set +# CONFIG_MMC_ATMELMCI is not set CONFIG_MMC_SPI=y -CONFIG_MMC_TMIO=y +# CONFIG_MMC_TMIO is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set # CONFIG_ACCESSIBILITY is not set @@ -1396,10 +1253,10 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_MAX6900 is not set -CONFIG_RTC_DRV_RS5C372=y +# CONFIG_RTC_DRV_RS5C372 is not set # CONFIG_RTC_DRV_ISL1208 is not set # CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set +CONFIG_RTC_DRV_PCF8563=y # CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_M41T80 is not set # CONFIG_RTC_DRV_BQ32K is not set @@ -1446,6 +1303,8 @@ CONFIG_RTC_DRV_RS5C372=y CONFIG_UIO=y # CONFIG_UIO_PDRV is not set CONFIG_UIO_PDRV_GENIRQ=y +# CONFIG_UIO_SMX is not set +# CONFIG_UIO_SERCOS3 is not set # # TI VLYNQ @@ -1531,7 +1390,6 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_EFS_FS is not set # CONFIG_JFFS2_FS is not set # CONFIG_UBIFS_FS is not set -# CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set # CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set @@ -1560,7 +1418,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set -# CONFIG_CEPH_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1630,7 +1487,6 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_LKDTM is not set # CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_HAVE_FUNCTION_TRACER=y @@ -1762,7 +1618,7 @@ CONFIG_CRYPTO_HW=y # CONFIG_BITREVERSE=y CONFIG_GENERIC_FIND_LAST_BIT=y -CONFIG_CRC_CCITT=y +# CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set CONFIG_CRC_T10DIF=y CONFIG_CRC_ITU_T=y diff --git a/trunk/arch/sh/drivers/dma/dma-api.c b/trunk/arch/sh/drivers/dma/dma-api.c index 4a277224a871..727126e907e3 100644 --- a/trunk/arch/sh/drivers/dma/dma-api.c +++ b/trunk/arch/sh/drivers/dma/dma-api.c @@ -17,7 +17,6 @@ #include #include #include -#include #include DEFINE_SPINLOCK(dma_spin_lock); diff --git a/trunk/arch/sh/drivers/dma/dmabrg.c b/trunk/arch/sh/drivers/dma/dmabrg.c index 6ab9c4a15439..72622e307613 100644 --- a/trunk/arch/sh/drivers/dma/dmabrg.c +++ b/trunk/arch/sh/drivers/dma/dmabrg.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/sh/drivers/heartbeat.c b/trunk/arch/sh/drivers/heartbeat.c index 7efc9c354fc7..2acbc793032d 100644 --- a/trunk/arch/sh/drivers/heartbeat.c +++ b/trunk/arch/sh/drivers/heartbeat.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define DRV_NAME "heartbeat" diff --git a/trunk/arch/sh/drivers/pci/pcie-sh7786.c b/trunk/arch/sh/drivers/pci/pcie-sh7786.c index 68cb9b0ac9d2..ae91a2dd9183 100644 --- a/trunk/arch/sh/drivers/pci/pcie-sh7786.c +++ b/trunk/arch/sh/drivers/pci/pcie-sh7786.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "pcie-sh7786.h" #include diff --git a/trunk/arch/sh/drivers/push-switch.c b/trunk/arch/sh/drivers/push-switch.c index 7b42c247316c..725be6de589b 100644 --- a/trunk/arch/sh/drivers/push-switch.c +++ b/trunk/arch/sh/drivers/push-switch.c @@ -8,7 +8,6 @@ * for more details. */ #include -#include #include #include #include diff --git a/trunk/arch/sh/include/asm/elf.h b/trunk/arch/sh/include/asm/elf.h index ce830faeebbf..ac04255022b6 100644 --- a/trunk/arch/sh/include/asm/elf.h +++ b/trunk/arch/sh/include/asm/elf.h @@ -211,9 +211,7 @@ extern void __kernel_vsyscall; #define VSYSCALL_AUX_ENT \ if (vdso_enabled) \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ - else \ - NEW_AUX_ENT(AT_IGNORE, 0); + NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); #else #define VSYSCALL_AUX_ENT #endif /* CONFIG_VSYSCALL */ @@ -221,7 +219,7 @@ extern void __kernel_vsyscall; #ifdef CONFIG_SH_FPU #define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT) #else -#define FPU_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0) +#define FPU_AUX_ENT #endif extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; diff --git a/trunk/arch/sh/include/cpu-sh4/cpu/mmu_context.h b/trunk/arch/sh/include/cpu-sh4/cpu/mmu_context.h index 5963124c1d4a..310ec92f2759 100644 --- a/trunk/arch/sh/include/cpu-sh4/cpu/mmu_context.h +++ b/trunk/arch/sh/include/cpu-sh4/cpu/mmu_context.h @@ -30,8 +30,6 @@ #define MMUCR_URB 0x00FC0000 #define MMUCR_URB_SHIFT 18 #define MMUCR_URB_NENTRIES 64 -#define MMUCR_URC 0x0000FC00 -#define MMUCR_URC_SHIFT 10 #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) #define MMUCR_SE (1 << 4) diff --git a/trunk/arch/sh/kernel/cpu/fpu.c b/trunk/arch/sh/kernel/cpu/fpu.c index 7f1b70cace35..f059ed62cf57 100644 --- a/trunk/arch/sh/kernel/cpu/fpu.c +++ b/trunk/arch/sh/kernel/cpu/fpu.c @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/trunk/arch/sh/kernel/cpu/hwblk.c b/trunk/arch/sh/kernel/cpu/hwblk.c index 67a1e811cfe8..c0ad7d46e784 100644 --- a/trunk/arch/sh/kernel/cpu/hwblk.c +++ b/trunk/arch/sh/kernel/cpu/hwblk.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/sh/kernel/cpufreq.c b/trunk/arch/sh/kernel/cpufreq.c index 0fffacea6ed9..dce4f3ff0932 100644 --- a/trunk/arch/sh/kernel/cpufreq.c +++ b/trunk/arch/sh/kernel/cpufreq.c @@ -48,7 +48,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, return -ENODEV; cpus_allowed = current->cpus_allowed; - set_cpus_allowed_ptr(current, cpumask_of(cpu)); + set_cpus_allowed(current, cpumask_of_cpu(cpu)); BUG_ON(smp_processor_id() != cpu); @@ -66,7 +66,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, freqs.flags = 0; cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - set_cpus_allowed_ptr(current, &cpus_allowed); + set_cpus_allowed(current, cpus_allowed); clk_set_rate(cpuclk, freq); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); diff --git a/trunk/arch/sh/kernel/dwarf.c b/trunk/arch/sh/kernel/dwarf.c index a8234b2010d1..94739ee7aa74 100644 --- a/trunk/arch/sh/kernel/dwarf.c +++ b/trunk/arch/sh/kernel/dwarf.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sh/kernel/kprobes.c b/trunk/arch/sh/kernel/kprobes.c index 4049d99f76e1..c96850b061fb 100644 --- a/trunk/arch/sh/kernel/kprobes.c +++ b/trunk/arch/sh/kernel/kprobes.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sh/kernel/process.c b/trunk/arch/sh/kernel/process.c index 17f89aa4e1b3..81add9b9ea6e 100644 --- a/trunk/arch/sh/kernel/process.c +++ b/trunk/arch/sh/kernel/process.c @@ -1,6 +1,5 @@ #include #include -#include #include struct kmem_cache *task_xstate_cachep = NULL; diff --git a/trunk/arch/sh/kernel/process_32.c b/trunk/arch/sh/kernel/process_32.c index 052981972ae6..3cb88f114d7a 100644 --- a/trunk/arch/sh/kernel/process_32.c +++ b/trunk/arch/sh/kernel/process_32.c @@ -15,7 +15,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/arch/sh/kernel/process_64.c b/trunk/arch/sh/kernel/process_64.c index d4ca6480e355..c0d40f671ecd 100644 --- a/trunk/arch/sh/kernel/process_64.c +++ b/trunk/arch/sh/kernel/process_64.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sh/kernel/ptrace_32.c b/trunk/arch/sh/kernel/ptrace_32.c index 7759a9a93211..c625cdab76dd 100644 --- a/trunk/arch/sh/kernel/ptrace_32.c +++ b/trunk/arch/sh/kernel/ptrace_32.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sh/kernel/return_address.c b/trunk/arch/sh/kernel/return_address.c index cbf1dd5372b2..df3ab5811074 100644 --- a/trunk/arch/sh/kernel/return_address.c +++ b/trunk/arch/sh/kernel/return_address.c @@ -9,7 +9,6 @@ * for more details. */ #include -#include #include #ifdef CONFIG_DWARF_UNWINDER @@ -53,5 +52,3 @@ void *return_address(unsigned int depth) } #endif - -EXPORT_SYMBOL_GPL(return_address); diff --git a/trunk/arch/sh/kernel/smp.c b/trunk/arch/sh/kernel/smp.c index 002cc612deef..e124cf7008df 100644 --- a/trunk/arch/sh/kernel/smp.c +++ b/trunk/arch/sh/kernel/smp.c @@ -69,7 +69,6 @@ asmlinkage void __cpuinit start_secondary(void) unsigned int cpu; struct mm_struct *mm = &init_mm; - enable_mmu(); atomic_inc(&mm->mm_count); atomic_inc(&mm->mm_users); current->active_mm = mm; diff --git a/trunk/arch/sh/kernel/vsyscall/vsyscall.c b/trunk/arch/sh/kernel/vsyscall/vsyscall.c index 242117cbad67..3f7e415be86a 100644 --- a/trunk/arch/sh/kernel/vsyscall/vsyscall.c +++ b/trunk/arch/sh/kernel/vsyscall/vsyscall.c @@ -11,6 +11,7 @@ * for more details. */ #include +#include #include #include #include diff --git a/trunk/arch/sh/mm/consistent.c b/trunk/arch/sh/mm/consistent.c index c86a08540258..902967e3f841 100644 --- a/trunk/arch/sh/mm/consistent.c +++ b/trunk/arch/sh/mm/consistent.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sh/mm/hugetlbpage.c b/trunk/arch/sh/mm/hugetlbpage.c index 9163db3e8d15..9304117039c4 100644 --- a/trunk/arch/sh/mm/hugetlbpage.c +++ b/trunk/arch/sh/mm/hugetlbpage.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/sh/mm/init.c b/trunk/arch/sh/mm/init.c index c505de61a5ca..68028e8f26ce 100644 --- a/trunk/arch/sh/mm/init.c +++ b/trunk/arch/sh/mm/init.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sh/mm/ioremap.c b/trunk/arch/sh/mm/ioremap.c index 0c99ec2e7ed8..1ab2385ecefe 100644 --- a/trunk/arch/sh/mm/ioremap.c +++ b/trunk/arch/sh/mm/ioremap.c @@ -14,7 +14,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/arch/sh/mm/ioremap_fixed.c b/trunk/arch/sh/mm/ioremap_fixed.c index efbe84af9983..7f682e5dafcf 100644 --- a/trunk/arch/sh/mm/ioremap_fixed.c +++ b/trunk/arch/sh/mm/ioremap_fixed.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sh/mm/pgtable.c b/trunk/arch/sh/mm/pgtable.c index 26e03a1f7ca4..6f21fb1d8726 100644 --- a/trunk/arch/sh/mm/pgtable.c +++ b/trunk/arch/sh/mm/pgtable.c @@ -1,5 +1,4 @@ #include -#include #define PGALLOC_GFP GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO diff --git a/trunk/arch/sh/mm/pmb.c b/trunk/arch/sh/mm/pmb.c index e43ec600afcf..3cc21933063b 100644 --- a/trunk/arch/sh/mm/pmb.c +++ b/trunk/arch/sh/mm/pmb.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sh/mm/tlb-pteaex.c b/trunk/arch/sh/mm/tlb-pteaex.c index b71db6af8060..bdd0982b56ee 100644 --- a/trunk/arch/sh/mm/tlb-pteaex.c +++ b/trunk/arch/sh/mm/tlb-pteaex.c @@ -77,31 +77,3 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) __raw_writel(asid, MMU_ITLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); back_to_cached(); } - -void local_flush_tlb_all(void) -{ - unsigned long flags, status; - int i; - - /* - * Flush all the TLB. - */ - local_irq_save(flags); - jump_to_uncached(); - - status = __raw_readl(MMUCR); - status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); - - if (status == 0) - status = MMUCR_URB_NENTRIES; - - for (i = 0; i < status; i++) - __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); - - for (i = 0; i < 4; i++) - __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); - - back_to_cached(); - ctrl_barrier(); - local_irq_restore(flags); -} diff --git a/trunk/arch/sh/mm/tlb-sh3.c b/trunk/arch/sh/mm/tlb-sh3.c index 7a940dbfc2e9..4f5f7cbdd508 100644 --- a/trunk/arch/sh/mm/tlb-sh3.c +++ b/trunk/arch/sh/mm/tlb-sh3.c @@ -77,22 +77,3 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) for (i = 0; i < ways; i++) __raw_writel(data, addr + (i << 8)); } - -void local_flush_tlb_all(void) -{ - unsigned long flags, status; - - /* - * Flush all the TLB. - * - * Write to the MMU control register's bit: - * TF-bit for SH-3, TI-bit for SH-4. - * It's same position, bit #2. - */ - local_irq_save(flags); - status = __raw_readl(MMUCR); - status |= 0x04; - __raw_writel(status, MMUCR); - ctrl_barrier(); - local_irq_restore(flags); -} diff --git a/trunk/arch/sh/mm/tlb-sh4.c b/trunk/arch/sh/mm/tlb-sh4.c index cfdf7930d294..ccac77f504a8 100644 --- a/trunk/arch/sh/mm/tlb-sh4.c +++ b/trunk/arch/sh/mm/tlb-sh4.c @@ -80,31 +80,3 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) __raw_writel(data, addr); back_to_cached(); } - -void local_flush_tlb_all(void) -{ - unsigned long flags, status; - int i; - - /* - * Flush all the TLB. - */ - local_irq_save(flags); - jump_to_uncached(); - - status = __raw_readl(MMUCR); - status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); - - if (status == 0) - status = MMUCR_URB_NENTRIES; - - for (i = 0; i < status; i++) - __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); - - for (i = 0; i < 4; i++) - __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); - - back_to_cached(); - ctrl_barrier(); - local_irq_restore(flags); -} diff --git a/trunk/arch/sh/mm/tlb-urb.c b/trunk/arch/sh/mm/tlb-urb.c index c92ce20db39b..bb5b9098956d 100644 --- a/trunk/arch/sh/mm/tlb-urb.c +++ b/trunk/arch/sh/mm/tlb-urb.c @@ -24,9 +24,13 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) local_irq_save(flags); + /* Load the entry into the TLB */ + __update_tlb(vma, addr, pte); + + /* ... and wire it up. */ status = __raw_readl(MMUCR); urb = (status & MMUCR_URB) >> MMUCR_URB_SHIFT; - status &= ~MMUCR_URC; + status &= ~MMUCR_URB; /* * Make sure we're not trying to wire the last TLB entry slot. @@ -35,23 +39,7 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) urb = urb % MMUCR_URB_NENTRIES; - /* - * Insert this entry into the highest non-wired TLB slot (via - * the URC field). - */ - status |= (urb << MMUCR_URC_SHIFT); - __raw_writel(status, MMUCR); - ctrl_barrier(); - - /* Load the entry into the TLB */ - __update_tlb(vma, addr, pte); - - /* ... and wire it up. */ - status = __raw_readl(MMUCR); - - status &= ~MMUCR_URB; status |= (urb << MMUCR_URB_SHIFT); - __raw_writel(status, MMUCR); ctrl_barrier(); diff --git a/trunk/arch/sh/mm/tlbflush_32.c b/trunk/arch/sh/mm/tlbflush_32.c index 3fbe03ce8fe3..77dc5efa7127 100644 --- a/trunk/arch/sh/mm/tlbflush_32.c +++ b/trunk/arch/sh/mm/tlbflush_32.c @@ -119,3 +119,31 @@ void local_flush_tlb_mm(struct mm_struct *mm) local_irq_restore(flags); } } + +void local_flush_tlb_all(void) +{ + unsigned long flags, status; + int i; + + /* + * Flush all the TLB. + */ + local_irq_save(flags); + jump_to_uncached(); + + status = __raw_readl(MMUCR); + status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); + + if (status == 0) + status = MMUCR_URB_NENTRIES; + + for (i = 0; i < status; i++) + __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); + + for (i = 0; i < 4; i++) + __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); + + back_to_cached(); + ctrl_barrier(); + local_irq_restore(flags); +} diff --git a/trunk/arch/sparc/configs/sparc64_defconfig b/trunk/arch/sparc/configs/sparc64_defconfig index 259e3fd50993..56e3163673e3 100644 --- a/trunk/arch/sparc/configs/sparc64_defconfig +++ b/trunk/arch/sparc/configs/sparc64_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.34-rc3 -# Sat Apr 3 15:49:56 2010 +# Linux kernel version: 2.6.33 +# Wed Mar 3 02:54:29 2010 # CONFIG_64BIT=y CONFIG_SPARC=y @@ -23,7 +23,6 @@ CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_MMU=y -CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_NO_VIRT_TO_BUS=y CONFIG_OF=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y @@ -440,7 +439,6 @@ CONFIG_MISC_DEVICES=y # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set # CONFIG_ISL29003 is not set -# CONFIG_SENSORS_TSL2550 is not set # CONFIG_DS1682 is not set # CONFIG_C2PORT is not set @@ -513,7 +511,6 @@ CONFIG_BLK_DEV_IDEDMA=y # # SCSI device support # -CONFIG_SCSI_MOD=y CONFIG_RAID_ATTRS=m CONFIG_SCSI=y CONFIG_SCSI_DMA=y @@ -891,7 +888,6 @@ CONFIG_SERIAL_SUNHV=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set -# CONFIG_SERIAL_TIMBERDALE is not set # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set CONFIG_UNIX98_PTYS=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set @@ -939,7 +935,6 @@ CONFIG_I2C_ALGOBIT=y # # CONFIG_I2C_OCORES is not set # CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set # # External I2C/SMBus adapter drivers @@ -953,9 +948,15 @@ CONFIG_I2C_ALGOBIT=y # # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set # CONFIG_SPI is not set # @@ -981,11 +982,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADM1029 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ADT7411 is not set # CONFIG_SENSORS_ADT7462 is not set # CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7473 is not set # CONFIG_SENSORS_ADT7475 is not set -# CONFIG_SENSORS_ASC7621 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_I5K_AMB is not set @@ -1052,21 +1052,18 @@ CONFIG_SSB_POSSIBLE=y # Multifunction device drivers # # CONFIG_MFD_CORE is not set -# CONFIG_MFD_88PM860X is not set # CONFIG_MFD_SM501 is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_TWL4030_CORE is not set # CONFIG_MFD_TMIO is not set # CONFIG_PMIC_DA903X is not set # CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_WM8400 is not set # CONFIG_MFD_WM831X is not set # CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set # CONFIG_MFD_PCF50633 is not set # CONFIG_AB3100_CORE is not set -# CONFIG_LPC_SCH is not set +# CONFIG_MFD_88PM8607 is not set # CONFIG_REGULATOR is not set # CONFIG_MEDIA_SUPPORT is not set @@ -1116,7 +1113,6 @@ CONFIG_FB_FFB=y # CONFIG_FB_LEO is not set CONFIG_FB_XVR500=y CONFIG_FB_XVR2500=y -CONFIG_FB_XVR1000=y # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set @@ -1434,6 +1430,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set @@ -1446,6 +1443,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_VST is not set # CONFIG_USB_GADGET is not set # @@ -1612,7 +1610,6 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set # CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set @@ -1627,7 +1624,6 @@ CONFIG_NETWORK_FILESYSTEMS=y # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set # CONFIG_SMB_FS is not set -# CONFIG_CEPH_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set diff --git a/trunk/arch/sparc/kernel/central.c b/trunk/arch/sparc/kernel/central.c index 415c86d5a8da..4589ca33220f 100644 --- a/trunk/arch/sparc/kernel/central.c +++ b/trunk/arch/sparc/kernel/central.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/sparc/kernel/cpumap.c b/trunk/arch/sparc/kernel/cpumap.c index 8de64c8126bc..7430ed080b23 100644 --- a/trunk/arch/sparc/kernel/cpumap.c +++ b/trunk/arch/sparc/kernel/cpumap.c @@ -4,7 +4,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/sparc/kernel/helpers.S b/trunk/arch/sparc/kernel/helpers.S index 92090cc9e829..314dd0c9fc5b 100644 --- a/trunk/arch/sparc/kernel/helpers.S +++ b/trunk/arch/sparc/kernel/helpers.S @@ -46,81 +46,6 @@ stack_trace_flush: nop .size stack_trace_flush,.-stack_trace_flush -#ifdef CONFIG_PERF_EVENTS - .globl perf_arch_fetch_caller_regs - .type perf_arch_fetch_caller_regs,#function -perf_arch_fetch_caller_regs: - /* We always read the %pstate into %o5 since we will use - * that to construct a fake %tstate to store into the regs. - */ - rdpr %pstate, %o5 - brz,pn %o2, 50f - mov %o2, %g7 - - /* Turn off interrupts while we walk around the register - * window by hand. - */ - wrpr %o5, PSTATE_IE, %pstate - - /* The %canrestore tells us how many register windows are - * still live in the chip above us, past that we have to - * walk the frame as saved on the stack. We stash away - * the %cwp in %g1 so we can return back to the original - * register window. - */ - rdpr %cwp, %g1 - rdpr %canrestore, %g2 - sub %g1, 1, %g3 - - /* We have the skip count in %g7, if it hits zero then - * %fp/%i7 are the registers we need. Otherwise if our - * %canrestore count maintained in %g2 hits zero we have - * to start traversing the stack. - */ -10: brz,pn %g2, 4f - sub %g2, 1, %g2 - wrpr %g3, %cwp - subcc %g7, 1, %g7 - bne,pt %xcc, 10b - sub %g3, 1, %g3 - - /* We found the values we need in the cpu's register - * windows. - */ - mov %fp, %g3 - ba,pt %xcc, 3f - mov %i7, %g2 - -50: mov %fp, %g3 - ba,pt %xcc, 2f - mov %i7, %g2 - - /* We hit the end of the valid register windows in the - * cpu, start traversing the stack frame. - */ -4: mov %fp, %g3 - -20: ldx [%g3 + STACK_BIAS + RW_V9_I7], %g2 - subcc %g7, 1, %g7 - bne,pn %xcc, 20b - ldx [%g3 + STACK_BIAS + RW_V9_I6], %g3 - - /* Restore the current register window position and - * re-enable interrupts. - */ -3: wrpr %g1, %cwp - wrpr %o5, %pstate - -2: stx %g3, [%o0 + PT_V9_FP] - sllx %o5, 8, %o5 - stx %o5, [%o0 + PT_V9_TSTATE] - stx %g2, [%o0 + PT_V9_TPC] - add %g2, 4, %g2 - retl - stx %g2, [%o0 + PT_V9_TNPC] - .size perf_arch_fetch_caller_regs,.-perf_arch_fetch_caller_regs -#endif /* CONFIG_PERF_EVENTS */ - #ifdef CONFIG_SMP .globl hard_smp_processor_id .type hard_smp_processor_id,#function diff --git a/trunk/arch/sparc/kernel/hvapi.c b/trunk/arch/sparc/kernel/hvapi.c index 7c60afb835b0..1d272c3b5740 100644 --- a/trunk/arch/sparc/kernel/hvapi.c +++ b/trunk/arch/sparc/kernel/hvapi.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/sparc/kernel/iommu.c b/trunk/arch/sparc/kernel/iommu.c index 47977a77f6c6..8414549c1834 100644 --- a/trunk/arch/sparc/kernel/iommu.c +++ b/trunk/arch/sparc/kernel/iommu.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/sparc/kernel/kprobes.c b/trunk/arch/sparc/kernel/kprobes.c index a39d1ba5a119..6716584e48ab 100644 --- a/trunk/arch/sparc/kernel/kprobes.c +++ b/trunk/arch/sparc/kernel/kprobes.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sparc/kernel/led.c b/trunk/arch/sparc/kernel/led.c index 3ae36f36e758..00d034ea2164 100644 --- a/trunk/arch/sparc/kernel/led.c +++ b/trunk/arch/sparc/kernel/led.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sparc/kernel/leon_kernel.c b/trunk/arch/sparc/kernel/leon_kernel.c index 6a7b4dbc8e09..0409d62d8ca2 100644 --- a/trunk/arch/sparc/kernel/leon_kernel.c +++ b/trunk/arch/sparc/kernel/leon_kernel.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc/kernel/leon_smp.c b/trunk/arch/sparc/kernel/leon_smp.c index e1656fc41ccb..85787577f683 100644 --- a/trunk/arch/sparc/kernel/leon_smp.c +++ b/trunk/arch/sparc/kernel/leon_smp.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/kernel/module.c b/trunk/arch/sparc/kernel/module.c index f848aadf54dc..0ee642f63234 100644 --- a/trunk/arch/sparc/kernel/module.c +++ b/trunk/arch/sparc/kernel/module.c @@ -9,9 +9,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/trunk/arch/sparc/kernel/of_device_common.c b/trunk/arch/sparc/kernel/of_device_common.c index 0247e68210b3..cb8eb799bb6c 100644 --- a/trunk/arch/sparc/kernel/of_device_common.c +++ b/trunk/arch/sparc/kernel/of_device_common.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc/kernel/pci_msi.c b/trunk/arch/sparc/kernel/pci_msi.c index e0ef847219c3..e1b0541feb19 100644 --- a/trunk/arch/sparc/kernel/pci_msi.c +++ b/trunk/arch/sparc/kernel/pci_msi.c @@ -4,7 +4,6 @@ */ #include #include -#include #include #include "pci_impl.h" diff --git a/trunk/arch/sparc/kernel/process_32.c b/trunk/arch/sparc/kernel/process_32.c index 40e29fc8a4d6..c49865b30719 100644 --- a/trunk/arch/sparc/kernel/process_32.c +++ b/trunk/arch/sparc/kernel/process_32.c @@ -17,13 +17,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/kernel/ptrace_32.c b/trunk/arch/sparc/kernel/ptrace_32.c index e608f397e11f..7e3dfd9bb97e 100644 --- a/trunk/arch/sparc/kernel/ptrace_32.c +++ b/trunk/arch/sparc/kernel/ptrace_32.c @@ -65,7 +65,6 @@ static int genregs32_get(struct task_struct *target, *k++ = regs->u_regs[pos++]; reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; for (; count > 0 && pos < 32; count--) { if (get_user(*k++, ®_window[pos++])) return -EFAULT; @@ -77,7 +76,6 @@ static int genregs32_get(struct task_struct *target, } reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; for (; count > 0 && pos < 32; count--) { if (get_user(reg, ®_window[pos++]) || put_user(reg, u++)) @@ -143,7 +141,6 @@ static int genregs32_set(struct task_struct *target, regs->u_regs[pos++] = *k++; reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; for (; count > 0 && pos < 32; count--) { if (put_user(*k++, ®_window[pos++])) return -EFAULT; @@ -156,7 +153,6 @@ static int genregs32_set(struct task_struct *target, } reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; for (; count > 0 && pos < 32; count--) { if (get_user(reg, u++) || put_user(reg, ®_window[pos++])) diff --git a/trunk/arch/sparc/kernel/ptrace_64.c b/trunk/arch/sparc/kernel/ptrace_64.c index aa90da08bf61..2f6524d1a817 100644 --- a/trunk/arch/sparc/kernel/ptrace_64.c +++ b/trunk/arch/sparc/kernel/ptrace_64.c @@ -492,7 +492,6 @@ static int genregs32_get(struct task_struct *target, *k++ = regs->u_regs[pos++]; reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; if (target == current) { for (; count > 0 && pos < 32; count--) { if (get_user(*k++, ®_window[pos++])) @@ -517,7 +516,6 @@ static int genregs32_get(struct task_struct *target, } reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; if (target == current) { for (; count > 0 && pos < 32; count--) { if (get_user(reg, ®_window[pos++]) || @@ -601,7 +599,6 @@ static int genregs32_set(struct task_struct *target, regs->u_regs[pos++] = *k++; reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; if (target == current) { for (; count > 0 && pos < 32; count--) { if (put_user(*k++, ®_window[pos++])) @@ -628,7 +625,6 @@ static int genregs32_set(struct task_struct *target, } reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; - reg_window -= 16; if (target == current) { for (; count > 0 && pos < 32; count--) { if (get_user(reg, u++) || diff --git a/trunk/arch/sparc/kernel/setup_64.c b/trunk/arch/sparc/kernel/setup_64.c index 5f72de67588b..a2a79e76344f 100644 --- a/trunk/arch/sparc/kernel/setup_64.c +++ b/trunk/arch/sparc/kernel/setup_64.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc/kernel/smp_64.c b/trunk/arch/sparc/kernel/smp_64.c index 4c5334528109..eb14844a0021 100644 --- a/trunk/arch/sparc/kernel/smp_64.c +++ b/trunk/arch/sparc/kernel/smp_64.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/kernel/sun4c_irq.c b/trunk/arch/sparc/kernel/sun4c_irq.c index 892fb884910a..bc3adbf79c6a 100644 --- a/trunk/arch/sparc/kernel/sun4c_irq.c +++ b/trunk/arch/sparc/kernel/sun4c_irq.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc/kernel/sun4m_irq.c b/trunk/arch/sparc/kernel/sun4m_irq.c index 7f3b97ff62c1..301892e2d718 100644 --- a/trunk/arch/sparc/kernel/sun4m_irq.c +++ b/trunk/arch/sparc/kernel/sun4m_irq.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc/kernel/sys_sparc32.c b/trunk/arch/sparc/kernel/sys_sparc32.c index c0ca87553e1c..daded3b96398 100644 --- a/trunk/arch/sparc/kernel/sys_sparc32.c +++ b/trunk/arch/sparc/kernel/sys_sparc32.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/kernel/traps_64.c b/trunk/arch/sparc/kernel/traps_64.c index 837dfc2390d6..bdc05a21908b 100644 --- a/trunk/arch/sparc/kernel/traps_64.c +++ b/trunk/arch/sparc/kernel/traps_64.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/kernel/vio.c b/trunk/arch/sparc/kernel/vio.c index 3cb1def9806c..c28c71449a6c 100644 --- a/trunk/arch/sparc/kernel/vio.c +++ b/trunk/arch/sparc/kernel/vio.c @@ -10,7 +10,6 @@ */ #include -#include #include #include diff --git a/trunk/arch/sparc/mm/hugetlbpage.c b/trunk/arch/sparc/mm/hugetlbpage.c index 5fdddf134caa..f27d10369e0c 100644 --- a/trunk/arch/sparc/mm/hugetlbpage.c +++ b/trunk/arch/sparc/mm/hugetlbpage.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/sparc/mm/init_32.c b/trunk/arch/sparc/mm/init_32.c index 6d0e02c4fe09..dc7c3b17a15f 100644 --- a/trunk/arch/sparc/mm/init_32.c +++ b/trunk/arch/sparc/mm/init_32.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/mm/init_64.c b/trunk/arch/sparc/mm/init_64.c index b2831dc3c121..9245a822a2f1 100644 --- a/trunk/arch/sparc/mm/init_64.c +++ b/trunk/arch/sparc/mm/init_64.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include @@ -2117,7 +2117,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) "node=%d entry=%lu/%lu\n", start, block, nr, node, addr >> VMEMMAP_CHUNK_SHIFT, - VMEMMAP_SIZE); + VMEMMAP_SIZE >> VMEMMAP_CHUNK_SHIFT); } } return 0; diff --git a/trunk/arch/sparc/mm/srmmu.c b/trunk/arch/sparc/mm/srmmu.c index f5f75a58e0b3..df49b200ca4c 100644 --- a/trunk/arch/sparc/mm/srmmu.c +++ b/trunk/arch/sparc/mm/srmmu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/sparc/mm/sun4c.c b/trunk/arch/sparc/mm/sun4c.c index cf38846753dd..18652534b91a 100644 --- a/trunk/arch/sparc/mm/sun4c.c +++ b/trunk/arch/sparc/mm/sun4c.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/sparc/mm/tsb.c b/trunk/arch/sparc/mm/tsb.c index 101d7c82870b..36a0813f9517 100644 --- a/trunk/arch/sparc/mm/tsb.c +++ b/trunk/arch/sparc/mm/tsb.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/um/drivers/net_kern.c b/trunk/arch/um/drivers/net_kern.c index f05372694233..a74245ae3a84 100644 --- a/trunk/arch/um/drivers/net_kern.c +++ b/trunk/arch/um/drivers/net_kern.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include "init.h" #include "irq_kern.h" diff --git a/trunk/arch/um/drivers/port_kern.c b/trunk/arch/um/drivers/port_kern.c index a11573be0961..4ebc8a34738f 100644 --- a/trunk/arch/um/drivers/port_kern.c +++ b/trunk/arch/um/drivers/port_kern.c @@ -7,7 +7,6 @@ #include "linux/interrupt.h" #include "linux/list.h" #include "linux/mutex.h" -#include "linux/slab.h" #include "linux/workqueue.h" #include "asm/atomic.h" #include "init.h" diff --git a/trunk/arch/um/drivers/ubd_kern.c b/trunk/arch/um/drivers/ubd_kern.c index da992a3ad6b7..c1ff6903b622 100644 --- a/trunk/arch/um/drivers/ubd_kern.c +++ b/trunk/arch/um/drivers/ubd_kern.c @@ -31,7 +31,6 @@ #include "linux/ctype.h" #include "linux/capability.h" #include "linux/mm.h" -#include "linux/slab.h" #include "linux/vmalloc.h" #include "linux/blkpg.h" #include "linux/genhd.h" diff --git a/trunk/arch/um/kernel/exec.c b/trunk/arch/um/kernel/exec.c index 97974c1bdd12..fda30d21fb90 100644 --- a/trunk/arch/um/kernel/exec.c +++ b/trunk/arch/um/kernel/exec.c @@ -8,7 +8,6 @@ #include "linux/smp_lock.h" #include "linux/ptrace.h" #include "linux/sched.h" -#include "linux/slab.h" #include "asm/current.h" #include "asm/processor.h" #include "asm/uaccess.h" diff --git a/trunk/arch/um/kernel/irq.c b/trunk/arch/um/kernel/irq.c index a3f0b04d7101..89474ba0741e 100644 --- a/trunk/arch/um/kernel/irq.c +++ b/trunk/arch/um/kernel/irq.c @@ -12,7 +12,6 @@ #include "linux/module.h" #include "linux/sched.h" #include "linux/seq_file.h" -#include "linux/slab.h" #include "as-layout.h" #include "kern_util.h" #include "os.h" diff --git a/trunk/arch/um/kernel/mem.c b/trunk/arch/um/kernel/mem.c index 8137ccc9635b..a5d5e70cf6f5 100644 --- a/trunk/arch/um/kernel/mem.c +++ b/trunk/arch/um/kernel/mem.c @@ -5,10 +5,10 @@ #include #include +#include #include #include #include -#include #include #include #include "as-layout.h" diff --git a/trunk/arch/um/kernel/process.c b/trunk/arch/um/kernel/process.c index fab4371184f6..2f910a1b7454 100644 --- a/trunk/arch/um/kernel/process.c +++ b/trunk/arch/um/kernel/process.c @@ -7,13 +7,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/trunk/arch/um/kernel/reboot.c b/trunk/arch/um/kernel/reboot.c index 869bec9f2516..00197d3d21ec 100644 --- a/trunk/arch/um/kernel/reboot.c +++ b/trunk/arch/um/kernel/reboot.c @@ -4,7 +4,6 @@ */ #include "linux/sched.h" -#include "linux/slab.h" #include "kern_util.h" #include "os.h" #include "skas.h" diff --git a/trunk/arch/um/kernel/skas/mmu.c b/trunk/arch/um/kernel/skas/mmu.c index 3d099f974785..8bfd1e905812 100644 --- a/trunk/arch/um/kernel/skas/mmu.c +++ b/trunk/arch/um/kernel/skas/mmu.c @@ -5,7 +5,6 @@ #include "linux/mm.h" #include "linux/sched.h" -#include "linux/slab.h" #include "asm/pgalloc.h" #include "asm/pgtable.h" #include "as-layout.h" diff --git a/trunk/arch/um/os-Linux/helper.c b/trunk/arch/um/os-Linux/helper.c index 06d6ccf0e444..b6b1096152aa 100644 --- a/trunk/arch/um/os-Linux/helper.c +++ b/trunk/arch/um/os-Linux/helper.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include "kern_constants.h" diff --git a/trunk/arch/um/sys-i386/ldt.c b/trunk/arch/um/sys-i386/ldt.c index 3f2bf208d884..a4846a84a7be 100644 --- a/trunk/arch/um/sys-i386/ldt.c +++ b/trunk/arch/um/sys-i386/ldt.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "os.h" #include "proc_mm.h" diff --git a/trunk/arch/x86/crypto/fpu.c b/trunk/arch/x86/crypto/fpu.c index 1a8f8649c035..daef6cd2b45d 100644 --- a/trunk/arch/x86/crypto/fpu.c +++ b/trunk/arch/x86/crypto/fpu.c @@ -16,7 +16,6 @@ #include #include #include -#include #include struct crypto_fpu_ctx { diff --git a/trunk/arch/x86/ia32/ia32_aout.c b/trunk/arch/x86/ia32/ia32_aout.c index 0350311906ae..280c019cfad8 100644 --- a/trunk/arch/x86/ia32/ia32_aout.c +++ b/trunk/arch/x86/ia32/ia32_aout.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/ia32/sys_ia32.c b/trunk/arch/x86/ia32/sys_ia32.c index 626be156d88d..74c35431b7d8 100644 --- a/trunk/arch/x86/ia32/sys_ia32.c +++ b/trunk/arch/x86/ia32/sys_ia32.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/include/asm/pgtable_32.h b/trunk/arch/x86/include/asm/pgtable_32.h index 2984a25ff383..47339a1ac7b6 100644 --- a/trunk/arch/x86/include/asm/pgtable_32.h +++ b/trunk/arch/x86/include/asm/pgtable_32.h @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/acpi/boot.c b/trunk/arch/x86/kernel/acpi/boot.c index cd40aba6aa95..0061ea263061 100644 --- a/trunk/arch/x86/kernel/acpi/boot.c +++ b/trunk/arch/x86/kernel/acpi/boot.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/alternative.c b/trunk/arch/x86/kernel/alternative.c index 1a160d5d44d0..3a4bf35c179b 100644 --- a/trunk/arch/x86/kernel/alternative.c +++ b/trunk/arch/x86/kernel/alternative.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index f3dadb571d9b..adb0ba025702 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -18,8 +18,8 @@ */ #include +#include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/amd_iommu_init.c b/trunk/arch/x86/kernel/amd_iommu_init.c index 42f5350b908f..9dc91b431470 100644 --- a/trunk/arch/x86/kernel/amd_iommu_init.c +++ b/trunk/arch/x86/kernel/amd_iommu_init.c @@ -19,8 +19,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/apb_timer.c b/trunk/arch/x86/kernel/apb_timer.c index ff469e470059..4b7099526d2c 100644 --- a/trunk/arch/x86/kernel/apb_timer.c +++ b/trunk/arch/x86/kernel/apb_timer.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/apic/es7000_32.c b/trunk/arch/x86/kernel/apic/es7000_32.c index 03ba1b895f5e..dd2b5f264643 100644 --- a/trunk/arch/x86/kernel/apic/es7000_32.c +++ b/trunk/arch/x86/kernel/apic/es7000_32.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/apic/io_apic.c b/trunk/arch/x86/kernel/apic/io_apic.c index 127b8718abfb..463de9a858ad 100644 --- a/trunk/arch/x86/kernel/apic/io_apic.c +++ b/trunk/arch/x86/kernel/apic/io_apic.c @@ -36,7 +36,6 @@ #include #include #include /* time_after() */ -#include #ifdef CONFIG_ACPI #include #endif diff --git a/trunk/arch/x86/kernel/apic/nmi.c b/trunk/arch/x86/kernel/apic/nmi.c index 1edaf15c0b8e..8aa65adbd25d 100644 --- a/trunk/arch/x86/kernel/apic/nmi.c +++ b/trunk/arch/x86/kernel/apic/nmi.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/apic/x2apic_uv_x.c b/trunk/arch/x86/kernel/apic/x2apic_uv_x.c index c085d52dbaf2..49dbeaef2a27 100644 --- a/trunk/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/trunk/arch/x86/kernel/apic/x2apic_uv_x.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/bootflag.c b/trunk/arch/x86/kernel/bootflag.c index 5de7f4c56971..30f25a75fe28 100644 --- a/trunk/arch/x86/kernel/bootflag.c +++ b/trunk/arch/x86/kernel/bootflag.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 459168083b77..1b1920fa7c80 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/trunk/arch/x86/kernel/cpu/cpufreq/elanfreq.c index c587db472a75..006b278b0d5d 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/elanfreq.c @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/trunk/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index 16e3483be9e3..ac27ec2264d5 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c @@ -80,7 +80,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/longrun.c b/trunk/arch/x86/kernel/cpu/cpufreq/longrun.c index e7b559d74c52..da5f70fcb766 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/longrun.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/trunk/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 7b8a8ba67b07..869615193720 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index ce7cde713e71..ff36d2979a90 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index b3379d6a5c57..cb01dac267d3 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k6.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 9b1ff37de46a..8d672ef162ce 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c @@ -20,7 +20,6 @@ #include /* current */ #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 561758e95180..2ce8e0b5cc54 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "speedstep-lib.h" diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index a94ec6be69fa..ad0083abfa23 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index 8abd869baabf..04d73c114e49 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce-inject.c b/trunk/arch/x86/kernel/cpu/mcheck/mce-inject.c index e7dbde7bfedb..73734baa50f2 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce-inject.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce.c b/trunk/arch/x86/kernel/cpu/mcheck/mce.c index 8a6f0afa767e..3ab9c886b613 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce_amd.c b/trunk/arch/x86/kernel/cpu/mcheck/mce_amd.c index 224392d8fe8c..cda932ca3ade 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce_intel.c b/trunk/arch/x86/kernel/cpu/mcheck/mce_intel.c index 62b48e40920a..d15df6e49bf0 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce_intel.c @@ -5,7 +5,6 @@ * Author: Andi Kleen */ -#include #include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mtrr/generic.c b/trunk/arch/x86/kernel/cpu/mtrr/generic.c index fd31a441c61c..9aa5dc76ff4a 100644 --- a/trunk/arch/x86/kernel/cpu/mtrr/generic.c +++ b/trunk/arch/x86/kernel/cpu/mtrr/generic.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/cpu/mtrr/if.c b/trunk/arch/x86/kernel/cpu/mtrr/if.c index 79289632cb27..e006e56f699c 100644 --- a/trunk/arch/x86/kernel/cpu/mtrr/if.c +++ b/trunk/arch/x86/kernel/cpu/mtrr/if.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #define LINE_SIZE 80 diff --git a/trunk/arch/x86/kernel/cpu/perf_event.c b/trunk/arch/x86/kernel/cpu/perf_event.c index db5bdc8addf8..60398a0d947c 100644 --- a/trunk/arch/x86/kernel/cpu/perf_event.c +++ b/trunk/arch/x86/kernel/cpu/perf_event.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include static u64 perf_event_mask __read_mostly; @@ -160,7 +158,7 @@ struct x86_pmu { struct perf_event *event); struct event_constraint *event_constraints; - int (*cpu_prepare)(int cpu); + void (*cpu_prepare)(int cpu); void (*cpu_starting)(int cpu); void (*cpu_dying)(int cpu); void (*cpu_dead)(int cpu); @@ -1335,12 +1333,11 @@ static int __cpuinit x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) { unsigned int cpu = (long)hcpu; - int ret = NOTIFY_OK; switch (action & ~CPU_TASKS_FROZEN) { case CPU_UP_PREPARE: if (x86_pmu.cpu_prepare) - ret = x86_pmu.cpu_prepare(cpu); + x86_pmu.cpu_prepare(cpu); break; case CPU_STARTING: @@ -1353,7 +1350,6 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) x86_pmu.cpu_dying(cpu); break; - case CPU_UP_CANCELED: case CPU_DEAD: if (x86_pmu.cpu_dead) x86_pmu.cpu_dead(cpu); @@ -1363,7 +1359,7 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) break; } - return ret; + return NOTIFY_OK; } static void __init pmu_check_apic(void) @@ -1632,42 +1628,14 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) return len; } -#ifdef CONFIG_COMPAT -static inline int -perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) +static int copy_stack_frame(const void __user *fp, struct stack_frame *frame) { - /* 32-bit process in 64-bit kernel. */ - struct stack_frame_ia32 frame; - const void __user *fp; + unsigned long bytes; - if (!test_thread_flag(TIF_IA32)) - return 0; - - fp = compat_ptr(regs->bp); - while (entry->nr < PERF_MAX_STACK_DEPTH) { - unsigned long bytes; - frame.next_frame = 0; - frame.return_address = 0; - - bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); - if (bytes != sizeof(frame)) - break; - - if (fp < compat_ptr(regs->sp)) - break; + bytes = copy_from_user_nmi(frame, fp, sizeof(*frame)); - callchain_store(entry, frame.return_address); - fp = compat_ptr(frame.next_frame); - } - return 1; -} -#else -static inline int -perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) -{ - return 0; + return bytes == sizeof(*frame); } -#endif static void perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) @@ -1683,16 +1651,11 @@ perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) callchain_store(entry, PERF_CONTEXT_USER); callchain_store(entry, regs->ip); - if (perf_callchain_user32(regs, entry)) - return; - while (entry->nr < PERF_MAX_STACK_DEPTH) { - unsigned long bytes; frame.next_frame = NULL; frame.return_address = 0; - bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); - if (bytes != sizeof(frame)) + if (!copy_stack_frame(fp, &frame)) break; if ((unsigned long)fp < regs->sp) @@ -1739,6 +1702,7 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) return entry; } +#ifdef CONFIG_EVENT_TRACING void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) { regs->ip = ip; @@ -1750,3 +1714,4 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski regs->cs = __KERNEL_CS; local_save_flags(regs->flags); } +#endif diff --git a/trunk/arch/x86/kernel/cpu/perf_event_amd.c b/trunk/arch/x86/kernel/cpu/perf_event_amd.c index db6f7d4056e1..b87e0b6970cb 100644 --- a/trunk/arch/x86/kernel/cpu/perf_event_amd.c +++ b/trunk/arch/x86/kernel/cpu/perf_event_amd.c @@ -137,13 +137,6 @@ static inline int amd_is_nb_event(struct hw_perf_event *hwc) return (hwc->config & 0xe0) == 0xe0; } -static inline int amd_has_nb(struct cpu_hw_events *cpuc) -{ - struct amd_nb *nb = cpuc->amd_nb; - - return nb && nb->nb_id != -1; -} - static void amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) { @@ -154,7 +147,7 @@ static void amd_put_event_constraints(struct cpu_hw_events *cpuc, /* * only care about NB events */ - if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) + if (!(nb && amd_is_nb_event(hwc))) return; /* @@ -221,7 +214,7 @@ amd_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) /* * if not NB event or no NB, then no constraints */ - if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) + if (!(nb && amd_is_nb_event(hwc))) return &unconstrained; /* @@ -300,55 +293,51 @@ static struct amd_nb *amd_alloc_nb(int cpu, int nb_id) return nb; } -static int amd_pmu_cpu_prepare(int cpu) -{ - struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); - - WARN_ON_ONCE(cpuc->amd_nb); - - if (boot_cpu_data.x86_max_cores < 2) - return NOTIFY_OK; - - cpuc->amd_nb = amd_alloc_nb(cpu, -1); - if (!cpuc->amd_nb) - return NOTIFY_BAD; - - return NOTIFY_OK; -} - -static void amd_pmu_cpu_starting(int cpu) +static void amd_pmu_cpu_online(int cpu) { - struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); - struct amd_nb *nb; + struct cpu_hw_events *cpu1, *cpu2; + struct amd_nb *nb = NULL; int i, nb_id; if (boot_cpu_data.x86_max_cores < 2) return; + /* + * function may be called too early in the + * boot process, in which case nb_id is bogus + */ nb_id = amd_get_nb_id(cpu); - WARN_ON_ONCE(nb_id == BAD_APICID); + if (nb_id == BAD_APICID) + return; + + cpu1 = &per_cpu(cpu_hw_events, cpu); + cpu1->amd_nb = NULL; raw_spin_lock(&amd_nb_lock); for_each_online_cpu(i) { - nb = per_cpu(cpu_hw_events, i).amd_nb; - if (WARN_ON_ONCE(!nb)) + cpu2 = &per_cpu(cpu_hw_events, i); + nb = cpu2->amd_nb; + if (!nb) continue; - - if (nb->nb_id == nb_id) { - kfree(cpuc->amd_nb); - cpuc->amd_nb = nb; - break; - } + if (nb->nb_id == nb_id) + goto found; } - cpuc->amd_nb->nb_id = nb_id; - cpuc->amd_nb->refcnt++; + nb = amd_alloc_nb(cpu, nb_id); + if (!nb) { + pr_err("perf_events: failed NB allocation for CPU%d\n", cpu); + raw_spin_unlock(&amd_nb_lock); + return; + } +found: + nb->refcnt++; + cpu1->amd_nb = nb; raw_spin_unlock(&amd_nb_lock); } -static void amd_pmu_cpu_dead(int cpu) +static void amd_pmu_cpu_offline(int cpu) { struct cpu_hw_events *cpuhw; @@ -360,10 +349,8 @@ static void amd_pmu_cpu_dead(int cpu) raw_spin_lock(&amd_nb_lock); if (cpuhw->amd_nb) { - struct amd_nb *nb = cpuhw->amd_nb; - - if (nb->nb_id == -1 || --nb->refcnt == 0) - kfree(nb); + if (--cpuhw->amd_nb->refcnt == 0) + kfree(cpuhw->amd_nb); cpuhw->amd_nb = NULL; } @@ -392,9 +379,8 @@ static __initconst struct x86_pmu amd_pmu = { .get_event_constraints = amd_get_event_constraints, .put_event_constraints = amd_put_event_constraints, - .cpu_prepare = amd_pmu_cpu_prepare, - .cpu_starting = amd_pmu_cpu_starting, - .cpu_dead = amd_pmu_cpu_dead, + .cpu_prepare = amd_pmu_cpu_online, + .cpu_dead = amd_pmu_cpu_offline, }; static __init int amd_pmu_init(void) diff --git a/trunk/arch/x86/kernel/cpuid.c b/trunk/arch/x86/kernel/cpuid.c index 8b862d5900fe..83e5e628de73 100644 --- a/trunk/arch/x86/kernel/cpuid.c +++ b/trunk/arch/x86/kernel/cpuid.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/crash_dump_32.c b/trunk/arch/x86/kernel/crash_dump_32.c index 67414550c3cc..cd97ce18c29d 100644 --- a/trunk/arch/x86/kernel/crash_dump_32.c +++ b/trunk/arch/x86/kernel/crash_dump_32.c @@ -5,7 +5,6 @@ * Copyright (C) IBM Corporation, 2004. All rights reserved */ -#include #include #include #include diff --git a/trunk/arch/x86/kernel/dumpstack.h b/trunk/arch/x86/kernel/dumpstack.h index e39e77168a37..29e5f7c845b2 100644 --- a/trunk/arch/x86/kernel/dumpstack.h +++ b/trunk/arch/x86/kernel/dumpstack.h @@ -30,11 +30,6 @@ struct stack_frame { unsigned long return_address; }; -struct stack_frame_ia32 { - u32 next_frame; - u32 return_address; -}; - static inline unsigned long rewind_frame_pointer(int n) { struct stack_frame *frame; diff --git a/trunk/arch/x86/kernel/hpet.c b/trunk/arch/x86/kernel/hpet.c index d10a7e7294f4..ee4fa1bfcb33 100644 --- a/trunk/arch/x86/kernel/hpet.c +++ b/trunk/arch/x86/kernel/hpet.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/i387.c b/trunk/arch/x86/kernel/i387.c index 54c31c285488..c01a2b846d47 100644 --- a/trunk/arch/x86/kernel/i387.c +++ b/trunk/arch/x86/kernel/i387.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/i8259.c b/trunk/arch/x86/kernel/i8259.c index 7c9f02c130f3..fb725ee15f55 100644 --- a/trunk/arch/x86/kernel/i8259.c +++ b/trunk/arch/x86/kernel/i8259.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/kernel/irqinit.c b/trunk/arch/x86/kernel/irqinit.c index 0ed2d300cd46..f01d390f9c5b 100644 --- a/trunk/arch/x86/kernel/irqinit.c +++ b/trunk/arch/x86/kernel/irqinit.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/kernel/k8.c b/trunk/arch/x86/kernel/k8.c index 0f7bc20cfcde..9b895464dd03 100644 --- a/trunk/arch/x86/kernel/k8.c +++ b/trunk/arch/x86/kernel/k8.c @@ -2,8 +2,8 @@ * Shared support code for AMD K8 northbridges and derivates. * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. */ +#include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/kdebugfs.c b/trunk/arch/x86/kernel/kdebugfs.c index 8afd9f321f10..e444357375ce 100644 --- a/trunk/arch/x86/kernel/kdebugfs.c +++ b/trunk/arch/x86/kernel/kdebugfs.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/kgdb.c b/trunk/arch/x86/kernel/kgdb.c index b2258ca91003..bfba6019d762 100644 --- a/trunk/arch/x86/kernel/kgdb.c +++ b/trunk/arch/x86/kernel/kgdb.c @@ -618,8 +618,8 @@ int kgdb_arch_init(void) * portion of kgdb because this operation requires mutexs to * complete. */ - hw_breakpoint_init(&attr); attr.bp_addr = (unsigned long)kgdb_arch_init; + attr.type = PERF_TYPE_BREAKPOINT; attr.bp_len = HW_BREAKPOINT_LEN_1; attr.bp_type = HW_BREAKPOINT_W; attr.disabled = 1; diff --git a/trunk/arch/x86/kernel/ldt.c b/trunk/arch/x86/kernel/ldt.c index ea697263b373..ec6ef60cbd17 100644 --- a/trunk/arch/x86/kernel/ldt.c +++ b/trunk/arch/x86/kernel/ldt.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/machine_kexec_64.c b/trunk/arch/x86/kernel/machine_kexec_64.c index 035c8c529181..4a8bb82248ae 100644 --- a/trunk/arch/x86/kernel/machine_kexec_64.c +++ b/trunk/arch/x86/kernel/machine_kexec_64.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/mca_32.c b/trunk/arch/x86/kernel/mca_32.c index 63eaf6596233..845d80ce1ef1 100644 --- a/trunk/arch/x86/kernel/mca_32.c +++ b/trunk/arch/x86/kernel/mca_32.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/module.c b/trunk/arch/x86/kernel/module.c index e0bc186d7501..89f386f044e4 100644 --- a/trunk/arch/x86/kernel/module.c +++ b/trunk/arch/x86/kernel/module.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/msr.c b/trunk/arch/x86/kernel/msr.c index 4d4468e9f47c..206735ac8cbd 100644 --- a/trunk/arch/x86/kernel/msr.c +++ b/trunk/arch/x86/kernel/msr.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/pci-dma.c b/trunk/arch/x86/kernel/pci-dma.c index 4b7e3d8b01dd..a4ac764a6880 100644 --- a/trunk/arch/x86/kernel/pci-dma.c +++ b/trunk/arch/x86/kernel/pci-dma.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/pci-gart_64.c b/trunk/arch/x86/kernel/pci-gart_64.c index 68cd24f9deae..f3af115a573a 100644 --- a/trunk/arch/x86/kernel/pci-gart_64.c +++ b/trunk/arch/x86/kernel/pci-gart_64.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/pci-nommu.c b/trunk/arch/x86/kernel/pci-nommu.c index 3af4af810c07..22be12b60a8f 100644 --- a/trunk/arch/x86/kernel/pci-nommu.c +++ b/trunk/arch/x86/kernel/pci-nommu.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/ptrace.c b/trunk/arch/x86/kernel/ptrace.c index 2e9b55027b7e..a503b1fd04e5 100644 --- a/trunk/arch/x86/kernel/ptrace.c +++ b/trunk/arch/x86/kernel/ptrace.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kernel/setup.c b/trunk/arch/x86/kernel/setup.c index 9570541caf7c..d76e18570c60 100644 --- a/trunk/arch/x86/kernel/setup.c +++ b/trunk/arch/x86/kernel/setup.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/x86/kernel/smp.c b/trunk/arch/x86/kernel/smp.c index d801210945d6..ec1de97600e7 100644 --- a/trunk/arch/x86/kernel/smp.c +++ b/trunk/arch/x86/kernel/smp.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/smpboot.c b/trunk/arch/x86/kernel/smpboot.c index 763d815e27a0..06d98ae5a802 100644 --- a/trunk/arch/x86/kernel/smpboot.c +++ b/trunk/arch/x86/kernel/smpboot.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -243,6 +242,8 @@ static void __cpuinit smp_callin(void) end_local_APIC_setup(); map_cpu_to_logical_apicid(); + notify_cpu_starting(cpuid); + /* * Need to setup vector mappings before we enable interrupts. */ @@ -263,8 +264,6 @@ static void __cpuinit smp_callin(void) */ smp_store_cpu_info(cpuid); - notify_cpu_starting(cpuid); - /* * Allow the master to continue. */ diff --git a/trunk/arch/x86/kernel/tlb_uv.c b/trunk/arch/x86/kernel/tlb_uv.c index 17b03dd3a6b5..364d015efebc 100644 --- a/trunk/arch/x86/kernel/tlb_uv.c +++ b/trunk/arch/x86/kernel/tlb_uv.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/uv_irq.c b/trunk/arch/x86/kernel/uv_irq.c index 1d40336b030a..ece73d8e3240 100644 --- a/trunk/arch/x86/kernel/uv_irq.c +++ b/trunk/arch/x86/kernel/uv_irq.c @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/x86/kernel/uv_time.c b/trunk/arch/x86/kernel/uv_time.c index 56e421bc379b..2b75ef638dbc 100644 --- a/trunk/arch/x86/kernel/uv_time.c +++ b/trunk/arch/x86/kernel/uv_time.c @@ -19,7 +19,6 @@ * Copyright (c) Dimitri Sivanich */ #include -#include #include #include diff --git a/trunk/arch/x86/kernel/vmi_32.c b/trunk/arch/x86/kernel/vmi_32.c index ce9fbacb7526..7dd599deca4a 100644 --- a/trunk/arch/x86/kernel/vmi_32.c +++ b/trunk/arch/x86/kernel/vmi_32.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kvm/i8254.c b/trunk/arch/x86/kvm/i8254.c index 0150affad25d..294698b6daff 100644 --- a/trunk/arch/x86/kvm/i8254.c +++ b/trunk/arch/x86/kvm/i8254.c @@ -32,7 +32,6 @@ #define pr_fmt(fmt) "pit: " fmt #include -#include #include "irq.h" #include "i8254.h" diff --git a/trunk/arch/x86/kvm/i8259.c b/trunk/arch/x86/kvm/i8259.c index a790fa128a9f..07771da85de5 100644 --- a/trunk/arch/x86/kvm/i8259.c +++ b/trunk/arch/x86/kvm/i8259.c @@ -26,7 +26,6 @@ * Port from Qemu. */ #include -#include #include #include "irq.h" diff --git a/trunk/arch/x86/kvm/lapic.c b/trunk/arch/x86/kvm/lapic.c index 1eb7a4ae0c9c..4b224f90087b 100644 --- a/trunk/arch/x86/kvm/lapic.c +++ b/trunk/arch/x86/kvm/lapic.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/kvm/mmu.c b/trunk/arch/x86/kvm/mmu.c index 48aeee8eefb0..741373e8ca77 100644 --- a/trunk/arch/x86/kvm/mmu.c +++ b/trunk/arch/x86/kvm/mmu.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/kvm/svm.c b/trunk/arch/x86/kvm/svm.c index 445c59411ed0..52f78dd03010 100644 --- a/trunk/arch/x86/kvm/svm.c +++ b/trunk/arch/x86/kvm/svm.c @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index 686492ed3079..14873b9f8430 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "kvm_cache_regs.h" #include "x86.h" diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index 24cd0ee896e9..e46282a56565 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #undef TRACE_INCLUDE_FILE #define CREATE_TRACE_POINTS diff --git a/trunk/arch/x86/mm/hugetlbpage.c b/trunk/arch/x86/mm/hugetlbpage.c index 069ce7c37c01..f46c340727b8 100644 --- a/trunk/arch/x86/mm/hugetlbpage.c +++ b/trunk/arch/x86/mm/hugetlbpage.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/mm/init.c b/trunk/arch/x86/mm/init.c index b278535b14aa..452ee5b8f309 100644 --- a/trunk/arch/x86/mm/init.c +++ b/trunk/arch/x86/mm/init.c @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/trunk/arch/x86/mm/init_32.c b/trunk/arch/x86/mm/init_32.c index bca79091b9d6..5cb3f0f54f47 100644 --- a/trunk/arch/x86/mm/init_32.c +++ b/trunk/arch/x86/mm/init_32.c @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index ee41bba315d1..e9b040e1cde5 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/mm/kmmio.c b/trunk/arch/x86/mm/kmmio.c index 5d0e67fff1a6..536fb6823366 100644 --- a/trunk/arch/x86/mm/kmmio.c +++ b/trunk/arch/x86/mm/kmmio.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/mm/mmio-mod.c b/trunk/arch/x86/mm/mmio-mod.c index 3adff7dcc148..34a3291ca103 100644 --- a/trunk/arch/x86/mm/mmio-mod.c +++ b/trunk/arch/x86/mm/mmio-mod.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/x86/mm/pageattr.c b/trunk/arch/x86/mm/pageattr.c index 28195c350b97..cf07c26d9a4a 100644 --- a/trunk/arch/x86/mm/pageattr.c +++ b/trunk/arch/x86/mm/pageattr.c @@ -6,13 +6,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/arch/x86/mm/pat.c b/trunk/arch/x86/mm/pat.c index edc8b95afc1a..ae9648eb1c7f 100644 --- a/trunk/arch/x86/mm/pat.c +++ b/trunk/arch/x86/mm/pat.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/trunk/arch/x86/mm/pgtable.c b/trunk/arch/x86/mm/pgtable.c index 5c4ee422590e..c9ba9deafe83 100644 --- a/trunk/arch/x86/mm/pgtable.c +++ b/trunk/arch/x86/mm/pgtable.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/trunk/arch/x86/mm/pgtable_32.c b/trunk/arch/x86/mm/pgtable_32.c index 1a8faf09afed..46c8834aedc0 100644 --- a/trunk/arch/x86/mm/pgtable_32.c +++ b/trunk/arch/x86/mm/pgtable_32.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/pci/acpi.c b/trunk/arch/x86/pci/acpi.c index c7b1ebfb7da7..e31160216efb 100644 --- a/trunk/arch/x86/pci/acpi.c +++ b/trunk/arch/x86/pci/acpi.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index cf2e93869c48..294e10cb11e1 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/arch/x86/pci/common.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/pci/irq.c b/trunk/arch/x86/pci/irq.c index 5d362b5ba06f..8b107521d24e 100644 --- a/trunk/arch/x86/pci/irq.c +++ b/trunk/arch/x86/pci/irq.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/x86/pci/mmconfig-shared.c b/trunk/arch/x86/pci/mmconfig-shared.c index 39b9ebe8f886..8f3f9a50b1e0 100644 --- a/trunk/arch/x86/pci/mmconfig-shared.c +++ b/trunk/arch/x86/pci/mmconfig-shared.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/pci/pcbios.c b/trunk/arch/x86/pci/pcbios.c index 59a225c17b84..1c975cc9839e 100644 --- a/trunk/arch/x86/pci/pcbios.c +++ b/trunk/arch/x86/pci/pcbios.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/x86/power/hibernate_32.c b/trunk/arch/x86/power/hibernate_32.c index 3769079874d8..81197c62d5b3 100644 --- a/trunk/arch/x86/power/hibernate_32.c +++ b/trunk/arch/x86/power/hibernate_32.c @@ -6,7 +6,6 @@ * Copyright (c) 2006 Rafael J. Wysocki */ -#include #include #include diff --git a/trunk/arch/x86/power/hibernate_64.c b/trunk/arch/x86/power/hibernate_64.c index d24f983ba1e5..65fdc86e923f 100644 --- a/trunk/arch/x86/power/hibernate_64.c +++ b/trunk/arch/x86/power/hibernate_64.c @@ -8,7 +8,6 @@ * Copyright (c) 2001 Patrick Mochel */ -#include #include #include #include diff --git a/trunk/arch/x86/vdso/vma.c b/trunk/arch/x86/vdso/vma.c index ac74869b8140..21e1aeb9f3ea 100644 --- a/trunk/arch/x86/vdso/vma.c +++ b/trunk/arch/x86/vdso/vma.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/x86/xen/debugfs.c b/trunk/arch/x86/xen/debugfs.c index 1304bcec8ee5..e133ce25e290 100644 --- a/trunk/arch/x86/xen/debugfs.c +++ b/trunk/arch/x86/xen/debugfs.c @@ -1,6 +1,5 @@ #include #include -#include #include #include "debugfs.h" diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index 65d8d79b46a8..b607239c1ba8 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/arch/x86/xen/enlighten.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/xen/mmu.c b/trunk/arch/x86/xen/mmu.c index 914f04695ce5..f9eb7de74f42 100644 --- a/trunk/arch/x86/xen/mmu.c +++ b/trunk/arch/x86/xen/mmu.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/x86/xen/smp.c b/trunk/arch/x86/xen/smp.c index a29693fd3138..deafb65ef44e 100644 --- a/trunk/arch/x86/xen/smp.c +++ b/trunk/arch/x86/xen/smp.c @@ -14,7 +14,6 @@ */ #include #include -#include #include #include diff --git a/trunk/arch/x86/xen/spinlock.c b/trunk/arch/x86/xen/spinlock.c index e0500646585d..24ded31b5aec 100644 --- a/trunk/arch/x86/xen/spinlock.c +++ b/trunk/arch/x86/xen/spinlock.c @@ -6,7 +6,6 @@ #include #include #include -#include #include diff --git a/trunk/arch/x86/xen/time.c b/trunk/arch/x86/xen/time.c index 32764b8880b5..0d3f07cd1b5f 100644 --- a/trunk/arch/x86/xen/time.c +++ b/trunk/arch/x86/xen/time.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/xtensa/kernel/pci-dma.c b/trunk/arch/xtensa/kernel/pci-dma.c index 2783fda76ddc..f5319d78c876 100644 --- a/trunk/arch/xtensa/kernel/pci-dma.c +++ b/trunk/arch/xtensa/kernel/pci-dma.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/xtensa/kernel/process.c b/trunk/arch/xtensa/kernel/process.c index f167e0f5e05e..e1a04a346e75 100644 --- a/trunk/arch/xtensa/kernel/process.c +++ b/trunk/arch/xtensa/kernel/process.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/xtensa/mm/init.c b/trunk/arch/xtensa/mm/init.c index ba150e5de2eb..cdbc27ca9665 100644 --- a/trunk/arch/xtensa/mm/init.c +++ b/trunk/arch/xtensa/mm/init.c @@ -18,11 +18,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/trunk/arch/xtensa/platforms/iss/console.c b/trunk/arch/xtensa/platforms/iss/console.c index 2c723e8b30da..e60a1f57022f 100644 --- a/trunk/arch/xtensa/platforms/iss/console.c +++ b/trunk/arch/xtensa/platforms/iss/console.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/block/blk-barrier.c b/trunk/block/blk-barrier.c index 6d88544b677f..8618d8996fea 100644 --- a/trunk/block/blk-barrier.c +++ b/trunk/block/blk-barrier.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "blk.h" diff --git a/trunk/block/blk-cgroup.c b/trunk/block/blk-cgroup.c index 5fe03def34b2..4b686ad08eaa 100644 --- a/trunk/block/blk-cgroup.c +++ b/trunk/block/blk-cgroup.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "blk-cgroup.h" static DEFINE_SPINLOCK(blkio_list_lock); diff --git a/trunk/block/blk-integrity.c b/trunk/block/blk-integrity.c index edce1ef7933d..96e83c2bdb94 100644 --- a/trunk/block/blk-integrity.c +++ b/trunk/block/blk-integrity.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "blk.h" diff --git a/trunk/block/blk-ioc.c b/trunk/block/blk-ioc.c index d22c4c55c406..3f65c8aadb2f 100644 --- a/trunk/block/blk-ioc.c +++ b/trunk/block/blk-ioc.c @@ -7,7 +7,6 @@ #include #include #include /* for max_pfn/max_low_pfn */ -#include #include "blk.h" diff --git a/trunk/block/blk-settings.c b/trunk/block/blk-settings.c index d9a9db5f0a2b..31e7a9375c13 100644 --- a/trunk/block/blk-settings.c +++ b/trunk/block/blk-settings.c @@ -9,7 +9,6 @@ #include /* for max_pfn/max_low_pfn */ #include #include -#include #include "blk.h" diff --git a/trunk/block/blk-sysfs.c b/trunk/block/blk-sysfs.c index c2b821fa324a..2ae2cb3f362f 100644 --- a/trunk/block/blk-sysfs.c +++ b/trunk/block/blk-sysfs.c @@ -2,7 +2,6 @@ * Functions related to sysfs handling */ #include -#include #include #include #include diff --git a/trunk/block/blk-tag.c b/trunk/block/blk-tag.c index ece65fc4c79b..6b0f52c20964 100644 --- a/trunk/block/blk-tag.c +++ b/trunk/block/blk-tag.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "blk.h" diff --git a/trunk/block/bsg.c b/trunk/block/bsg.c index 82d58829ba59..46597a6bd112 100644 --- a/trunk/block/bsg.c +++ b/trunk/block/bsg.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index fc98a48554fd..dee9d9378fee 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -7,7 +7,6 @@ * Copyright (C) 2003 Jens Axboe */ #include -#include #include #include #include diff --git a/trunk/block/compat_ioctl.c b/trunk/block/compat_ioctl.c index f26051f44681..4eb8e9ea4af5 100644 --- a/trunk/block/compat_ioctl.c +++ b/trunk/block/compat_ioctl.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/block/ioctl.c b/trunk/block/ioctl.c index 8905d2a2a717..be48ea51faee 100644 --- a/trunk/block/ioctl.c +++ b/trunk/block/ioctl.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/trunk/block/noop-iosched.c b/trunk/block/noop-iosched.c index 232c4b38cd37..3a0d369d08c7 100644 --- a/trunk/block/noop-iosched.c +++ b/trunk/block/noop-iosched.c @@ -5,7 +5,6 @@ #include #include #include -#include #include struct noop_data { diff --git a/trunk/crypto/algapi.c b/trunk/crypto/algapi.c index 76fae27ed01c..3e4524e6139b 100644 --- a/trunk/crypto/algapi.c +++ b/trunk/crypto/algapi.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "internal.h" diff --git a/trunk/crypto/algboss.c b/trunk/crypto/algboss.c index c3c196b5823a..412241ce4cfa 100644 --- a/trunk/crypto/algboss.c +++ b/trunk/crypto/algboss.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "internal.h" diff --git a/trunk/crypto/async_tx/async_pq.c b/trunk/crypto/async_tx/async_pq.c index fdd8257d35d9..ec87f53d5059 100644 --- a/trunk/crypto/async_tx/async_pq.c +++ b/trunk/crypto/async_tx/async_pq.c @@ -24,7 +24,6 @@ #include #include #include -#include /** * pq_scribble_page - space to hold throwaway P or Q buffer for diff --git a/trunk/crypto/async_tx/raid6test.c b/trunk/crypto/async_tx/raid6test.c index c1321935ebcc..f84f6b4301d9 100644 --- a/trunk/crypto/async_tx/raid6test.c +++ b/trunk/crypto/async_tx/raid6test.c @@ -20,7 +20,6 @@ * */ #include -#include #include #undef pr diff --git a/trunk/crypto/hmac.c b/trunk/crypto/hmac.c index 8d9544cf8169..15c2eb534541 100644 --- a/trunk/crypto/hmac.c +++ b/trunk/crypto/hmac.c @@ -23,6 +23,7 @@ #include #include #include +#include #include struct hmac_ctx { diff --git a/trunk/crypto/rng.c b/trunk/crypto/rng.c index f93cb5311182..ba05e7380e76 100644 --- a/trunk/crypto/rng.c +++ b/trunk/crypto/rng.c @@ -19,7 +19,6 @@ #include #include #include -#include #include static DEFINE_MUTEX(crypto_default_rng_lock); diff --git a/trunk/crypto/seqiv.c b/trunk/crypto/seqiv.c index 4c4491229417..5a013a8bf87a 100644 --- a/trunk/crypto/seqiv.c +++ b/trunk/crypto/seqiv.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/crypto/tcrypt.c b/trunk/crypto/tcrypt.c index a35159947a26..aa3f84ccc786 100644 --- a/trunk/crypto/tcrypt.c +++ b/trunk/crypto/tcrypt.c @@ -18,8 +18,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/trunk/crypto/xor.c b/trunk/crypto/xor.c index b75182d8ab14..fc5b836f3430 100644 --- a/trunk/crypto/xor.c +++ b/trunk/crypto/xor.c @@ -18,7 +18,6 @@ #define BH_TRACE 0 #include -#include #include #include #include diff --git a/trunk/drivers/acpi/ac.c b/trunk/drivers/acpi/ac.c index 56205a0b85df..b6ed60b57b0d 100644 --- a/trunk/drivers/acpi/ac.c +++ b/trunk/drivers/acpi/ac.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #ifdef CONFIG_ACPI_PROCFS_POWER diff --git a/trunk/drivers/acpi/acpi_memhotplug.c b/trunk/drivers/acpi/acpi_memhotplug.c index d98571385656..3597d73f28f6 100644 --- a/trunk/drivers/acpi/acpi_memhotplug.c +++ b/trunk/drivers/acpi/acpi_memhotplug.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #define ACPI_MEMORY_DEVICE_CLASS "memory" diff --git a/trunk/drivers/acpi/acpi_pad.c b/trunk/drivers/acpi/acpi_pad.c index 19dacfd43163..7e52295f1ecc 100644 --- a/trunk/drivers/acpi/acpi_pad.c +++ b/trunk/drivers/acpi/acpi_pad.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/battery.c b/trunk/drivers/acpi/battery.c index 5717bd300869..75f39f2c166d 100644 --- a/trunk/drivers/acpi/battery.c +++ b/trunk/drivers/acpi/battery.c @@ -32,7 +32,6 @@ #include #include #include -#include #ifdef CONFIG_ACPI_PROCFS_POWER #include diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index 37132dc2da03..b70cd3756142 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -32,7 +32,6 @@ #include #include #include -#include #ifdef CONFIG_X86 #include #endif diff --git a/trunk/drivers/acpi/button.c b/trunk/drivers/acpi/button.c index fd51c4ab4829..f53fbe307c9d 100644 --- a/trunk/drivers/acpi/button.c +++ b/trunk/drivers/acpi/button.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/container.c b/trunk/drivers/acpi/container.c index 45cd03b4630e..5faf6c21257d 100644 --- a/trunk/drivers/acpi/container.c +++ b/trunk/drivers/acpi/container.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/debug.c b/trunk/drivers/acpi/debug.c index 146135e7a6a1..cc421b7ae166 100644 --- a/trunk/drivers/acpi/debug.c +++ b/trunk/drivers/acpi/debug.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/dock.c b/trunk/drivers/acpi/dock.c index a9c429c5d50f..d9a85f1ddde6 100644 --- a/trunk/drivers/acpi/dock.c +++ b/trunk/drivers/acpi/dock.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/ec.c b/trunk/drivers/acpi/ec.c index 35ba2547f544..1ac28c6a672e 100644 --- a/trunk/drivers/acpi/ec.c +++ b/trunk/drivers/acpi/ec.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/event.c b/trunk/drivers/acpi/event.c index d439314a75d8..c511071bfd79 100644 --- a/trunk/drivers/acpi/event.c +++ b/trunk/drivers/acpi/event.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/glue.c b/trunk/drivers/acpi/glue.c index 4af6301601e7..6d5b64b7d526 100644 --- a/trunk/drivers/acpi/glue.c +++ b/trunk/drivers/acpi/glue.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/pci_irq.c b/trunk/drivers/acpi/pci_irq.c index b0a71ecee682..843699ed93f2 100644 --- a/trunk/drivers/acpi/pci_irq.c +++ b/trunk/drivers/acpi/pci_irq.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/pci_link.c b/trunk/drivers/acpi/pci_link.c index 8d47a5846aeb..04b0f007c9b7 100644 --- a/trunk/drivers/acpi/pci_link.c +++ b/trunk/drivers/acpi/pci_link.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/pci_root.c b/trunk/drivers/acpi/pci_root.c index aefce33f2a09..d724736d56c8 100644 --- a/trunk/drivers/acpi/pci_root.c +++ b/trunk/drivers/acpi/pci_root.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/pci_slot.c b/trunk/drivers/acpi/pci_slot.c index 07f7fea8a4e2..11f219743204 100644 --- a/trunk/drivers/acpi/pci_slot.c +++ b/trunk/drivers/acpi/pci_slot.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/power.c b/trunk/drivers/acpi/power.c index ddc76787b842..0f30c3c1eea4 100644 --- a/trunk/drivers/acpi/power.c +++ b/trunk/drivers/acpi/power.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/power_meter.c b/trunk/drivers/acpi/power_meter.c index e8c32a49f14e..834c5af0de4b 100644 --- a/trunk/drivers/acpi/power_meter.c +++ b/trunk/drivers/acpi/power_meter.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/processor_core.c b/trunk/drivers/acpi/processor_core.c index 51284351418f..791ac7b0f8df 100644 --- a/trunk/drivers/acpi/processor_core.c +++ b/trunk/drivers/acpi/processor_core.c @@ -8,7 +8,6 @@ * - Added _PDC for platforms with Intel CPUs */ #include -#include #include #include diff --git a/trunk/drivers/acpi/processor_driver.c b/trunk/drivers/acpi/processor_driver.c index 5675d9747e87..b5658cdce27f 100644 --- a/trunk/drivers/acpi/processor_driver.c +++ b/trunk/drivers/acpi/processor_driver.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index 5939e7f7d8e9..37dfce749398 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/processor_perflib.c b/trunk/drivers/acpi/processor_perflib.c index ba1bd263d903..d648a9860b88 100644 --- a/trunk/drivers/acpi/processor_perflib.c +++ b/trunk/drivers/acpi/processor_perflib.c @@ -30,7 +30,6 @@ #include #include #include -#include #ifdef CONFIG_X86 #include diff --git a/trunk/drivers/acpi/processor_throttling.c b/trunk/drivers/acpi/processor_throttling.c index 9ade1a5b32ed..29c6f5766dcf 100644 --- a/trunk/drivers/acpi/processor_throttling.c +++ b/trunk/drivers/acpi/processor_throttling.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/sbs.c b/trunk/drivers/acpi/sbs.c index 4ff76e8174eb..89ad11138e48 100644 --- a/trunk/drivers/acpi/sbs.c +++ b/trunk/drivers/acpi/sbs.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/acpi/sbshc.c b/trunk/drivers/acpi/sbshc.c index 36704b887ccf..fd09229282ea 100644 --- a/trunk/drivers/acpi/sbshc.c +++ b/trunk/drivers/acpi/sbshc.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include "sbshc.h" diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index 0261b116d051..189cbc2585fa 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/system.c b/trunk/drivers/acpi/system.c index 4aaf24976138..743f2445e2a1 100644 --- a/trunk/drivers/acpi/system.c +++ b/trunk/drivers/acpi/system.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/thermal.c b/trunk/drivers/acpi/thermal.c index efad1f33aeb5..5d3893558cf7 100644 --- a/trunk/drivers/acpi/thermal.c +++ b/trunk/drivers/acpi/thermal.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/utils.c b/trunk/drivers/acpi/utils.c index b002a471c5d4..c9a49f4747e6 100644 --- a/trunk/drivers/acpi/utils.c +++ b/trunk/drivers/acpi/utils.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index 6a0143796772..cbe6f3924a10 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/ahci.c b/trunk/drivers/ata/ahci.c index 5326af28a410..fdc9bcbe55a2 100644 --- a/trunk/drivers/ata/ahci.c +++ b/trunk/drivers/ata/ahci.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 83bc49fac9bb..c33806654e46 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -90,7 +90,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/libata-acpi.c b/trunk/drivers/ata/libata-acpi.c index 7b5eea7e01dc..292fdbc0431a 100644 --- a/trunk/drivers/ata/libata-acpi.c +++ b/trunk/drivers/ata/libata-acpi.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "libata.h" diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 49cffb6094a3..4a28420efff2 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -1494,7 +1493,6 @@ static int ata_hpa_resize(struct ata_device *dev) { struct ata_eh_context *ehc = &dev->link->eh_context; int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; - bool unlock_hpa = ata_ignore_hpa || dev->flags & ATA_DFLAG_UNLOCK_HPA; u64 sectors = ata_id_n_sectors(dev->id); u64 native_sectors; int rc; @@ -1511,7 +1509,7 @@ static int ata_hpa_resize(struct ata_device *dev) /* If device aborted the command or HPA isn't going to * be unlocked, skip HPA resizing. */ - if (rc == -EACCES || !unlock_hpa) { + if (rc == -EACCES || !ata_ignore_hpa) { ata_dev_printk(dev, KERN_WARNING, "HPA support seems " "broken, skipping HPA handling\n"); dev->horkage |= ATA_HORKAGE_BROKEN_HPA; @@ -1526,7 +1524,7 @@ static int ata_hpa_resize(struct ata_device *dev) dev->n_native_sectors = native_sectors; /* nothing to do? */ - if (native_sectors <= sectors || !unlock_hpa) { + if (native_sectors <= sectors || !ata_ignore_hpa) { if (!print_info || native_sectors == sectors) return 0; @@ -4187,51 +4185,36 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class, goto fail; /* verify n_sectors hasn't changed */ - if (dev->class != ATA_DEV_ATA || !n_sectors || - dev->n_sectors == n_sectors) - return 0; - - /* n_sectors has changed */ - ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch %llu != %llu\n", - (unsigned long long)n_sectors, - (unsigned long long)dev->n_sectors); - - /* - * Something could have caused HPA to be unlocked - * involuntarily. If n_native_sectors hasn't changed and the - * new size matches it, keep the device. - */ - if (dev->n_native_sectors == n_native_sectors && - dev->n_sectors > n_sectors && dev->n_sectors == n_native_sectors) { - ata_dev_printk(dev, KERN_WARNING, - "new n_sectors matches native, probably " - "late HPA unlock, continuing\n"); - /* keep using the old n_sectors */ - dev->n_sectors = n_sectors; - return 0; + if (dev->class == ATA_DEV_ATA && n_sectors && + dev->n_sectors != n_sectors) { + ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch " + "%llu != %llu\n", + (unsigned long long)n_sectors, + (unsigned long long)dev->n_sectors); + /* + * Something could have caused HPA to be unlocked + * involuntarily. If n_native_sectors hasn't changed + * and the new size matches it, keep the device. + */ + if (dev->n_native_sectors == n_native_sectors && + dev->n_sectors > n_sectors && + dev->n_sectors == n_native_sectors) { + ata_dev_printk(dev, KERN_WARNING, + "new n_sectors matches native, probably " + "late HPA unlock, continuing\n"); + /* keep using the old n_sectors */ + dev->n_sectors = n_sectors; + } else { + /* restore original n_[native]_sectors and fail */ + dev->n_native_sectors = n_native_sectors; + dev->n_sectors = n_sectors; + rc = -ENODEV; + goto fail; + } } - /* - * Some BIOSes boot w/o HPA but resume w/ HPA locked. Try - * unlocking HPA in those cases. - * - * https://bugzilla.kernel.org/show_bug.cgi?id=15396 - */ - if (dev->n_native_sectors == n_native_sectors && - dev->n_sectors < n_sectors && n_sectors == n_native_sectors && - !(dev->horkage & ATA_HORKAGE_BROKEN_HPA)) { - ata_dev_printk(dev, KERN_WARNING, - "old n_sectors matches native, probably " - "late HPA lock, will try to unlock HPA\n"); - /* try unlocking HPA */ - dev->flags |= ATA_DFLAG_UNLOCK_HPA; - rc = -EIO; - } else - rc = -ENODEV; + return 0; - /* restore original n_[native_]sectors and fail */ - dev->n_native_sectors = n_native_sectors; - dev->n_sectors = n_sectors; fail: ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); return rc; @@ -4370,9 +4353,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, }, { "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, }, - /* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */ - { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, }, - /* devices which puke on READ_NATIVE_MAX */ { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, }, { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA }, diff --git a/trunk/drivers/ata/libata-pmp.c b/trunk/drivers/ata/libata-pmp.c index 00305f41ed86..51f0ffb78cbd 100644 --- a/trunk/drivers/ata/libata-pmp.c +++ b/trunk/drivers/ata/libata-pmp.c @@ -9,7 +9,6 @@ #include #include -#include #include "libata.h" const struct ata_port_operations sata_pmp_port_ops = { diff --git a/trunk/drivers/ata/libata-scsi.c b/trunk/drivers/ata/libata-scsi.c index 0088cdeb0b1e..bea003a24d27 100644 --- a/trunk/drivers/ata/libata-scsi.c +++ b/trunk/drivers/ata/libata-scsi.c @@ -33,7 +33,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/ata/libata-sff.c b/trunk/drivers/ata/libata-sff.c index e3877b6843c9..277477251a86 100644 --- a/trunk/drivers/ata/libata-sff.c +++ b/trunk/drivers/ata/libata-sff.c @@ -33,7 +33,6 @@ */ #include -#include #include #include #include @@ -1816,6 +1815,10 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) !ap->ops->sff_irq_check(ap)) continue; + if (printk_ratelimit()) + ata_port_printk(ap, KERN_INFO, + "clearing spurious IRQ\n"); + if (idle & (1 << i)) { ap->ops->sff_check_status(ap); ap->ops->sff_irq_clear(ap); diff --git a/trunk/drivers/ata/pata_acpi.c b/trunk/drivers/ata/pata_acpi.c index 1ea2be0f4b94..8e5e13210426 100644 --- a/trunk/drivers/ata/pata_acpi.c +++ b/trunk/drivers/ata/pata_acpi.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/pata_at32.c b/trunk/drivers/ata/pata_at32.c index 66ce6a526f27..5c129f99a7e3 100644 --- a/trunk/drivers/ata/pata_at32.c +++ b/trunk/drivers/ata/pata_at32.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_at91.c b/trunk/drivers/ata/pata_at91.c index c6a946aa252c..376dd380b43c 100644 --- a/trunk/drivers/ata/pata_at91.c +++ b/trunk/drivers/ata/pata_at91.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_atp867x.c b/trunk/drivers/ata/pata_atp867x.c index bb6e0746e07d..6fe7ded40c6a 100644 --- a/trunk/drivers/ata/pata_atp867x.c +++ b/trunk/drivers/ata/pata_atp867x.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/pata_cmd640.c b/trunk/drivers/ata/pata_cmd640.c index 45896b3c6538..6cd5d5dd9e3b 100644 --- a/trunk/drivers/ata/pata_cmd640.c +++ b/trunk/drivers/ata/pata_cmd640.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/pata_icside.c b/trunk/drivers/ata/pata_icside.c index fa812e206eeb..b663b7ffae4b 100644 --- a/trunk/drivers/ata/pata_icside.c +++ b/trunk/drivers/ata/pata_icside.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_it821x.c b/trunk/drivers/ata/pata_it821x.c index 5cb286fd839e..9bde1cb5f981 100644 --- a/trunk/drivers/ata/pata_it821x.c +++ b/trunk/drivers/ata/pata_it821x.c @@ -75,7 +75,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/pata_macio.c b/trunk/drivers/ata/pata_macio.c index 211b6438b3a0..4cc7bbd10ec2 100644 --- a/trunk/drivers/ata/pata_macio.c +++ b/trunk/drivers/ata/pata_macio.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/pata_mpc52xx.c b/trunk/drivers/ata/pata_mpc52xx.c index 9f5b053611dd..2bc2dbe30e8f 100644 --- a/trunk/drivers/ata/pata_mpc52xx.c +++ b/trunk/drivers/ata/pata_mpc52xx.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/drivers/ata/pata_octeon_cf.c b/trunk/drivers/ata/pata_octeon_cf.c index 005a44483a7b..37ef416c1242 100644 --- a/trunk/drivers/ata/pata_octeon_cf.c +++ b/trunk/drivers/ata/pata_octeon_cf.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_pcmcia.c b/trunk/drivers/ata/pata_pcmcia.c index 3c3172d3c34e..147de2fd66d2 100644 --- a/trunk/drivers/ata/pata_pcmcia.c +++ b/trunk/drivers/ata/pata_pcmcia.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_rb532_cf.c b/trunk/drivers/ata/pata_rb532_cf.c index 0ffd631000b7..45f1e10f917b 100644 --- a/trunk/drivers/ata/pata_rb532_cf.c +++ b/trunk/drivers/ata/pata_rb532_cf.c @@ -19,7 +19,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/ata/pata_rdc.c b/trunk/drivers/ata/pata_rdc.c index 37092cfd7bc6..237a24d41a2d 100644 --- a/trunk/drivers/ata/pata_rdc.c +++ b/trunk/drivers/ata/pata_rdc.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pata_via.c b/trunk/drivers/ata/pata_via.c index 741e7cb69d8c..c59b40710fbd 100644 --- a/trunk/drivers/ata/pata_via.c +++ b/trunk/drivers/ata/pata_via.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/pdc_adma.c b/trunk/drivers/ata/pdc_adma.c index 5904cfdb8dbe..6c65b0776a2c 100644 --- a/trunk/drivers/ata/pdc_adma.c +++ b/trunk/drivers/ata/pdc_adma.c @@ -34,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_fsl.c b/trunk/drivers/ata/sata_fsl.c index a69192b38b43..ce4136eea08f 100644 --- a/trunk/drivers/ata/sata_fsl.c +++ b/trunk/drivers/ata/sata_fsl.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ata/sata_inic162x.c b/trunk/drivers/ata/sata_inic162x.c index 27dc6c86a4cd..4406902b4293 100644 --- a/trunk/drivers/ata/sata_inic162x.c +++ b/trunk/drivers/ata/sata_inic162x.c @@ -39,7 +39,6 @@ * happy to assist. */ -#include #include #include #include diff --git a/trunk/drivers/ata/sata_mv.c b/trunk/drivers/ata/sata_mv.c index 71cc0d42f9e1..df8ee325d3ca 100644 --- a/trunk/drivers/ata/sata_mv.c +++ b/trunk/drivers/ata/sata_mv.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_nv.c b/trunk/drivers/ata/sata_nv.c index 2a98b09ab735..684fe04dbbb7 100644 --- a/trunk/drivers/ata/sata_nv.c +++ b/trunk/drivers/ata/sata_nv.c @@ -38,7 +38,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_promise.c b/trunk/drivers/ata/sata_promise.c index 5356ec00d2b4..63306285c843 100644 --- a/trunk/drivers/ata/sata_promise.c +++ b/trunk/drivers/ata/sata_promise.c @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_qstor.c b/trunk/drivers/ata/sata_qstor.c index 92ba45e6689b..326c0cfc29b3 100644 --- a/trunk/drivers/ata/sata_qstor.c +++ b/trunk/drivers/ata/sata_qstor.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_sil24.c b/trunk/drivers/ata/sata_sil24.c index 433b6b89c795..1370df6c420c 100644 --- a/trunk/drivers/ata/sata_sil24.c +++ b/trunk/drivers/ata/sata_sil24.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_sx4.c b/trunk/drivers/ata/sata_sx4.c index 232468f2ea90..bbcf970068ad 100644 --- a/trunk/drivers/ata/sata_sx4.c +++ b/trunk/drivers/ata/sata_sx4.c @@ -81,7 +81,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ata/sata_uli.c b/trunk/drivers/ata/sata_uli.c index 011e098590d1..e5bff47e8aa1 100644 --- a/trunk/drivers/ata/sata_uli.c +++ b/trunk/drivers/ata/sata_uli.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/adummy.c b/trunk/drivers/atm/adummy.c index 6d44f07b69f8..5effec6f5458 100644 --- a/trunk/drivers/atm/adummy.c +++ b/trunk/drivers/atm/adummy.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/ambassador.c b/trunk/drivers/atm/ambassador.c index 9d18644c897e..8af23411743c 100644 --- a/trunk/drivers/atm/ambassador.c +++ b/trunk/drivers/atm/ambassador.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/atm/atmtcp.c b/trunk/drivers/atm/atmtcp.c index b86712167eb8..02ad83d6b562 100644 --- a/trunk/drivers/atm/atmtcp.c +++ b/trunk/drivers/atm/atmtcp.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/atm/eni.c b/trunk/drivers/atm/eni.c index 719ec5a0dca5..0c3026145443 100644 --- a/trunk/drivers/atm/eni.c +++ b/trunk/drivers/atm/eni.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/firestream.c b/trunk/drivers/atm/firestream.c index 6e600afd06ae..cd5049af47a9 100644 --- a/trunk/drivers/atm/firestream.c +++ b/trunk/drivers/atm/firestream.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/he.c b/trunk/drivers/atm/he.c index c213e0da0343..e8c6529dc366 100644 --- a/trunk/drivers/atm/he.c +++ b/trunk/drivers/atm/he.c @@ -67,7 +67,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/horizon.c b/trunk/drivers/atm/horizon.c index 54720baa7363..4e49021e67ee 100644 --- a/trunk/drivers/atm/horizon.c +++ b/trunk/drivers/atm/horizon.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/atm/idt77105.c b/trunk/drivers/atm/idt77105.c index dab5cf5274fb..84672dc57f7a 100644 --- a/trunk/drivers/atm/idt77105.c +++ b/trunk/drivers/atm/idt77105.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/idt77252.c b/trunk/drivers/atm/idt77252.c index 98657a6a330d..01f36c08cb52 100644 --- a/trunk/drivers/atm/idt77252.c +++ b/trunk/drivers/atm/idt77252.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/atm/iphase.c b/trunk/drivers/atm/iphase.c index ee9ddeb53417..25a4c86f839b 100644 --- a/trunk/drivers/atm/iphase.c +++ b/trunk/drivers/atm/iphase.c @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/lanai.c b/trunk/drivers/atm/lanai.c index cbe15a86c669..23d95054705b 100644 --- a/trunk/drivers/atm/lanai.c +++ b/trunk/drivers/atm/lanai.c @@ -55,7 +55,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/atm/nicstar.c b/trunk/drivers/atm/nicstar.c index b7473a6110a7..50838407b117 100644 --- a/trunk/drivers/atm/nicstar.c +++ b/trunk/drivers/atm/nicstar.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/solos-pci.c b/trunk/drivers/atm/solos-pci.c index ded76c4c9f4f..51eed679a059 100644 --- a/trunk/drivers/atm/solos-pci.c +++ b/trunk/drivers/atm/solos-pci.c @@ -40,7 +40,6 @@ #include #include #include -#include #define VERSION "0.07" #define PTAG "solos-pci" diff --git a/trunk/drivers/atm/suni.c b/trunk/drivers/atm/suni.c index da4b91ffa53e..6dd3f5919968 100644 --- a/trunk/drivers/atm/suni.c +++ b/trunk/drivers/atm/suni.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/atm/uPD98402.c b/trunk/drivers/atm/uPD98402.c index c45ae0573bbd..fc8cb07c2477 100644 --- a/trunk/drivers/atm/uPD98402.c +++ b/trunk/drivers/atm/uPD98402.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/atm/zatm.c b/trunk/drivers/atm/zatm.c index 702accec89e9..2e9635be048c 100644 --- a/trunk/drivers/atm/zatm.c +++ b/trunk/drivers/atm/zatm.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/auxdisplay/cfag12864b.c b/trunk/drivers/auxdisplay/cfag12864b.c index 49758593a5ba..eacb175f6bd3 100644 --- a/trunk/drivers/auxdisplay/cfag12864b.c +++ b/trunk/drivers/auxdisplay/cfag12864b.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/auxdisplay/cfag12864bfb.c b/trunk/drivers/auxdisplay/cfag12864bfb.c index 3fecfb446d90..b0ca5a47f47d 100644 --- a/trunk/drivers/auxdisplay/cfag12864bfb.c +++ b/trunk/drivers/auxdisplay/cfag12864bfb.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/base/attribute_container.c b/trunk/drivers/base/attribute_container.c index 8fc200b2e2c0..b9cda053d3c0 100644 --- a/trunk/drivers/base/attribute_container.c +++ b/trunk/drivers/base/attribute_container.c @@ -328,7 +328,6 @@ attribute_container_add_attrs(struct device *classdev) return sysfs_create_group(&classdev->kobj, cont->grp); for (i = 0; attrs[i]; i++) { - sysfs_attr_init(&attrs[i]->attr); error = device_create_file(classdev, attrs[i]); if (error) return error; diff --git a/trunk/drivers/base/bus.c b/trunk/drivers/base/bus.c index 12eec3f633b1..71f6af5c8b0b 100644 --- a/trunk/drivers/base/bus.c +++ b/trunk/drivers/base/bus.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include "base.h" diff --git a/trunk/drivers/base/cpu.c b/trunk/drivers/base/cpu.c index f35719aab3c1..b5242e1e8bc4 100644 --- a/trunk/drivers/base/cpu.c +++ b/trunk/drivers/base/cpu.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "base.h" diff --git a/trunk/drivers/base/devres.c b/trunk/drivers/base/devres.c index cf7a0c788052..05dd307e8f02 100644 --- a/trunk/drivers/base/devres.c +++ b/trunk/drivers/base/devres.c @@ -9,7 +9,6 @@ #include #include -#include #include "base.h" diff --git a/trunk/drivers/base/devtmpfs.c b/trunk/drivers/base/devtmpfs.c index 057cf11326bf..dac478c6e460 100644 --- a/trunk/drivers/base/devtmpfs.c +++ b/trunk/drivers/base/devtmpfs.c @@ -23,7 +23,6 @@ #include #include #include -#include static struct vfsmount *dev_mnt; diff --git a/trunk/drivers/base/dma-coherent.c b/trunk/drivers/base/dma-coherent.c index d4d8ce53886a..962a3b574f21 100644 --- a/trunk/drivers/base/dma-coherent.c +++ b/trunk/drivers/base/dma-coherent.c @@ -2,7 +2,6 @@ * Coherent per-device memory handling. * Borrowed from i386 */ -#include #include #include diff --git a/trunk/drivers/base/dma-mapping.c b/trunk/drivers/base/dma-mapping.c index 763d59c1eb65..ca9186f70a69 100644 --- a/trunk/drivers/base/dma-mapping.c +++ b/trunk/drivers/base/dma-mapping.c @@ -8,7 +8,6 @@ */ #include -#include /* * Managed DMA API diff --git a/trunk/drivers/base/driver.c b/trunk/drivers/base/driver.c index b631f7c59453..90c9fff09ead 100644 --- a/trunk/drivers/base/driver.c +++ b/trunk/drivers/base/driver.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "base.h" diff --git a/trunk/drivers/base/firmware_class.c b/trunk/drivers/base/firmware_class.c index 985da11174e7..18518ba13c81 100644 --- a/trunk/drivers/base/firmware_class.c +++ b/trunk/drivers/base/firmware_class.c @@ -19,7 +19,6 @@ #include #include #include -#include #define to_dev(obj) container_of(obj, struct device, kobj) diff --git a/trunk/drivers/base/memory.c b/trunk/drivers/base/memory.c index 4f4aa5897b4c..db0848e54cc6 100644 --- a/trunk/drivers/base/memory.c +++ b/trunk/drivers/base/memory.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/base/module.c b/trunk/drivers/base/module.c index f32f2f9b7be5..103be9cacb05 100644 --- a/trunk/drivers/base/module.c +++ b/trunk/drivers/base/module.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "base.h" diff --git a/trunk/drivers/base/node.c b/trunk/drivers/base/node.c index 985abd7f49a7..93b3ac65c2d4 100644 --- a/trunk/drivers/base/node.c +++ b/trunk/drivers/base/node.c @@ -15,7 +15,6 @@ #include #include #include -#include static struct sysdev_class_attribute *node_state_attrs[]; diff --git a/trunk/drivers/base/sys.c b/trunk/drivers/base/sys.c index 9354dc10a363..8980feec5d14 100644 --- a/trunk/drivers/base/sys.c +++ b/trunk/drivers/base/sys.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/block/amiflop.c b/trunk/drivers/block/amiflop.c index 0182a22c423a..055225839024 100644 --- a/trunk/drivers/block/amiflop.c +++ b/trunk/drivers/block/amiflop.c @@ -54,7 +54,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/block/aoe/aoeblk.c b/trunk/drivers/block/aoe/aoeblk.c index 035cefe4045a..3af97d4da2db 100644 --- a/trunk/drivers/block/aoe/aoeblk.c +++ b/trunk/drivers/block/aoe/aoeblk.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include "aoe.h" diff --git a/trunk/drivers/block/aoe/aoechr.c b/trunk/drivers/block/aoe/aoechr.c index 4a1b9e7464aa..62141ec09a22 100644 --- a/trunk/drivers/block/aoe/aoechr.c +++ b/trunk/drivers/block/aoe/aoechr.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include "aoe.h" diff --git a/trunk/drivers/block/aoe/aoecmd.c b/trunk/drivers/block/aoe/aoecmd.c index 5674bd01d96d..64a223b0cc22 100644 --- a/trunk/drivers/block/aoe/aoecmd.c +++ b/trunk/drivers/block/aoe/aoecmd.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/block/aoe/aoedev.c b/trunk/drivers/block/aoe/aoedev.c index 0849280bfc1c..fa67027789aa 100644 --- a/trunk/drivers/block/aoe/aoedev.c +++ b/trunk/drivers/block/aoe/aoedev.c @@ -8,7 +8,6 @@ #include #include #include -#include #include "aoe.h" static void dummy_timer(ulong); diff --git a/trunk/drivers/block/aoe/aoenet.c b/trunk/drivers/block/aoe/aoenet.c index 4d3bc0d49df5..ce0d62cd71b2 100644 --- a/trunk/drivers/block/aoe/aoenet.c +++ b/trunk/drivers/block/aoe/aoenet.c @@ -4,7 +4,6 @@ * Ethernet portion of AoE driver */ -#include #include #include #include diff --git a/trunk/drivers/block/brd.c b/trunk/drivers/block/brd.c index 6081e81d5738..c6ddeacb77fd 100644 --- a/trunk/drivers/block/brd.c +++ b/trunk/drivers/block/brd.c @@ -15,9 +15,9 @@ #include #include #include +#include #include #include /* invalidate_bh_lrus() */ -#include #include diff --git a/trunk/drivers/block/drbd/drbd_bitmap.c b/trunk/drivers/block/drbd/drbd_bitmap.c index 3d6f3d988949..b61057e77882 100644 --- a/trunk/drivers/block/drbd/drbd_bitmap.c +++ b/trunk/drivers/block/drbd/drbd_bitmap.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "drbd_int.h" diff --git a/trunk/drivers/block/drbd/drbd_proc.c b/trunk/drivers/block/drbd/drbd_proc.c index be3374b68460..df8ad9660d8f 100644 --- a/trunk/drivers/block/drbd/drbd_proc.c +++ b/trunk/drivers/block/drbd/drbd_proc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/block/hd.c b/trunk/drivers/block/hd.c index 034e6dfc878c..5116c65c07cb 100644 --- a/trunk/drivers/block/hd.c +++ b/trunk/drivers/block/hd.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/block/loop.c b/trunk/drivers/block/loop.c index cb69929d917a..bd112c8c7bcd 100644 --- a/trunk/drivers/block/loop.c +++ b/trunk/drivers/block/loop.c @@ -71,6 +71,7 @@ #include /* for invalidate_bdev() */ #include #include +#include #include #include diff --git a/trunk/drivers/block/mg_disk.c b/trunk/drivers/block/mg_disk.c index 28db925dbdad..5416c9a606e4 100644 --- a/trunk/drivers/block/mg_disk.c +++ b/trunk/drivers/block/mg_disk.c @@ -23,7 +23,6 @@ #include #include #include -#include #define MG_RES_SEC (CONFIG_MG_DISK_RES << 1) diff --git a/trunk/drivers/block/nbd.c b/trunk/drivers/block/nbd.c index 218d091f3c52..cc923a5b430c 100644 --- a/trunk/drivers/block/nbd.c +++ b/trunk/drivers/block/nbd.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/block/osdblk.c b/trunk/drivers/block/osdblk.c index 6cd8b705b11b..eb2091aa1c19 100644 --- a/trunk/drivers/block/osdblk.c +++ b/trunk/drivers/block/osdblk.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/block/paride/pd.c b/trunk/drivers/block/paride/pd.c index c1e5cd029b23..e712cd51af15 100644 --- a/trunk/drivers/block/paride/pd.c +++ b/trunk/drivers/block/paride/pd.c @@ -145,7 +145,6 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV}; #include #include -#include #include #include #include diff --git a/trunk/drivers/block/pktcdvd.c b/trunk/drivers/block/pktcdvd.c index ddf19425245d..39c8514442eb 100644 --- a/trunk/drivers/block/pktcdvd.c +++ b/trunk/drivers/block/pktcdvd.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/block/ps3disk.c b/trunk/drivers/block/ps3disk.c index 3b419e3fffa1..bc95469d33c1 100644 --- a/trunk/drivers/block/ps3disk.c +++ b/trunk/drivers/block/ps3disk.c @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/block/ps3vram.c b/trunk/drivers/block/ps3vram.c index b3bdb8af89cf..e44608229972 100644 --- a/trunk/drivers/block/ps3vram.c +++ b/trunk/drivers/block/ps3vram.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/block/swim.c b/trunk/drivers/block/swim.c index e463657569ff..821c2833f9cf 100644 --- a/trunk/drivers/block/swim.c +++ b/trunk/drivers/block/swim.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/block/ub.c b/trunk/drivers/block/ub.c index 0536b5b29adc..2e889838e819 100644 --- a/trunk/drivers/block/ub.c +++ b/trunk/drivers/block/ub.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #define DRV_NAME "ub" diff --git a/trunk/drivers/block/umem.c b/trunk/drivers/block/umem.c index 2f9470ff8f7c..ad1ba393801a 100644 --- a/trunk/drivers/block/umem.c +++ b/trunk/drivers/block/umem.c @@ -40,13 +40,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include /* O_ACCMODE */ diff --git a/trunk/drivers/block/virtio_blk.c b/trunk/drivers/block/virtio_blk.c index 4b12b820c9a6..3c64af05fa82 100644 --- a/trunk/drivers/block/virtio_blk.c +++ b/trunk/drivers/block/virtio_blk.c @@ -1,6 +1,5 @@ //#define DEBUG #include -#include #include #include #include diff --git a/trunk/drivers/block/xd.c b/trunk/drivers/block/xd.c index 18a80ff57ce8..1a325fb05c92 100644 --- a/trunk/drivers/block/xd.c +++ b/trunk/drivers/block/xd.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/block/xen-blkfront.c b/trunk/drivers/block/xen-blkfront.c index 82ed403147c0..9c09694b2520 100644 --- a/trunk/drivers/block/xen-blkfront.c +++ b/trunk/drivers/block/xen-blkfront.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/block/z2ram.c b/trunk/drivers/block/z2ram.c index 9114654b54d9..64f941e0f14b 100644 --- a/trunk/drivers/block/z2ram.c +++ b/trunk/drivers/block/z2ram.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/bluetooth/btmrvl_debugfs.c b/trunk/drivers/bluetooth/btmrvl_debugfs.c index b50b41d97a7f..3126a3d0c45c 100644 --- a/trunk/drivers/bluetooth/btmrvl_debugfs.c +++ b/trunk/drivers/bluetooth/btmrvl_debugfs.c @@ -19,7 +19,6 @@ **/ #include -#include #include #include diff --git a/trunk/drivers/bluetooth/btmrvl_drv.h b/trunk/drivers/bluetooth/btmrvl_drv.h index 204727586ee9..523d197b9824 100644 --- a/trunk/drivers/bluetooth/btmrvl_drv.h +++ b/trunk/drivers/bluetooth/btmrvl_drv.h @@ -21,7 +21,6 @@ #include #include -#include #include #define BTM_HEADER_LEN 4 diff --git a/trunk/drivers/bluetooth/btmrvl_sdio.c b/trunk/drivers/bluetooth/btmrvl_sdio.c index 0dba76aa2232..94f1f55f81f0 100644 --- a/trunk/drivers/bluetooth/btmrvl_sdio.c +++ b/trunk/drivers/bluetooth/btmrvl_sdio.c @@ -19,7 +19,6 @@ **/ #include -#include #include #include diff --git a/trunk/drivers/char/agp/amd-k7-agp.c b/trunk/drivers/char/agp/amd-k7-agp.c index a7637d72cef6..73dbf40c874d 100644 --- a/trunk/drivers/char/agp/amd-k7-agp.c +++ b/trunk/drivers/char/agp/amd-k7-agp.c @@ -6,9 +6,9 @@ #include #include #include +#include #include #include -#include #include "agp.h" #define AMD_MMBASE 0x14 diff --git a/trunk/drivers/char/agp/backend.c b/trunk/drivers/char/agp/backend.c index ee4f855611b6..c3ab46da51a3 100644 --- a/trunk/drivers/char/agp/backend.c +++ b/trunk/drivers/char/agp/backend.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/agp/compat_ioctl.c b/trunk/drivers/char/agp/compat_ioctl.c index 9d2c97a69cdd..58c57cb2518c 100644 --- a/trunk/drivers/char/agp/compat_ioctl.c +++ b/trunk/drivers/char/agp/compat_ioctl.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "agp.h" #include "compat_ioctl.h" diff --git a/trunk/drivers/char/agp/generic.c b/trunk/drivers/char/agp/generic.c index fb86708e47ed..c50543966eb2 100644 --- a/trunk/drivers/char/agp/generic.c +++ b/trunk/drivers/char/agp/generic.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/agp/hp-agp.c b/trunk/drivers/char/agp/hp-agp.c index 056b289a1e89..58752b70efea 100644 --- a/trunk/drivers/char/agp/hp-agp.c +++ b/trunk/drivers/char/agp/hp-agp.c @@ -15,7 +15,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/char/agp/intel-agp.c b/trunk/drivers/char/agp/intel-agp.c index d41331bc2aa7..b78d5c381efe 100644 --- a/trunk/drivers/char/agp/intel-agp.c +++ b/trunk/drivers/char/agp/intel-agp.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/char/agp/nvidia-agp.c b/trunk/drivers/char/agp/nvidia-agp.c index 10f24e349a26..7e36d2b4f9d4 100644 --- a/trunk/drivers/char/agp/nvidia-agp.c +++ b/trunk/drivers/char/agp/nvidia-agp.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/char/agp/sgi-agp.c b/trunk/drivers/char/agp/sgi-agp.c index ffa888cd1c88..0d426ae39c85 100644 --- a/trunk/drivers/char/agp/sgi-agp.c +++ b/trunk/drivers/char/agp/sgi-agp.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/agp/uninorth-agp.c b/trunk/drivers/char/agp/uninorth-agp.c index 6f48931ac1ce..d89da4ac061f 100644 --- a/trunk/drivers/char/agp/uninorth-agp.c +++ b/trunk/drivers/char/agp/uninorth-agp.c @@ -3,7 +3,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/char/bfin_jtag_comm.c b/trunk/drivers/char/bfin_jtag_comm.c index e397df3ad98e..2628c7415ea8 100644 --- a/trunk/drivers/char/bfin_jtag_comm.c +++ b/trunk/drivers/char/bfin_jtag_comm.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/briq_panel.c b/trunk/drivers/char/briq_panel.c index 555cd93c2ee5..d8cff909001c 100644 --- a/trunk/drivers/char/briq_panel.c +++ b/trunk/drivers/char/briq_panel.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/char/bsr.c b/trunk/drivers/char/bsr.c index 7fef305774de..c02db01f736e 100644 --- a/trunk/drivers/char/bsr.c +++ b/trunk/drivers/char/bsr.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/cyclades.c b/trunk/drivers/char/cyclades.c index 9824b4162904..b861c08263a4 100644 --- a/trunk/drivers/char/cyclades.c +++ b/trunk/drivers/char/cyclades.c @@ -79,7 +79,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/dsp56k.c b/trunk/drivers/char/dsp56k.c index 8a1b28a10ef0..85832ab924e6 100644 --- a/trunk/drivers/char/dsp56k.c +++ b/trunk/drivers/char/dsp56k.c @@ -24,6 +24,7 @@ */ #include +#include /* for kmalloc() and kfree() */ #include #include #include diff --git a/trunk/drivers/char/epca.c b/trunk/drivers/char/epca.c index 6f5ffe1320f7..17b044a71e02 100644 --- a/trunk/drivers/char/epca.c +++ b/trunk/drivers/char/epca.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/char/generic_serial.c b/trunk/drivers/char/generic_serial.c index 5954ee1dc953..d400cbd280f2 100644 --- a/trunk/drivers/char/generic_serial.c +++ b/trunk/drivers/char/generic_serial.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #define DEBUG diff --git a/trunk/drivers/char/hpet.c b/trunk/drivers/char/hpet.c index 9ded667625ac..9c5eea3ea4de 100644 --- a/trunk/drivers/char/hpet.c +++ b/trunk/drivers/char/hpet.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/hvc_console.c b/trunk/drivers/char/hvc_console.c index d3890e8d30e1..ba55bba151b9 100644 --- a/trunk/drivers/char/hvc_console.c +++ b/trunk/drivers/char/hvc_console.c @@ -38,7 +38,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/char/hvc_iucv.c b/trunk/drivers/char/hvc_iucv.c index 5a80ad68ef22..37b0542a4eeb 100644 --- a/trunk/drivers/char/hvc_iucv.c +++ b/trunk/drivers/char/hvc_iucv.c @@ -12,7 +12,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include #include diff --git a/trunk/drivers/char/hvcs.c b/trunk/drivers/char/hvcs.c index bedc6c1b6fa5..266b858b8f85 100644 --- a/trunk/drivers/char/hvcs.c +++ b/trunk/drivers/char/hvcs.c @@ -74,7 +74,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/hw_random/intel-rng.c b/trunk/drivers/char/hw_random/intel-rng.c index 86fe45c19968..91b53eb1c053 100644 --- a/trunk/drivers/char/hw_random/intel-rng.c +++ b/trunk/drivers/char/hw_random/intel-rng.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/char/hw_random/octeon-rng.c b/trunk/drivers/char/hw_random/octeon-rng.c index 9cd0feca318c..54b0d9ba65cf 100644 --- a/trunk/drivers/char/hw_random/octeon-rng.c +++ b/trunk/drivers/char/hw_random/octeon-rng.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/hw_random/tx4939-rng.c b/trunk/drivers/char/hw_random/tx4939-rng.c index 0bc0cb70210b..544d9085a8e8 100644 --- a/trunk/drivers/char/hw_random/tx4939-rng.c +++ b/trunk/drivers/char/hw_random/tx4939-rng.c @@ -14,7 +14,6 @@ #include #include #include -#include #define TX4939_RNG_RCSR 0x00000000 #define TX4939_RNG_ROR(n) (0x00000018 + (n) * 8) diff --git a/trunk/drivers/char/isicom.c b/trunk/drivers/char/isicom.c index 0fa2e4a0835d..be2e8f9a27c3 100644 --- a/trunk/drivers/char/isicom.c +++ b/trunk/drivers/char/isicom.c @@ -130,7 +130,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/mbcs.c b/trunk/drivers/char/mbcs.c index 83bef4efe376..87c67b42bc08 100644 --- a/trunk/drivers/char/mbcs.c +++ b/trunk/drivers/char/mbcs.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/misc.c b/trunk/drivers/char/misc.c index 92ab03d28294..94a136e96c06 100644 --- a/trunk/drivers/char/misc.c +++ b/trunk/drivers/char/misc.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -48,7 +49,6 @@ #include #include #include -#include /* * Head entry for the doubly linked miscdevice list diff --git a/trunk/drivers/char/mmtimer.c b/trunk/drivers/char/mmtimer.c index ea7c99fa978f..04fd0d843b3b 100644 --- a/trunk/drivers/char/mmtimer.c +++ b/trunk/drivers/char/mmtimer.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/moxa.c b/trunk/drivers/char/moxa.c index 107b0bd58d19..166495d6a1d7 100644 --- a/trunk/drivers/char/moxa.c +++ b/trunk/drivers/char/moxa.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/mxser.c b/trunk/drivers/char/mxser.c index 95c9f54f3d30..e0c5d2a69046 100644 --- a/trunk/drivers/char/mxser.c +++ b/trunk/drivers/char/mxser.c @@ -33,12 +33,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/char/nozomi.c b/trunk/drivers/char/nozomi.c index a6638003f530..a3f32a15fde4 100644 --- a/trunk/drivers/char/nozomi.c +++ b/trunk/drivers/char/nozomi.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/nvram.c b/trunk/drivers/char/nvram.c index 47e8f7b0e4c1..5eb83c3ca20d 100644 --- a/trunk/drivers/char/nvram.c +++ b/trunk/drivers/char/nvram.c @@ -100,6 +100,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/char/pcmcia/ipwireless/network.c b/trunk/drivers/char/pcmcia/ipwireless/network.c index 65920163f53d..590762a7f217 100644 --- a/trunk/drivers/char/pcmcia/ipwireless/network.c +++ b/trunk/drivers/char/pcmcia/ipwireless/network.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/ppdev.c b/trunk/drivers/char/ppdev.c index fdd37543aa79..432655bcb04c 100644 --- a/trunk/drivers/char/ppdev.c +++ b/trunk/drivers/char/ppdev.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/ps3flash.c b/trunk/drivers/char/ps3flash.c index 606048b72bcf..f424d394a286 100644 --- a/trunk/drivers/char/ps3flash.c +++ b/trunk/drivers/char/ps3flash.c @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/char/pty.c b/trunk/drivers/char/pty.c index d83a43130df4..5ee424817263 100644 --- a/trunk/drivers/char/pty.c +++ b/trunk/drivers/char/pty.c @@ -29,7 +29,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/char/raw.c b/trunk/drivers/char/raw.c index d331c59b571c..64acd05f71c8 100644 --- a/trunk/drivers/char/raw.c +++ b/trunk/drivers/char/raw.c @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/char/rio/rioinit.c b/trunk/drivers/char/rio/rioinit.c index 24a282bb89d4..be0ba401966e 100644 --- a/trunk/drivers/char/rio/rioinit.c +++ b/trunk/drivers/char/rio/rioinit.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/char/rio/riointr.c b/trunk/drivers/char/rio/riointr.c index 2e71aecae206..71f87600907c 100644 --- a/trunk/drivers/char/rio/riointr.c +++ b/trunk/drivers/char/rio/riointr.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/char/rio/rioparam.c b/trunk/drivers/char/rio/rioparam.c index 6415f3f32a72..d687c17be152 100644 --- a/trunk/drivers/char/rio/rioparam.c +++ b/trunk/drivers/char/rio/rioparam.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/char/rio/rioroute.c b/trunk/drivers/char/rio/rioroute.c index f9b936ac3394..706c2a25f7aa 100644 --- a/trunk/drivers/char/rio/rioroute.c +++ b/trunk/drivers/char/rio/rioroute.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/char/rio/riotty.c b/trunk/drivers/char/rio/riotty.c index 8a90393faf3c..47fab7c33073 100644 --- a/trunk/drivers/char/rio/riotty.c +++ b/trunk/drivers/char/rio/riotty.c @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/char/serial167.c b/trunk/drivers/char/serial167.c index 8dfd24721a82..1ec3d5cd748f 100644 --- a/trunk/drivers/char/serial167.c +++ b/trunk/drivers/char/serial167.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/snsc_event.c b/trunk/drivers/char/snsc_event.c index ee156948b9f8..55a95892ccf9 100644 --- a/trunk/drivers/char/snsc_event.c +++ b/trunk/drivers/char/snsc_event.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/char/sonypi.c b/trunk/drivers/char/sonypi.c index 73f66d03624d..bba727c3807e 100644 --- a/trunk/drivers/char/sonypi.c +++ b/trunk/drivers/char/sonypi.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/specialix.c b/trunk/drivers/char/specialix.c index 2c24fcdc722a..07ac14d949ce 100644 --- a/trunk/drivers/char/specialix.c +++ b/trunk/drivers/char/specialix.c @@ -94,7 +94,6 @@ #include #include #include -#include #include "specialix_io8.h" #include "cd1865.h" diff --git a/trunk/drivers/char/sysrq.c b/trunk/drivers/char/sysrq.c index 59de2525d303..1ae2de7d8b4f 100644 --- a/trunk/drivers/char/sysrq.c +++ b/trunk/drivers/char/sysrq.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/tpm/tpm.c b/trunk/drivers/char/tpm/tpm.c index 068c816e6942..f06bb37defb1 100644 --- a/trunk/drivers/char/tpm/tpm.c +++ b/trunk/drivers/char/tpm/tpm.c @@ -24,7 +24,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/char/tpm/tpm_bios.c b/trunk/drivers/char/tpm/tpm_bios.c index 0636520fa9bf..bf2170fb1cdd 100644 --- a/trunk/drivers/char/tpm/tpm_bios.c +++ b/trunk/drivers/char/tpm/tpm_bios.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "tpm.h" diff --git a/trunk/drivers/char/tpm/tpm_nsc.c b/trunk/drivers/char/tpm/tpm_nsc.c index a605cb7dd898..70efba2ee053 100644 --- a/trunk/drivers/char/tpm/tpm_nsc.c +++ b/trunk/drivers/char/tpm/tpm_nsc.c @@ -20,7 +20,6 @@ */ #include -#include #include "tpm.h" /* National definitions */ diff --git a/trunk/drivers/char/tpm/tpm_tis.c b/trunk/drivers/char/tpm/tpm_tis.c index 94345994f8a6..2405f17b29dd 100644 --- a/trunk/drivers/char/tpm/tpm_tis.c +++ b/trunk/drivers/char/tpm/tpm_tis.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include "tpm.h" diff --git a/trunk/drivers/char/tty_audit.c b/trunk/drivers/char/tty_audit.c index 1b8ee590b4ca..283a15bc84e3 100644 --- a/trunk/drivers/char/tty_audit.c +++ b/trunk/drivers/char/tty_audit.c @@ -10,7 +10,6 @@ */ #include -#include #include struct tty_audit_buf { diff --git a/trunk/drivers/char/tty_io.c b/trunk/drivers/char/tty_io.c index 6da962c9b21c..a42c466f7092 100644 --- a/trunk/drivers/char/tty_io.c +++ b/trunk/drivers/char/tty_io.c @@ -1423,8 +1423,6 @@ static void release_one_tty(struct work_struct *work) list_del_init(&tty->tty_files); file_list_unlock(); - put_pid(tty->pgrp); - put_pid(tty->session); free_tty_struct(tty); } diff --git a/trunk/drivers/char/viotape.c b/trunk/drivers/char/viotape.c index 1144a04cda6e..042c8149a6d1 100644 --- a/trunk/drivers/char/viotape.c +++ b/trunk/drivers/char/viotape.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/char/virtio_console.c b/trunk/drivers/char/virtio_console.c index 026ea6c27e07..44288ce0cb45 100644 --- a/trunk/drivers/char/virtio_console.c +++ b/trunk/drivers/char/virtio_console.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/char/vme_scc.c b/trunk/drivers/char/vme_scc.c index 12de1202d22c..8b24729fec89 100644 --- a/trunk/drivers/char/vme_scc.c +++ b/trunk/drivers/char/vme_scc.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 7261b8d9087c..4846d50199f3 100644 --- a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -86,7 +86,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/clocksource/sh_cmt.c b/trunk/drivers/clocksource/sh_cmt.c index 744f748cc84b..578595c4425d 100644 --- a/trunk/drivers/clocksource/sh_cmt.c +++ b/trunk/drivers/clocksource/sh_cmt.c @@ -29,7 +29,6 @@ #include #include #include -#include struct sh_cmt_priv { void __iomem *mapbase; diff --git a/trunk/drivers/clocksource/sh_mtu2.c b/trunk/drivers/clocksource/sh_mtu2.c index 5fb78bfd73bb..4c8a759e60cd 100644 --- a/trunk/drivers/clocksource/sh_mtu2.c +++ b/trunk/drivers/clocksource/sh_mtu2.c @@ -29,7 +29,6 @@ #include #include #include -#include struct sh_mtu2_priv { void __iomem *mapbase; diff --git a/trunk/drivers/clocksource/sh_tmu.c b/trunk/drivers/clocksource/sh_tmu.c index fc9ff1e5b770..961f5b5ef6a3 100644 --- a/trunk/drivers/clocksource/sh_tmu.c +++ b/trunk/drivers/clocksource/sh_tmu.c @@ -30,7 +30,6 @@ #include #include #include -#include struct sh_tmu_priv { void __iomem *mapbase; diff --git a/trunk/drivers/connector/cn_proc.c b/trunk/drivers/connector/cn_proc.c index a7f046b0096c..60697909ebdb 100644 --- a/trunk/drivers/connector/cn_proc.c +++ b/trunk/drivers/connector/cn_proc.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/connector/connector.c b/trunk/drivers/connector/connector.c index 1d48f40342cb..537c29ac4487 100644 --- a/trunk/drivers/connector/connector.c +++ b/trunk/drivers/connector/connector.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/cpufreq/cpufreq_stats.c b/trunk/drivers/cpufreq/cpufreq_stats.c index 00d73fc8e4e2..5a62d678dd19 100644 --- a/trunk/drivers/cpufreq/cpufreq_stats.c +++ b/trunk/drivers/cpufreq/cpufreq_stats.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/cpuidle/sysfs.c b/trunk/drivers/cpuidle/sysfs.c index 0ba9c8b8ee74..8719b36e1a4d 100644 --- a/trunk/drivers/cpuidle/sysfs.c +++ b/trunk/drivers/cpuidle/sysfs.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include "cpuidle.h" diff --git a/trunk/drivers/crypto/amcc/crypto4xx_core.c b/trunk/drivers/crypto/amcc/crypto4xx_core.c index 6c4c8b7ce3aa..1c3849f6b7a2 100644 --- a/trunk/drivers/crypto/amcc/crypto4xx_core.c +++ b/trunk/drivers/crypto/amcc/crypto4xx_core.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/crypto/ixp4xx_crypto.c b/trunk/drivers/crypto/ixp4xx_crypto.c index f17ddf37a1ed..6c6656d3b1e2 100644 --- a/trunk/drivers/crypto/ixp4xx_crypto.c +++ b/trunk/drivers/crypto/ixp4xx_crypto.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/crypto/mv_cesa.c b/trunk/drivers/crypto/mv_cesa.c index 6f29012bcc43..b21ef635f352 100644 --- a/trunk/drivers/crypto/mv_cesa.c +++ b/trunk/drivers/crypto/mv_cesa.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "mv_cesa.h" /* diff --git a/trunk/drivers/crypto/padlock-aes.c b/trunk/drivers/crypto/padlock-aes.c index 2e992bc8015b..8c2f3703ec85 100644 --- a/trunk/drivers/crypto/padlock-aes.c +++ b/trunk/drivers/crypto/padlock-aes.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/crypto/talitos.c b/trunk/drivers/crypto/talitos.c index dc558a097311..fd529d68c5ba 100644 --- a/trunk/drivers/crypto/talitos.c +++ b/trunk/drivers/crypto/talitos.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/dca/dca-core.c b/trunk/drivers/dca/dca-core.c index 8661c84a105d..52e6bb70a490 100644 --- a/trunk/drivers/dca/dca-core.c +++ b/trunk/drivers/dca/dca-core.c @@ -27,7 +27,6 @@ #include #include #include -#include #define DCA_VERSION "1.12.1" diff --git a/trunk/drivers/dca/dca-sysfs.c b/trunk/drivers/dca/dca-sysfs.c index 5e8f335e6f6e..ee916c9857ee 100644 --- a/trunk/drivers/dca/dca-sysfs.c +++ b/trunk/drivers/dca/dca-sysfs.c @@ -26,7 +26,6 @@ #include #include #include -#include static struct class *dca_class; static struct idr dca_idr; diff --git a/trunk/drivers/dma/at_hdmac.c b/trunk/drivers/dma/at_hdmac.c index 278cf5bceef2..efc1a61ca231 100644 --- a/trunk/drivers/dma/at_hdmac.c +++ b/trunk/drivers/dma/at_hdmac.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "at_hdmac_regs.h" diff --git a/trunk/drivers/dma/coh901318_lli.c b/trunk/drivers/dma/coh901318_lli.c index 9f7e0e6a7eea..71d58c1a1e86 100644 --- a/trunk/drivers/dma/coh901318_lli.c +++ b/trunk/drivers/dma/coh901318_lli.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include "coh901318_lli.h" diff --git a/trunk/drivers/dma/dmaengine.c b/trunk/drivers/dma/dmaengine.c index d18b5d069d7e..87399cafce37 100644 --- a/trunk/drivers/dma/dmaengine.c +++ b/trunk/drivers/dma/dmaengine.c @@ -58,7 +58,6 @@ #include #include #include -#include static DEFINE_MUTEX(dma_list_mutex); static LIST_HEAD(dma_device_list); diff --git a/trunk/drivers/dma/dmatest.c b/trunk/drivers/dma/dmatest.c index 68d58c414cf0..6fa55fe3dd24 100644 --- a/trunk/drivers/dma/dmatest.c +++ b/trunk/drivers/dma/dmatest.c @@ -14,7 +14,6 @@ #include #include #include -#include #include static unsigned int test_buf_size = 16384; diff --git a/trunk/drivers/dma/fsldma.c b/trunk/drivers/dma/fsldma.c index 88f470f0d820..bbb4be5a3ff4 100644 --- a/trunk/drivers/dma/fsldma.c +++ b/trunk/drivers/dma/fsldma.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/dma/ioat/dma.c b/trunk/drivers/dma/ioat/dma.c index 3e5a8005c62b..0099340b9616 100644 --- a/trunk/drivers/dma/ioat/dma.c +++ b/trunk/drivers/dma/ioat/dma.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/dma/ioat/dma_v2.c b/trunk/drivers/dma/ioat/dma_v2.c index b5ae56c211e6..1ed5d66d7dca 100644 --- a/trunk/drivers/dma/ioat/dma_v2.c +++ b/trunk/drivers/dma/ioat/dma_v2.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/dma/ioat/dma_v3.c b/trunk/drivers/dma/ioat/dma_v3.c index 6740e319c9cf..26febc56dab1 100644 --- a/trunk/drivers/dma/ioat/dma_v3.c +++ b/trunk/drivers/dma/ioat/dma_v3.c @@ -57,7 +57,6 @@ */ #include -#include #include #include #include "registers.h" diff --git a/trunk/drivers/dma/ioat/pci.c b/trunk/drivers/dma/ioat/pci.c index 99ec26725bae..d545fae30f37 100644 --- a/trunk/drivers/dma/ioat/pci.c +++ b/trunk/drivers/dma/ioat/pci.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "dma.h" #include "dma_v2.h" #include "registers.h" diff --git a/trunk/drivers/dma/iop-adma.c b/trunk/drivers/dma/iop-adma.c index 1ebc801678b0..ca6e6a0cb793 100644 --- a/trunk/drivers/dma/iop-adma.c +++ b/trunk/drivers/dma/iop-adma.c @@ -32,7 +32,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/dma/iovlock.c b/trunk/drivers/dma/iovlock.c index bb48a57c2fc1..c0a272c73682 100644 --- a/trunk/drivers/dma/iovlock.c +++ b/trunk/drivers/dma/iovlock.c @@ -27,7 +27,6 @@ #include #include -#include #include /* for memcpy_toiovec */ #include #include diff --git a/trunk/drivers/dma/mpc512x_dma.c b/trunk/drivers/dma/mpc512x_dma.c index bbbd58566625..3fdf1f46bd63 100644 --- a/trunk/drivers/dma/mpc512x_dma.c +++ b/trunk/drivers/dma/mpc512x_dma.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/dma/mv_xor.c b/trunk/drivers/dma/mv_xor.c index e2fd34da64f2..466ab10c1ff1 100644 --- a/trunk/drivers/dma/mv_xor.c +++ b/trunk/drivers/dma/mv_xor.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/dma/ppc4xx/adma.c b/trunk/drivers/dma/ppc4xx/adma.c index d44626fa35ad..e69d87f24a25 100644 --- a/trunk/drivers/dma/ppc4xx/adma.c +++ b/trunk/drivers/dma/ppc4xx/adma.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/dma/shdma.c b/trunk/drivers/dma/shdma.c index 7cc31b3f40d8..5d17e09cb625 100644 --- a/trunk/drivers/dma/shdma.c +++ b/trunk/drivers/dma/shdma.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/edac/amd76x_edac.c b/trunk/drivers/edac/amd76x_edac.c index f2330f81cb5e..2b95f1a3edfc 100644 --- a/trunk/drivers/edac/amd76x_edac.c +++ b/trunk/drivers/edac/amd76x_edac.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/cpc925_edac.c b/trunk/drivers/edac/cpc925_edac.c index 1609a19df495..3d50274f1348 100644 --- a/trunk/drivers/edac/cpc925_edac.c +++ b/trunk/drivers/edac/cpc925_edac.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "edac_core.h" #include "edac_module.h" diff --git a/trunk/drivers/edac/e752x_edac.c b/trunk/drivers/edac/e752x_edac.c index ae3f80c54198..243e9aacad69 100644 --- a/trunk/drivers/edac/e752x_edac.c +++ b/trunk/drivers/edac/e752x_edac.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/e7xxx_edac.c b/trunk/drivers/edac/e7xxx_edac.c index 1731d7245816..c7d11cc4e21a 100644 --- a/trunk/drivers/edac/e7xxx_edac.c +++ b/trunk/drivers/edac/e7xxx_edac.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/edac_device_sysfs.c b/trunk/drivers/edac/edac_device_sysfs.c index 070968178a24..5fdedbc0f545 100644 --- a/trunk/drivers/edac/edac_device_sysfs.c +++ b/trunk/drivers/edac/edac_device_sysfs.c @@ -12,7 +12,6 @@ #include #include -#include #include "edac_core.h" #include "edac_module.h" diff --git a/trunk/drivers/edac/edac_mc_sysfs.c b/trunk/drivers/edac/edac_mc_sysfs.c index 418b65f1a1da..88840e9fa3e0 100644 --- a/trunk/drivers/edac/edac_mc_sysfs.c +++ b/trunk/drivers/edac/edac_mc_sysfs.c @@ -10,7 +10,6 @@ */ #include -#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/edac_pci_sysfs.c b/trunk/drivers/edac/edac_pci_sysfs.c index c39697df9cb4..bef94e3d9944 100644 --- a/trunk/drivers/edac/edac_pci_sysfs.c +++ b/trunk/drivers/edac/edac_pci_sysfs.c @@ -8,7 +8,6 @@ */ #include #include -#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i3000_edac.c b/trunk/drivers/edac/i3000_edac.c index c0510b3d7035..6c9a0f2a593c 100644 --- a/trunk/drivers/edac/i3000_edac.c +++ b/trunk/drivers/edac/i3000_edac.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i3200_edac.c b/trunk/drivers/edac/i3200_edac.c index d41f9002da45..fde4db91c4d2 100644 --- a/trunk/drivers/edac/i3200_edac.c +++ b/trunk/drivers/edac/i3200_edac.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i5100_edac.c b/trunk/drivers/edac/i5100_edac.c index ee9753cf362c..7785d8ffa404 100644 --- a/trunk/drivers/edac/i5100_edac.c +++ b/trunk/drivers/edac/i5100_edac.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/edac/i82443bxgx_edac.c b/trunk/drivers/edac/i82443bxgx_edac.c index 7f3884fcbd46..577760a82a0f 100644 --- a/trunk/drivers/edac/i82443bxgx_edac.c +++ b/trunk/drivers/edac/i82443bxgx_edac.c @@ -27,6 +27,7 @@ #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i82860_edac.c b/trunk/drivers/edac/i82860_edac.c index b8a95cf50718..c0088ba9672b 100644 --- a/trunk/drivers/edac/i82860_edac.c +++ b/trunk/drivers/edac/i82860_edac.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i82875p_edac.c b/trunk/drivers/edac/i82875p_edac.c index b2fd1e899142..b2d83b95033d 100644 --- a/trunk/drivers/edac/i82875p_edac.c +++ b/trunk/drivers/edac/i82875p_edac.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/i82975x_edac.c b/trunk/drivers/edac/i82975x_edac.c index 3218819b7286..2eed3ea2cf62 100644 --- a/trunk/drivers/edac/i82975x_edac.c +++ b/trunk/drivers/edac/i82975x_edac.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/mpc85xx_edac.c b/trunk/drivers/edac/mpc85xx_edac.c index 4471647b4807..94cac0aacea3 100644 --- a/trunk/drivers/edac/mpc85xx_edac.c +++ b/trunk/drivers/edac/mpc85xx_edac.c @@ -11,13 +11,13 @@ */ #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/edac/mv64x60_edac.c b/trunk/drivers/edac/mv64x60_edac.c index 7e5ff367705c..a6b9fec13a74 100644 --- a/trunk/drivers/edac/mv64x60_edac.c +++ b/trunk/drivers/edac/mv64x60_edac.c @@ -12,10 +12,10 @@ #include #include +#include #include #include #include -#include #include "edac_core.h" #include "edac_module.h" diff --git a/trunk/drivers/edac/pasemi_edac.c b/trunk/drivers/edac/pasemi_edac.c index 7f71ee436744..8e6b91bd2e99 100644 --- a/trunk/drivers/edac/pasemi_edac.c +++ b/trunk/drivers/edac/pasemi_edac.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/r82600_edac.c b/trunk/drivers/edac/r82600_edac.c index d55f8e9de788..9900675e9598 100644 --- a/trunk/drivers/edac/r82600_edac.c +++ b/trunk/drivers/edac/r82600_edac.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/edac/x38_edac.c b/trunk/drivers/edac/x38_edac.c index b6f47de152f3..d4ec60593176 100644 --- a/trunk/drivers/edac/x38_edac.c +++ b/trunk/drivers/edac/x38_edac.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "edac_core.h" diff --git a/trunk/drivers/firewire/core-cdev.c b/trunk/drivers/firewire/core-cdev.c index 702dcc98c074..8be720b278b7 100644 --- a/trunk/drivers/firewire/core-cdev.c +++ b/trunk/drivers/firewire/core-cdev.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/firewire/core-device.c b/trunk/drivers/firewire/core-device.c index 4b8523f00dce..882472d1e144 100644 --- a/trunk/drivers/firewire/core-device.c +++ b/trunk/drivers/firewire/core-device.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/firewire/core-iso.c b/trunk/drivers/firewire/core-iso.c index 3784a47865b7..99c20f1b613a 100644 --- a/trunk/drivers/firewire/core-iso.c +++ b/trunk/drivers/firewire/core-iso.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/firewire/net.c b/trunk/drivers/firewire/net.c index 7142eeec8074..2d3dc7ded0a9 100644 --- a/trunk/drivers/firewire/net.c +++ b/trunk/drivers/firewire/net.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/firewire/ohci.c b/trunk/drivers/firewire/ohci.c index 0cf4d7f562c5..e33917bf97d2 100644 --- a/trunk/drivers/firewire/ohci.c +++ b/trunk/drivers/firewire/ohci.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/firmware/dcdbas.c b/trunk/drivers/firmware/dcdbas.c index fb09bb3c0ad6..18d65fb42ee7 100644 --- a/trunk/drivers/firmware/dcdbas.c +++ b/trunk/drivers/firmware/dcdbas.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/firmware/dell_rbu.c b/trunk/drivers/firmware/dell_rbu.c index 3a4460265b10..b3a0cf57442e 100644 --- a/trunk/drivers/firmware/dell_rbu.c +++ b/trunk/drivers/firmware/dell_rbu.c @@ -36,7 +36,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/firmware/dmi-id.c b/trunk/drivers/firmware/dmi-id.c index a777a35381d2..dbdf6fadfc79 100644 --- a/trunk/drivers/firmware/dmi-id.c +++ b/trunk/drivers/firmware/dmi-id.c @@ -11,7 +11,6 @@ #include #include #include -#include struct dmi_device_attribute{ struct device_attribute dev_attr; diff --git a/trunk/drivers/firmware/dmi_scan.c b/trunk/drivers/firmware/dmi_scan.c index d46467271349..31b983d9462c 100644 --- a/trunk/drivers/firmware/dmi_scan.c +++ b/trunk/drivers/firmware/dmi_scan.c @@ -5,6 +5,7 @@ #include #include #include +#include #include /* diff --git a/trunk/drivers/firmware/efivars.c b/trunk/drivers/firmware/efivars.c index 81b70bd07586..082f06ecd327 100644 --- a/trunk/drivers/firmware/efivars.c +++ b/trunk/drivers/firmware/efivars.c @@ -77,7 +77,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/firmware/iscsi_ibft_find.c b/trunk/drivers/firmware/iscsi_ibft_find.c index 134dd7328397..dfb15c06c88f 100644 --- a/trunk/drivers/firmware/iscsi_ibft_find.c +++ b/trunk/drivers/firmware/iscsi_ibft_find.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/firmware/memmap.c b/trunk/drivers/firmware/memmap.c index adc07102a20d..d59f7cad2269 100644 --- a/trunk/drivers/firmware/memmap.c +++ b/trunk/drivers/firmware/memmap.c @@ -20,7 +20,6 @@ #include #include #include -#include /* * Data types ------------------------------------------------------------------ diff --git a/trunk/drivers/gpio/adp5520-gpio.c b/trunk/drivers/gpio/adp5520-gpio.c index 9f2781537001..0f93105873cd 100644 --- a/trunk/drivers/gpio/adp5520-gpio.c +++ b/trunk/drivers/gpio/adp5520-gpio.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/gpio/adp5588-gpio.c b/trunk/drivers/gpio/adp5588-gpio.c index 2e8e9e24f887..afc097a16b33 100644 --- a/trunk/drivers/gpio/adp5588-gpio.c +++ b/trunk/drivers/gpio/adp5588-gpio.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/gpio/bt8xxgpio.c b/trunk/drivers/gpio/bt8xxgpio.c index aa4f09ad3ced..2559f2289409 100644 --- a/trunk/drivers/gpio/bt8xxgpio.c +++ b/trunk/drivers/gpio/bt8xxgpio.c @@ -47,7 +47,6 @@ #include #include #include -#include /* Steal the hardware definitions from the bttv driver. */ #include "../media/video/bt8xx/bt848.h" diff --git a/trunk/drivers/gpio/gpiolib.c b/trunk/drivers/gpio/gpiolib.c index 76be229c814d..6d1b86661e63 100644 --- a/trunk/drivers/gpio/gpiolib.c +++ b/trunk/drivers/gpio/gpiolib.c @@ -9,7 +9,6 @@ #include #include #include -#include /* Optional implementation infrastructure for GPIO interfaces. diff --git a/trunk/drivers/gpio/langwell_gpio.c b/trunk/drivers/gpio/langwell_gpio.c index 00c3a14127af..6c0ebbdc659e 100644 --- a/trunk/drivers/gpio/langwell_gpio.c +++ b/trunk/drivers/gpio/langwell_gpio.c @@ -29,7 +29,6 @@ #include #include #include -#include struct lnw_gpio_register { u32 GPLR[2]; diff --git a/trunk/drivers/gpio/max7300.c b/trunk/drivers/gpio/max7300.c index 962f661c18c7..9d74eef1157a 100644 --- a/trunk/drivers/gpio/max7300.c +++ b/trunk/drivers/gpio/max7300.c @@ -16,7 +16,6 @@ #include #include #include -#include static int max7300_i2c_write(struct device *dev, unsigned int reg, unsigned int val) diff --git a/trunk/drivers/gpio/max7301.c b/trunk/drivers/gpio/max7301.c index 92a100ddef6b..965d9b1ea13e 100644 --- a/trunk/drivers/gpio/max7301.c +++ b/trunk/drivers/gpio/max7301.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/gpio/max730x.c b/trunk/drivers/gpio/max730x.c index 7696a5625d58..4a7d662ff9b7 100644 --- a/trunk/drivers/gpio/max730x.c +++ b/trunk/drivers/gpio/max730x.c @@ -38,7 +38,6 @@ #include #include #include -#include /* * Pin configurations, see MAX7301 datasheet page 6 diff --git a/trunk/drivers/gpio/mc33880.c b/trunk/drivers/gpio/mc33880.c index 935479da6705..e7d01bd8fdb3 100644 --- a/trunk/drivers/gpio/mc33880.c +++ b/trunk/drivers/gpio/mc33880.c @@ -25,7 +25,6 @@ #include #include #include -#include #define DRIVER_NAME "mc33880" diff --git a/trunk/drivers/gpio/mcp23s08.c b/trunk/drivers/gpio/mcp23s08.c index 69f6f1955a31..cd651ec8d034 100644 --- a/trunk/drivers/gpio/mcp23s08.c +++ b/trunk/drivers/gpio/mcp23s08.c @@ -9,7 +9,6 @@ #include #include #include -#include /* Registers are all 8 bits wide. diff --git a/trunk/drivers/gpio/pca953x.c b/trunk/drivers/gpio/pca953x.c index 7d521e1d17e1..ab5daab14bc2 100644 --- a/trunk/drivers/gpio/pca953x.c +++ b/trunk/drivers/gpio/pca953x.c @@ -18,7 +18,6 @@ #include #include #include -#include #ifdef CONFIG_OF_GPIO #include #include diff --git a/trunk/drivers/gpio/pl061.c b/trunk/drivers/gpio/pl061.c index 5ad8f778ced4..3ad1eeb49609 100644 --- a/trunk/drivers/gpio/pl061.c +++ b/trunk/drivers/gpio/pl061.c @@ -24,7 +24,6 @@ #include #include #include -#include #define GPIODIR 0x400 #define GPIOIS 0x404 diff --git a/trunk/drivers/gpio/timbgpio.c b/trunk/drivers/gpio/timbgpio.c index ac4d0f0ea02b..d4295fa5369e 100644 --- a/trunk/drivers/gpio/timbgpio.c +++ b/trunk/drivers/gpio/timbgpio.c @@ -27,7 +27,6 @@ #include #include #include -#include #define DRIVER_NAME "timb-gpio" diff --git a/trunk/drivers/gpio/twl4030-gpio.c b/trunk/drivers/gpio/twl4030-gpio.c index 57635ac35a73..7fe881e2bdfb 100644 --- a/trunk/drivers/gpio/twl4030-gpio.c +++ b/trunk/drivers/gpio/twl4030-gpio.c @@ -32,6 +32,7 @@ #include #include #include +#include #include diff --git a/trunk/drivers/gpio/wm831x-gpio.c b/trunk/drivers/gpio/wm831x-gpio.c index 1fa449a1a4cb..d09021f4a7d3 100644 --- a/trunk/drivers/gpio/wm831x-gpio.c +++ b/trunk/drivers/gpio/wm831x-gpio.c @@ -13,7 +13,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/gpio/wm8350-gpiolib.c b/trunk/drivers/gpio/wm8350-gpiolib.c index 359999290f55..511840d1c7ba 100644 --- a/trunk/drivers/gpio/wm8350-gpiolib.c +++ b/trunk/drivers/gpio/wm8350-gpiolib.c @@ -13,7 +13,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/gpio/wm8994-gpio.c b/trunk/drivers/gpio/wm8994-gpio.c index 7607cc61e1dd..de28b4a470ea 100644 --- a/trunk/drivers/gpio/wm8994-gpio.c +++ b/trunk/drivers/gpio/wm8994-gpio.c @@ -13,7 +13,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/gpio/xilinx_gpio.c b/trunk/drivers/gpio/xilinx_gpio.c index b8fa65b5bfca..3c1177abebd3 100644 --- a/trunk/drivers/gpio/xilinx_gpio.c +++ b/trunk/drivers/gpio/xilinx_gpio.c @@ -19,7 +19,6 @@ #include #include #include -#include /* Register Offset Definitions */ #define XGPIO_DATA_OFFSET (0x0) /* Data register */ diff --git a/trunk/drivers/gpu/drm/drm_agpsupport.c b/trunk/drivers/gpu/drm/drm_agpsupport.c index ba38e0147220..d68888fe3df9 100644 --- a/trunk/drivers/gpu/drm/drm_agpsupport.c +++ b/trunk/drivers/gpu/drm/drm_agpsupport.c @@ -33,7 +33,6 @@ #include "drmP.h" #include -#include #if __OS_HAS_AGP diff --git a/trunk/drivers/gpu/drm/drm_bufs.c b/trunk/drivers/gpu/drm/drm_bufs.c index f7ba82ebf65a..8417cc4c43f1 100644 --- a/trunk/drivers/gpu/drm/drm_bufs.c +++ b/trunk/drivers/gpu/drm/drm_bufs.c @@ -34,7 +34,6 @@ */ #include -#include #include #include #include "drmP.h" diff --git a/trunk/drivers/gpu/drm/drm_crtc.c b/trunk/drivers/gpu/drm/drm_crtc.c index 61b9bcfdf040..d91fb8c0b7b3 100644 --- a/trunk/drivers/gpu/drm/drm_crtc.c +++ b/trunk/drivers/gpu/drm/drm_crtc.c @@ -30,7 +30,6 @@ * Jesse Barnes */ #include -#include #include "drm.h" #include "drmP.h" #include "drm_crtc.h" diff --git a/trunk/drivers/gpu/drm/drm_crtc_helper.c b/trunk/drivers/gpu/drm/drm_crtc_helper.c index 51103aa469f8..f2aaf39be398 100644 --- a/trunk/drivers/gpu/drm/drm_crtc_helper.c +++ b/trunk/drivers/gpu/drm/drm_crtc_helper.c @@ -104,7 +104,6 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, if (connector->status == connector_status_disconnected) { DRM_DEBUG_KMS("%s is disconnected\n", drm_get_connector_name(connector)); - drm_mode_connector_update_edid_property(connector, NULL); goto prune; } diff --git a/trunk/drivers/gpu/drm/drm_debugfs.c b/trunk/drivers/gpu/drm/drm_debugfs.c index 677b275fa721..9903f270e440 100644 --- a/trunk/drivers/gpu/drm/drm_debugfs.c +++ b/trunk/drivers/gpu/drm/drm_debugfs.c @@ -32,7 +32,6 @@ #include #include -#include #include "drmP.h" #if defined(CONFIG_DEBUG_FS) diff --git a/trunk/drivers/gpu/drm/drm_dp_i2c_helper.c b/trunk/drivers/gpu/drm/drm_dp_i2c_helper.c index f7eba0a0973a..548887c8506f 100644 --- a/trunk/drivers/gpu/drm/drm_dp_i2c_helper.c +++ b/trunk/drivers/gpu/drm/drm_dp_i2c_helper.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/gpu/drm/drm_drv.c b/trunk/drivers/gpu/drm/drm_drv.c index 4a66201edaec..f3c58e2bd75c 100644 --- a/trunk/drivers/gpu/drm/drm_drv.c +++ b/trunk/drivers/gpu/drm/drm_drv.c @@ -47,7 +47,6 @@ */ #include -#include #include "drmP.h" #include "drm_core.h" diff --git a/trunk/drivers/gpu/drm/drm_edid.c b/trunk/drivers/gpu/drm/drm_edid.c index 2cc6e87d849d..f97e7c42ac8e 100644 --- a/trunk/drivers/gpu/drm/drm_edid.c +++ b/trunk/drivers/gpu/drm/drm_edid.c @@ -27,7 +27,6 @@ * DEALINGS IN THE SOFTWARE. */ #include -#include #include #include #include "drmP.h" @@ -708,6 +707,15 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev, mode->vsync_end = mode->vsync_start + vsync_pulse_width; mode->vtotal = mode->vdisplay + vblank; + /* perform the basic check for the detailed timing */ + if (mode->hsync_end > mode->htotal || + mode->vsync_end > mode->vtotal) { + drm_mode_destroy(dev, mode); + DRM_DEBUG_KMS("Incorrect detailed timing. " + "Sync is beyond the blank.\n"); + return NULL; + } + /* Some EDIDs have bogus h/vtotal values */ if (mode->hsync_end > mode->htotal) mode->htotal = mode->hsync_end + 1; diff --git a/trunk/drivers/gpu/drm/drm_fb_helper.c b/trunk/drivers/gpu/drm/drm_fb_helper.c index 288ea2f32772..50549703584f 100644 --- a/trunk/drivers/gpu/drm/drm_fb_helper.c +++ b/trunk/drivers/gpu/drm/drm_fb_helper.c @@ -29,7 +29,6 @@ */ #include #include -#include #include #include "drmP.h" #include "drm_crtc.h" @@ -284,8 +283,6 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { .help_msg = "force-fb(V)", .action_msg = "Restore framebuffer console", }; -#else -static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; #endif static void drm_fb_helper_on(struct fb_info *info) diff --git a/trunk/drivers/gpu/drm/drm_fops.c b/trunk/drivers/gpu/drm/drm_fops.c index 9d532d7fdf59..08d14df3bb42 100644 --- a/trunk/drivers/gpu/drm/drm_fops.c +++ b/trunk/drivers/gpu/drm/drm_fops.c @@ -36,7 +36,6 @@ #include "drmP.h" #include -#include #include static int drm_open_helper(struct inode *inode, struct file *filp, @@ -141,16 +140,14 @@ int drm_open(struct inode *inode, struct file *filp) spin_unlock(&dev->count_lock); } out: - if (!retcode) { - mutex_lock(&dev->struct_mutex); - if (minor->type == DRM_MINOR_LEGACY) { - if (dev->dev_mapping == NULL) - dev->dev_mapping = inode->i_mapping; - else if (dev->dev_mapping != inode->i_mapping) - retcode = -ENODEV; - } - mutex_unlock(&dev->struct_mutex); + mutex_lock(&dev->struct_mutex); + if (minor->type == DRM_MINOR_LEGACY) { + BUG_ON((dev->dev_mapping != NULL) && + (dev->dev_mapping != inode->i_mapping)); + if (dev->dev_mapping == NULL) + dev->dev_mapping = inode->i_mapping; } + mutex_unlock(&dev->struct_mutex); return retcode; } diff --git a/trunk/drivers/gpu/drm/drm_hashtab.c b/trunk/drivers/gpu/drm/drm_hashtab.c index a93d7b4ddaa6..f36b21c5b2e1 100644 --- a/trunk/drivers/gpu/drm/drm_hashtab.c +++ b/trunk/drivers/gpu/drm/drm_hashtab.c @@ -35,7 +35,6 @@ #include "drmP.h" #include "drm_hashtab.h" #include -#include int drm_ht_create(struct drm_open_hash *ht, unsigned int order) { diff --git a/trunk/drivers/gpu/drm/drm_irq.c b/trunk/drivers/gpu/drm/drm_irq.c index 3bd872761567..b98384dbd9a7 100644 --- a/trunk/drivers/gpu/drm/drm_irq.c +++ b/trunk/drivers/gpu/drm/drm_irq.c @@ -36,7 +36,6 @@ #include "drmP.h" #include /* For task queue support */ -#include #include /** diff --git a/trunk/drivers/gpu/drm/drm_pci.c b/trunk/drivers/gpu/drm/drm_pci.c index 2ea9ad4a8d69..e68ebf92fa2a 100644 --- a/trunk/drivers/gpu/drm/drm_pci.c +++ b/trunk/drivers/gpu/drm/drm_pci.c @@ -37,7 +37,6 @@ */ #include -#include #include #include "drmP.h" diff --git a/trunk/drivers/gpu/drm/drm_proc.c b/trunk/drivers/gpu/drm/drm_proc.c index a9ba6b69ad35..d379c4f2892f 100644 --- a/trunk/drivers/gpu/drm/drm_proc.c +++ b/trunk/drivers/gpu/drm/drm_proc.c @@ -38,7 +38,6 @@ */ #include -#include #include "drmP.h" /*************************************************** diff --git a/trunk/drivers/gpu/drm/drm_scatter.c b/trunk/drivers/gpu/drm/drm_scatter.c index 9034c4c6100d..c7823c863d4f 100644 --- a/trunk/drivers/gpu/drm/drm_scatter.c +++ b/trunk/drivers/gpu/drm/drm_scatter.c @@ -32,7 +32,6 @@ */ #include -#include #include "drmP.h" #define DEBUG_SCATTER 0 diff --git a/trunk/drivers/gpu/drm/drm_stub.c b/trunk/drivers/gpu/drm/drm_stub.c index b743411d8144..ad73e141afdb 100644 --- a/trunk/drivers/gpu/drm/drm_stub.c +++ b/trunk/drivers/gpu/drm/drm_stub.c @@ -33,7 +33,6 @@ #include #include -#include #include "drmP.h" #include "drm_core.h" diff --git a/trunk/drivers/gpu/drm/drm_sysfs.c b/trunk/drivers/gpu/drm/drm_sysfs.c index 1a1825b29f5f..014ce24761b9 100644 --- a/trunk/drivers/gpu/drm/drm_sysfs.c +++ b/trunk/drivers/gpu/drm/drm_sysfs.c @@ -14,7 +14,6 @@ #include #include -#include #include #include "drm_sysfs.h" diff --git a/trunk/drivers/gpu/drm/drm_vm.c b/trunk/drivers/gpu/drm/drm_vm.c index c3b13fb41d0c..4ac900f4647f 100644 --- a/trunk/drivers/gpu/drm/drm_vm.c +++ b/trunk/drivers/gpu/drm/drm_vm.c @@ -36,7 +36,6 @@ #include "drmP.h" #if defined(__ia64__) #include -#include #endif static void drm_vm_open(struct vm_area_struct *vma); diff --git a/trunk/drivers/gpu/drm/i810/i810_dma.c b/trunk/drivers/gpu/drm/i810/i810_dma.c index 997d91707ad2..de32d22a8c39 100644 --- a/trunk/drivers/gpu/drm/i810/i810_dma.c +++ b/trunk/drivers/gpu/drm/i810/i810_dma.c @@ -36,7 +36,6 @@ #include "i810_drv.h" #include /* For task queue support */ #include -#include #include #define I810_BUF_FREE 2 diff --git a/trunk/drivers/gpu/drm/i830/i830_dma.c b/trunk/drivers/gpu/drm/i830/i830_dma.c index 65759a9a85c8..06bd732e6463 100644 --- a/trunk/drivers/gpu/drm/i830/i830_dma.c +++ b/trunk/drivers/gpu/drm/i830/i830_dma.c @@ -38,7 +38,6 @@ #include /* For task queue support */ #include #include -#include #include #define I830_BUF_FREE 2 diff --git a/trunk/drivers/gpu/drm/i915/i915_debugfs.c b/trunk/drivers/gpu/drm/i915/i915_debugfs.c index b574503dddd0..1376dfe44c95 100644 --- a/trunk/drivers/gpu/drm/i915/i915_debugfs.c +++ b/trunk/drivers/gpu/drm/i915/i915_debugfs.c @@ -28,7 +28,6 @@ #include #include -#include #include "drmP.h" #include "drm.h" #include "i915_drm.h" diff --git a/trunk/drivers/gpu/drm/i915/i915_dma.c b/trunk/drivers/gpu/drm/i915/i915_dma.c index 2dc93939507d..a9f8589490cf 100644 --- a/trunk/drivers/gpu/drm/i915/i915_dma.c +++ b/trunk/drivers/gpu/drm/i915/i915_dma.c @@ -38,7 +38,6 @@ #include #include #include -#include /* Really want an OS-independent resettable timer. Would like to have * this loop run for (eg) 3 sec, but have the timer reset every time diff --git a/trunk/drivers/gpu/drm/i915/i915_gem.c b/trunk/drivers/gpu/drm/i915/i915_gem.c index 368d726853d1..933e865a8929 100644 --- a/trunk/drivers/gpu/drm/i915/i915_gem.c +++ b/trunk/drivers/gpu/drm/i915/i915_gem.c @@ -31,7 +31,6 @@ #include "i915_drv.h" #include "i915_trace.h" #include "intel_drv.h" -#include #include #include diff --git a/trunk/drivers/gpu/drm/i915/i915_irq.c b/trunk/drivers/gpu/drm/i915/i915_irq.c index 49c458bc6502..5388354da0d1 100644 --- a/trunk/drivers/gpu/drm/i915/i915_irq.c +++ b/trunk/drivers/gpu/drm/i915/i915_irq.c @@ -27,7 +27,6 @@ */ #include -#include #include "drmP.h" #include "drm.h" #include "i915_drm.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_crt.c b/trunk/drivers/gpu/drm/i915/intel_crt.c index 38110ce742a5..fccf07470c8f 100644 --- a/trunk/drivers/gpu/drm/i915/intel_crt.c +++ b/trunk/drivers/gpu/drm/i915/intel_crt.c @@ -25,7 +25,6 @@ */ #include -#include #include "drmP.h" #include "drm.h" #include "drm_crtc.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_display.c b/trunk/drivers/gpu/drm/i915/intel_display.c index e7e753b2845f..58fc7fa0eb1d 100644 --- a/trunk/drivers/gpu/drm/i915/intel_display.c +++ b/trunk/drivers/gpu/drm/i915/intel_display.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "drmP.h" #include "intel_drv.h" #include "i915_drm.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_dp.c b/trunk/drivers/gpu/drm/i915/intel_dp.c index 8e283f75941d..3ef3a0d0edd0 100644 --- a/trunk/drivers/gpu/drm/i915/intel_dp.c +++ b/trunk/drivers/gpu/drm/i915/intel_dp.c @@ -26,7 +26,6 @@ */ #include -#include #include "drmP.h" #include "drm.h" #include "drm_crtc.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_dvo.c b/trunk/drivers/gpu/drm/i915/intel_dvo.c index 0427ca5a2514..a4d2606de778 100644 --- a/trunk/drivers/gpu/drm/i915/intel_dvo.c +++ b/trunk/drivers/gpu/drm/i915/intel_dvo.c @@ -25,7 +25,6 @@ * Eric Anholt */ #include -#include #include "drmP.h" #include "drm.h" #include "drm_crtc.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_fb.c b/trunk/drivers/gpu/drm/i915/intel_fb.c index 69bbef92f130..8cd791dc5b29 100644 --- a/trunk/drivers/gpu/drm/i915/intel_fb.c +++ b/trunk/drivers/gpu/drm/i915/intel_fb.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/gpu/drm/i915/intel_hdmi.c b/trunk/drivers/gpu/drm/i915/intel_hdmi.c index 1ed02f641258..a30f8bfc1985 100644 --- a/trunk/drivers/gpu/drm/i915/intel_hdmi.c +++ b/trunk/drivers/gpu/drm/i915/intel_hdmi.c @@ -27,7 +27,6 @@ */ #include -#include #include #include "drmP.h" #include "drm.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_i2c.c b/trunk/drivers/gpu/drm/i915/intel_i2c.c index c2649c7df14c..fcc753ca5d94 100644 --- a/trunk/drivers/gpu/drm/i915/intel_i2c.c +++ b/trunk/drivers/gpu/drm/i915/intel_i2c.c @@ -26,7 +26,6 @@ * Eric Anholt */ #include -#include #include #include #include "drmP.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_lvds.c b/trunk/drivers/gpu/drm/i915/intel_lvds.c index 216e9f52b6e0..2b3fa7a3c028 100644 --- a/trunk/drivers/gpu/drm/i915/intel_lvds.c +++ b/trunk/drivers/gpu/drm/i915/intel_lvds.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "drmP.h" #include "drm.h" #include "drm_crtc.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_modes.c b/trunk/drivers/gpu/drm/i915/intel_modes.c index 89d303d1d3fb..67e2f4632a24 100644 --- a/trunk/drivers/gpu/drm/i915/intel_modes.c +++ b/trunk/drivers/gpu/drm/i915/intel_modes.c @@ -23,7 +23,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include #include #include "drmP.h" diff --git a/trunk/drivers/gpu/drm/i915/intel_sdvo.c b/trunk/drivers/gpu/drm/i915/intel_sdvo.c index 26e13a0bf30b..48daee5c9c63 100644 --- a/trunk/drivers/gpu/drm/i915/intel_sdvo.c +++ b/trunk/drivers/gpu/drm/i915/intel_sdvo.c @@ -26,7 +26,6 @@ * Eric Anholt */ #include -#include #include #include "drmP.h" #include "drm.h" diff --git a/trunk/drivers/gpu/drm/nouveau/Makefile b/trunk/drivers/gpu/drm/nouveau/Makefile index 7f0d807a0d0d..32db806f3b5a 100644 --- a/trunk/drivers/gpu/drm/nouveau/Makefile +++ b/trunk/drivers/gpu/drm/nouveau/Makefile @@ -12,7 +12,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau_dp.o nouveau_grctx.o \ nv04_timer.o \ nv04_mc.o nv40_mc.o nv50_mc.o \ - nv04_fb.o nv10_fb.o nv40_fb.o nv50_fb.o \ + nv04_fb.o nv10_fb.o nv40_fb.o \ nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \ nv04_graph.o nv10_graph.o nv20_graph.o \ nv40_graph.o nv50_graph.o \ diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_acpi.c b/trunk/drivers/gpu/drm/nouveau/nouveau_acpi.c index e13f6af0037a..0e0730a53137 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -1,6 +1,5 @@ #include #include -#include #include #include diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c index b5a9336a2e88..75bceee76044 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -5210,21 +5210,6 @@ divine_connector_type(struct nvbios *bios, int index) return type; } -static void -apply_dcb_connector_quirks(struct nvbios *bios, int idx) -{ - struct dcb_connector_table_entry *cte = &bios->dcb.connector.entry[idx]; - struct drm_device *dev = bios->dev; - - /* Gigabyte NX85T */ - if ((dev->pdev->device == 0x0421) && - (dev->pdev->subsystem_vendor == 0x1458) && - (dev->pdev->subsystem_device == 0x344c)) { - if (cte->type == DCB_CONNECTOR_HDMI_1) - cte->type = DCB_CONNECTOR_DVI_I; - } -} - static void parse_dcb_connector_table(struct nvbios *bios) { @@ -5253,14 +5238,13 @@ parse_dcb_connector_table(struct nvbios *bios) entry = conntab + conntab[1]; cte = &ct->entry[0]; for (i = 0; i < conntab[2]; i++, entry += conntab[3], cte++) { - cte->index = i; if (conntab[3] == 2) cte->entry = ROM16(entry[0]); else cte->entry = ROM32(entry[0]); cte->type = (cte->entry & 0x000000ff) >> 0; - cte->index2 = (cte->entry & 0x00000f00) >> 8; + cte->index = (cte->entry & 0x00000f00) >> 8; switch (cte->entry & 0x00033000) { case 0x00001000: cte->gpio_tag = 0x07; @@ -5282,8 +5266,6 @@ parse_dcb_connector_table(struct nvbios *bios) if (cte->type == 0xff) continue; - apply_dcb_connector_quirks(bios, i); - NV_INFO(dev, " %d: 0x%08x: type 0x%02x idx %d tag 0x%02x\n", i, cte->entry, cte->type, cte->index, cte->gpio_tag); @@ -5305,16 +5287,10 @@ parse_dcb_connector_table(struct nvbios *bios) break; default: cte->type = divine_connector_type(bios, cte->index); - NV_WARN(dev, "unknown type, using 0x%02x\n", cte->type); + NV_WARN(dev, "unknown type, using 0x%02x", cte->type); break; } - if (nouveau_override_conntype) { - int type = divine_connector_type(bios, cte->index); - if (type != cte->type) - NV_WARN(dev, " -> type 0x%02x\n", cte->type); - } - } } diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.h b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.h index 4f88e6924d27..9f688aa9a655 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.h +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.h @@ -72,10 +72,9 @@ enum dcb_connector_type { }; struct dcb_connector_table_entry { - uint8_t index; uint32_t entry; enum dcb_connector_type type; - uint8_t index2; + uint8_t index; uint8_t gpio_tag; }; diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c b/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c index 9042dd7fb058..028719fddf76 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -34,7 +34,6 @@ #include "nouveau_dma.h" #include -#include static void nouveau_bo_del_ttm(struct ttm_buffer_object *bo) @@ -440,7 +439,8 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl) switch (bo->mem.mem_type) { case TTM_PL_VRAM: - nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT); + nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT | + TTM_PL_FLAG_SYSTEM); break; default: nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM); diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_connector.c b/trunk/drivers/gpu/drm/nouveau/nouveau_connector.c index 14afe1e47e57..24327f468c4b 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -302,7 +302,7 @@ nouveau_connector_detect(struct drm_connector *connector) detect_analog: nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); - if (!nv_encoder && !nouveau_tv_disable) + if (!nv_encoder) nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); if (nv_encoder) { struct drm_encoder *encoder = to_drm_encoder(nv_encoder); diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_dma.c b/trunk/drivers/gpu/drm/nouveau/nouveau_dma.c index 65c441a1999f..c8482a108a78 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_dma.c @@ -190,11 +190,6 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo, nouveau_bo_wr32(pb, ip++, upper_32_bits(offset) | length << 8); chan->dma.ib_put = (chan->dma.ib_put + 1) & chan->dma.ib_max; - - DRM_MEMORYBARRIER(); - /* Flush writes. */ - nouveau_bo_rd32(pb, 0); - nvchan_wr32(chan, 0x8c, chan->dma.ib_put); chan->dma.ib_free--; } diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.c b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.c index 1de974acbc65..30cc09e8a709 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -83,14 +83,6 @@ MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); int nouveau_nofbaccel = 0; module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); -MODULE_PARM_DESC(override_conntype, "Ignore DCB connector type"); -int nouveau_override_conntype = 0; -module_param_named(override_conntype, nouveau_override_conntype, int, 0400); - -MODULE_PARM_DESC(tv_disable, "Disable TV-out detection\n"); -int nouveau_tv_disable = 0; -module_param_named(tv_disable, nouveau_tv_disable, int, 0400); - MODULE_PARM_DESC(tv_norm, "Default TV norm.\n" "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J,\n" "\t\t\thd480i, hd480p, hd576i, hd576p, hd720p, hd1080i.\n" @@ -162,11 +154,9 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) if (pm_state.event == PM_EVENT_PRETHAW) return 0; - NV_INFO(dev, "Disabling fbcon acceleration...\n"); fbdev_flags = dev_priv->fbdev_info->flags; dev_priv->fbdev_info->flags |= FBINFO_HWACCEL_DISABLED; - NV_INFO(dev, "Unpinning framebuffer(s)...\n"); list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct nouveau_framebuffer *nouveau_fb; diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h index d8b559011777..4b9aaf2a8d0f 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -681,7 +681,6 @@ extern int nouveau_uscript_tmds; extern int nouveau_vram_pushbuf; extern int nouveau_vram_notify; extern int nouveau_fbpercrtc; -extern int nouveau_tv_disable; extern char *nouveau_tv_norm; extern int nouveau_reg_debug; extern char *nouveau_vbios; @@ -689,7 +688,6 @@ extern int nouveau_ctxfw; extern int nouveau_ignorelid; extern int nouveau_nofbaccel; extern int nouveau_noaccel; -extern int nouveau_override_conntype; extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); extern int nouveau_pci_resume(struct pci_dev *pdev); @@ -928,10 +926,6 @@ extern void nv40_fb_takedown(struct drm_device *); extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, uint32_t, uint32_t); -/* nv50_fb.c */ -extern int nv50_fb_init(struct drm_device *); -extern void nv50_fb_takedown(struct drm_device *); - /* nv04_fifo.c */ extern int nv04_fifo_init(struct drm_device *); extern void nv04_fifo_disable(struct drm_device *); diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 8e7dc1d4912a..68cedd9194fe 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_grctx.c b/trunk/drivers/gpu/drm/nouveau/nouveau_grctx.c index 32f0e495464c..c7ebec696747 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_grctx.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_grctx.c @@ -23,7 +23,6 @@ */ #include -#include #include "drmP.h" #include "nouveau_drv.h" diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_irq.c b/trunk/drivers/gpu/drm/nouveau/nouveau_irq.c index 2bd59a92fee5..95220ddebb45 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_irq.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_irq.c @@ -311,31 +311,6 @@ nouveau_print_bitfield_names_(uint32_t value, #define nouveau_print_bitfield_names(val, namelist) \ nouveau_print_bitfield_names_((val), (namelist), ARRAY_SIZE(namelist)) -struct nouveau_enum_names { - uint32_t value; - const char *name; -}; - -static void -nouveau_print_enum_names_(uint32_t value, - const struct nouveau_enum_names *namelist, - const int namelist_len) -{ - /* - * Caller must have already printed the KERN_* log level for us. - * Also the caller is responsible for adding the newline. - */ - int i; - for (i = 0; i < namelist_len; ++i) { - if (value == namelist[i].value) { - printk("%s", namelist[i].name); - return; - } - } - printk("unknown value 0x%08x", value); -} -#define nouveau_print_enum_names(val, namelist) \ - nouveau_print_enum_names_((val), (namelist), ARRAY_SIZE(namelist)) static int nouveau_graph_chid_from_grctx(struct drm_device *dev) @@ -452,16 +427,14 @@ nouveau_graph_dump_trap_info(struct drm_device *dev, const char *id, struct drm_nouveau_private *dev_priv = dev->dev_private; uint32_t nsource = trap->nsource, nstatus = trap->nstatus; - if (dev_priv->card_type < NV_50) { - NV_INFO(dev, "%s - nSource:", id); - nouveau_print_bitfield_names(nsource, nsource_names); - printk(", nStatus:"); - if (dev_priv->card_type < NV_10) - nouveau_print_bitfield_names(nstatus, nstatus_names); - else - nouveau_print_bitfield_names(nstatus, nstatus_names_nv10); - printk("\n"); - } + NV_INFO(dev, "%s - nSource:", id); + nouveau_print_bitfield_names(nsource, nsource_names); + printk(", nStatus:"); + if (dev_priv->card_type < NV_10) + nouveau_print_bitfield_names(nstatus, nstatus_names); + else + nouveau_print_bitfield_names(nstatus, nstatus_names_nv10); + printk("\n"); NV_INFO(dev, "%s - Ch %d/%d Class 0x%04x Mthd 0x%04x " "Data 0x%08x:0x%08x\n", @@ -604,503 +577,28 @@ nouveau_pgraph_irq_handler(struct drm_device *dev) nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); } -static void -nv50_pfb_vm_trap(struct drm_device *dev, int display, const char *name) -{ - struct drm_nouveau_private *dev_priv = dev->dev_private; - uint32_t trap[6]; - int i, ch; - uint32_t idx = nv_rd32(dev, 0x100c90); - if (idx & 0x80000000) { - idx &= 0xffffff; - if (display) { - for (i = 0; i < 6; i++) { - nv_wr32(dev, 0x100c90, idx | i << 24); - trap[i] = nv_rd32(dev, 0x100c94); - } - for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { - struct nouveau_channel *chan = dev_priv->fifos[ch]; - - if (!chan || !chan->ramin) - continue; - - if (trap[1] == chan->ramin->instance >> 12) - break; - } - NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x %08x channel %d\n", - name, (trap[5]&0x100?"read":"write"), - trap[5]&0xff, trap[4]&0xffff, - trap[3]&0xffff, trap[0], trap[2], ch); - } - nv_wr32(dev, 0x100c90, idx | 0x80000000); - } else if (display) { - NV_INFO(dev, "%s - no VM fault?\n", name); - } -} - -static struct nouveau_enum_names nv50_mp_exec_error_names[] = -{ - { 3, "STACK_UNDERFLOW" }, - { 4, "QUADON_ACTIVE" }, - { 8, "TIMEOUT" }, - { 0x10, "INVALID_OPCODE" }, - { 0x40, "BREAKPOINT" }, -}; - -static void -nv50_pgraph_mp_trap(struct drm_device *dev, int tpid, int display) -{ - struct drm_nouveau_private *dev_priv = dev->dev_private; - uint32_t units = nv_rd32(dev, 0x1540); - uint32_t addr, mp10, status, pc, oplow, ophigh; - int i; - int mps = 0; - for (i = 0; i < 4; i++) { - if (!(units & 1 << (i+24))) - continue; - if (dev_priv->chipset < 0xa0) - addr = 0x408200 + (tpid << 12) + (i << 7); - else - addr = 0x408100 + (tpid << 11) + (i << 7); - mp10 = nv_rd32(dev, addr + 0x10); - status = nv_rd32(dev, addr + 0x14); - if (!status) - continue; - if (display) { - nv_rd32(dev, addr + 0x20); - pc = nv_rd32(dev, addr + 0x24); - oplow = nv_rd32(dev, addr + 0x70); - ophigh= nv_rd32(dev, addr + 0x74); - NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - " - "TP %d MP %d: ", tpid, i); - nouveau_print_enum_names(status, - nv50_mp_exec_error_names); - printk(" at %06x warp %d, opcode %08x %08x\n", - pc&0xffffff, pc >> 24, - oplow, ophigh); - } - nv_wr32(dev, addr + 0x10, mp10); - nv_wr32(dev, addr + 0x14, 0); - mps++; - } - if (!mps && display) - NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - TP %d: " - "No MPs claiming errors?\n", tpid); -} - -static void -nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old, - uint32_t ustatus_new, int display, const char *name) -{ - struct drm_nouveau_private *dev_priv = dev->dev_private; - int tps = 0; - uint32_t units = nv_rd32(dev, 0x1540); - int i, r; - uint32_t ustatus_addr, ustatus; - for (i = 0; i < 16; i++) { - if (!(units & (1 << i))) - continue; - if (dev_priv->chipset < 0xa0) - ustatus_addr = ustatus_old + (i << 12); - else - ustatus_addr = ustatus_new + (i << 11); - ustatus = nv_rd32(dev, ustatus_addr) & 0x7fffffff; - if (!ustatus) - continue; - tps++; - switch (type) { - case 6: /* texture error... unknown for now */ - nv50_pfb_vm_trap(dev, display, name); - if (display) { - NV_ERROR(dev, "magic set %d:\n", i); - for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) - NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, - nv_rd32(dev, r)); - } - break; - case 7: /* MP error */ - if (ustatus & 0x00010000) { - nv50_pgraph_mp_trap(dev, i, display); - ustatus &= ~0x00010000; - } - break; - case 8: /* TPDMA error */ - { - uint32_t e0c = nv_rd32(dev, ustatus_addr + 4); - uint32_t e10 = nv_rd32(dev, ustatus_addr + 8); - uint32_t e14 = nv_rd32(dev, ustatus_addr + 0xc); - uint32_t e18 = nv_rd32(dev, ustatus_addr + 0x10); - uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); - uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); - uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); - nv50_pfb_vm_trap(dev, display, name); - /* 2d engine destination */ - if (ustatus & 0x00000010) { - if (display) { - NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - Unknown fault at address %02x%08x\n", - i, e14, e10); - NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", - i, e0c, e18, e1c, e20, e24); - } - ustatus &= ~0x00000010; - } - /* Render target */ - if (ustatus & 0x00000040) { - if (display) { - NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - Unknown fault at address %02x%08x\n", - i, e14, e10); - NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", - i, e0c, e18, e1c, e20, e24); - } - ustatus &= ~0x00000040; - } - /* CUDA memory: l[], g[] or stack. */ - if (ustatus & 0x00000080) { - if (display) { - if (e18 & 0x80000000) { - /* g[] read fault? */ - NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global read fault at address %02x%08x\n", - i, e14, e10 | ((e18 >> 24) & 0x1f)); - e18 &= ~0x1f000000; - } else if (e18 & 0xc) { - /* g[] write fault? */ - NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global write fault at address %02x%08x\n", - i, e14, e10 | ((e18 >> 7) & 0x1f)); - e18 &= ~0x00000f80; - } else { - NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Unknown CUDA fault at address %02x%08x\n", - i, e14, e10); - } - NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", - i, e0c, e18, e1c, e20, e24); - } - ustatus &= ~0x00000080; - } - } - break; - } - if (ustatus) { - if (display) - NV_INFO(dev, "%s - TP%d: Unhandled ustatus 0x%08x\n", name, i, ustatus); - } - nv_wr32(dev, ustatus_addr, 0xc0000000); - } - - if (!tps && display) - NV_INFO(dev, "%s - No TPs claiming errors?\n", name); -} - -static void -nv50_pgraph_trap_handler(struct drm_device *dev) -{ - struct nouveau_pgraph_trap trap; - uint32_t status = nv_rd32(dev, 0x400108); - uint32_t ustatus; - int display = nouveau_ratelimit(); - - - if (!status && display) { - nouveau_graph_trap_info(dev, &trap); - nouveau_graph_dump_trap_info(dev, "PGRAPH_TRAP", &trap); - NV_INFO(dev, "PGRAPH_TRAP - no units reporting traps?\n"); - } - - /* DISPATCH: Relays commands to other units and handles NOTIFY, - * COND, QUERY. If you get a trap from it, the command is still stuck - * in DISPATCH and you need to do something about it. */ - if (status & 0x001) { - ustatus = nv_rd32(dev, 0x400804) & 0x7fffffff; - if (!ustatus && display) { - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - no ustatus?\n"); - } - - /* Known to be triggered by screwed up NOTIFY and COND... */ - if (ustatus & 0x00000001) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_FAULT"); - nv_wr32(dev, 0x400500, 0); - if (nv_rd32(dev, 0x400808) & 0x80000000) { - if (display) { - if (nouveau_graph_trapped_channel(dev, &trap.channel)) - trap.channel = -1; - trap.class = nv_rd32(dev, 0x400814); - trap.mthd = nv_rd32(dev, 0x400808) & 0x1ffc; - trap.subc = (nv_rd32(dev, 0x400808) >> 16) & 0x7; - trap.data = nv_rd32(dev, 0x40080c); - trap.data2 = nv_rd32(dev, 0x400810); - nouveau_graph_dump_trap_info(dev, - "PGRAPH_TRAP_DISPATCH_FAULT", &trap); - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400808: %08x\n", nv_rd32(dev, 0x400808)); - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400848: %08x\n", nv_rd32(dev, 0x400848)); - } - nv_wr32(dev, 0x400808, 0); - } else if (display) { - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - No stuck command?\n"); - } - nv_wr32(dev, 0x4008e8, nv_rd32(dev, 0x4008e8) & 3); - nv_wr32(dev, 0x400848, 0); - ustatus &= ~0x00000001; - } - if (ustatus & 0x00000002) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_QUERY"); - nv_wr32(dev, 0x400500, 0); - if (nv_rd32(dev, 0x40084c) & 0x80000000) { - if (display) { - if (nouveau_graph_trapped_channel(dev, &trap.channel)) - trap.channel = -1; - trap.class = nv_rd32(dev, 0x400814); - trap.mthd = nv_rd32(dev, 0x40084c) & 0x1ffc; - trap.subc = (nv_rd32(dev, 0x40084c) >> 16) & 0x7; - trap.data = nv_rd32(dev, 0x40085c); - trap.data2 = 0; - nouveau_graph_dump_trap_info(dev, - "PGRAPH_TRAP_DISPATCH_QUERY", &trap); - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - 40084c: %08x\n", nv_rd32(dev, 0x40084c)); - } - nv_wr32(dev, 0x40084c, 0); - } else if (display) { - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - No stuck command?\n"); - } - ustatus &= ~0x00000002; - } - if (ustatus && display) - NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - Unhandled ustatus 0x%08x\n", ustatus); - nv_wr32(dev, 0x400804, 0xc0000000); - nv_wr32(dev, 0x400108, 0x001); - status &= ~0x001; - } - - /* TRAPs other than dispatch use the "normal" trap regs. */ - if (status && display) { - nouveau_graph_trap_info(dev, &trap); - nouveau_graph_dump_trap_info(dev, - "PGRAPH_TRAP", &trap); - } - - /* M2MF: Memory to memory copy engine. */ - if (status & 0x002) { - ustatus = nv_rd32(dev, 0x406800) & 0x7fffffff; - if (!ustatus && display) { - NV_INFO(dev, "PGRAPH_TRAP_M2MF - no ustatus?\n"); - } - if (ustatus & 0x00000001) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_NOTIFY"); - ustatus &= ~0x00000001; - } - if (ustatus & 0x00000002) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_IN"); - ustatus &= ~0x00000002; - } - if (ustatus & 0x00000004) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_OUT"); - ustatus &= ~0x00000004; - } - NV_INFO (dev, "PGRAPH_TRAP_M2MF - %08x %08x %08x %08x\n", - nv_rd32(dev, 0x406804), - nv_rd32(dev, 0x406808), - nv_rd32(dev, 0x40680c), - nv_rd32(dev, 0x406810)); - if (ustatus && display) - NV_INFO(dev, "PGRAPH_TRAP_M2MF - Unhandled ustatus 0x%08x\n", ustatus); - /* No sane way found yet -- just reset the bugger. */ - nv_wr32(dev, 0x400040, 2); - nv_wr32(dev, 0x400040, 0); - nv_wr32(dev, 0x406800, 0xc0000000); - nv_wr32(dev, 0x400108, 0x002); - status &= ~0x002; - } - - /* VFETCH: Fetches data from vertex buffers. */ - if (status & 0x004) { - ustatus = nv_rd32(dev, 0x400c04) & 0x7fffffff; - if (!ustatus && display) { - NV_INFO(dev, "PGRAPH_TRAP_VFETCH - no ustatus?\n"); - } - if (ustatus & 0x00000001) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_VFETCH_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_VFETCH_FAULT - %08x %08x %08x %08x\n", - nv_rd32(dev, 0x400c00), - nv_rd32(dev, 0x400c08), - nv_rd32(dev, 0x400c0c), - nv_rd32(dev, 0x400c10)); - ustatus &= ~0x00000001; - } - if (ustatus && display) - NV_INFO(dev, "PGRAPH_TRAP_VFETCH - Unhandled ustatus 0x%08x\n", ustatus); - nv_wr32(dev, 0x400c04, 0xc0000000); - nv_wr32(dev, 0x400108, 0x004); - status &= ~0x004; - } - - /* STRMOUT: DirectX streamout / OpenGL transform feedback. */ - if (status & 0x008) { - ustatus = nv_rd32(dev, 0x401800) & 0x7fffffff; - if (!ustatus && display) { - NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - no ustatus?\n"); - } - if (ustatus & 0x00000001) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_STRMOUT_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_STRMOUT_FAULT - %08x %08x %08x %08x\n", - nv_rd32(dev, 0x401804), - nv_rd32(dev, 0x401808), - nv_rd32(dev, 0x40180c), - nv_rd32(dev, 0x401810)); - ustatus &= ~0x00000001; - } - if (ustatus && display) - NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - Unhandled ustatus 0x%08x\n", ustatus); - /* No sane way found yet -- just reset the bugger. */ - nv_wr32(dev, 0x400040, 0x80); - nv_wr32(dev, 0x400040, 0); - nv_wr32(dev, 0x401800, 0xc0000000); - nv_wr32(dev, 0x400108, 0x008); - status &= ~0x008; - } - - /* CCACHE: Handles code and c[] caches and fills them. */ - if (status & 0x010) { - ustatus = nv_rd32(dev, 0x405018) & 0x7fffffff; - if (!ustatus && display) { - NV_INFO(dev, "PGRAPH_TRAP_CCACHE - no ustatus?\n"); - } - if (ustatus & 0x00000001) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_CCACHE_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_CCACHE_FAULT - %08x %08x %08x %08x %08x %08x %08x\n", - nv_rd32(dev, 0x405800), - nv_rd32(dev, 0x405804), - nv_rd32(dev, 0x405808), - nv_rd32(dev, 0x40580c), - nv_rd32(dev, 0x405810), - nv_rd32(dev, 0x405814), - nv_rd32(dev, 0x40581c)); - ustatus &= ~0x00000001; - } - if (ustatus && display) - NV_INFO(dev, "PGRAPH_TRAP_CCACHE - Unhandled ustatus 0x%08x\n", ustatus); - nv_wr32(dev, 0x405018, 0xc0000000); - nv_wr32(dev, 0x400108, 0x010); - status &= ~0x010; - } - - /* Unknown, not seen yet... 0x402000 is the only trap status reg - * remaining, so try to handle it anyway. Perhaps related to that - * unknown DMA slot on tesla? */ - if (status & 0x20) { - nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_UNKC04"); - ustatus = nv_rd32(dev, 0x402000) & 0x7fffffff; - if (display) - NV_INFO(dev, "PGRAPH_TRAP_UNKC04 - Unhandled ustatus 0x%08x\n", ustatus); - nv_wr32(dev, 0x402000, 0xc0000000); - /* no status modifiction on purpose */ - } - - /* TEXTURE: CUDA texturing units */ - if (status & 0x040) { - nv50_pgraph_tp_trap (dev, 6, 0x408900, 0x408600, display, - "PGRAPH_TRAP_TEXTURE"); - nv_wr32(dev, 0x400108, 0x040); - status &= ~0x040; - } - - /* MP: CUDA execution engines. */ - if (status & 0x080) { - nv50_pgraph_tp_trap (dev, 7, 0x408314, 0x40831c, display, - "PGRAPH_TRAP_MP"); - nv_wr32(dev, 0x400108, 0x080); - status &= ~0x080; - } - - /* TPDMA: Handles TP-initiated uncached memory accesses: - * l[], g[], stack, 2d surfaces, render targets. */ - if (status & 0x100) { - nv50_pgraph_tp_trap (dev, 8, 0x408e08, 0x408708, display, - "PGRAPH_TRAP_TPDMA"); - nv_wr32(dev, 0x400108, 0x100); - status &= ~0x100; - } - - if (status) { - if (display) - NV_INFO(dev, "PGRAPH_TRAP - Unknown trap 0x%08x\n", - status); - nv_wr32(dev, 0x400108, status); - } -} - -/* There must be a *lot* of these. Will take some time to gather them up. */ -static struct nouveau_enum_names nv50_data_error_names[] = -{ - { 4, "INVALID_VALUE" }, - { 5, "INVALID_ENUM" }, - { 8, "INVALID_OBJECT" }, - { 0xc, "INVALID_BITFIELD" }, - { 0x28, "MP_NO_REG_SPACE" }, - { 0x2b, "MP_BLOCK_SIZE_MISMATCH" }, -}; - static void nv50_pgraph_irq_handler(struct drm_device *dev) { - struct nouveau_pgraph_trap trap; - int unhandled = 0; uint32_t status; while ((status = nv_rd32(dev, NV03_PGRAPH_INTR))) { - /* NOTIFY: You've set a NOTIFY an a command and it's done. */ + uint32_t nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); + if (status & 0x00000001) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_NOTIFY", &trap); + nouveau_pgraph_intr_notify(dev, nsource); status &= ~0x00000001; nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000001); } - /* COMPUTE_QUERY: Purpose and exact cause unknown, happens - * when you write 0x200 to 0x50c0 method 0x31c. */ - if (status & 0x00000002) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_COMPUTE_QUERY", &trap); - status &= ~0x00000002; - nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000002); - } - - /* Unknown, never seen: 0x4 */ - - /* ILLEGAL_MTHD: You used a wrong method for this class. */ if (status & 0x00000010) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_pgraph_intr_swmthd(dev, &trap)) - unhandled = 1; - if (unhandled && nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_ILLEGAL_MTHD", &trap); + nouveau_pgraph_intr_error(dev, nsource | + NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD); + status &= ~0x00000010; nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000010); } - /* ILLEGAL_CLASS: You used a wrong class. */ - if (status & 0x00000020) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_ILLEGAL_CLASS", &trap); - status &= ~0x00000020; - nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000020); - } - - /* DOUBLE_NOTIFY: You tried to set a NOTIFY on another NOTIFY. */ - if (status & 0x00000040) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_DOUBLE_NOTIFY", &trap); - status &= ~0x00000040; - nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000040); - } - - /* CONTEXT_SWITCH: PGRAPH needs us to load a new context */ if (status & 0x00001000) { nv_wr32(dev, 0x400500, 0x00000000); nv_wr32(dev, NV03_PGRAPH_INTR, @@ -1115,59 +613,49 @@ nv50_pgraph_irq_handler(struct drm_device *dev) status &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; } - /* BUFFER_NOTIFY: Your m2mf transfer finished */ - if (status & 0x00010000) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_BUFFER_NOTIFY", &trap); - status &= ~0x00010000; - nv_wr32(dev, NV03_PGRAPH_INTR, 0x00010000); - } - - /* DATA_ERROR: Invalid value for this method, or invalid - * state in current PGRAPH context for this operation */ if (status & 0x00100000) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) { - nouveau_graph_dump_trap_info(dev, - "PGRAPH_DATA_ERROR", &trap); - NV_INFO (dev, "PGRAPH_DATA_ERROR - "); - nouveau_print_enum_names(nv_rd32(dev, 0x400110), - nv50_data_error_names); - printk("\n"); - } + nouveau_pgraph_intr_error(dev, nsource | + NV03_PGRAPH_NSOURCE_DATA_ERROR); + status &= ~0x00100000; nv_wr32(dev, NV03_PGRAPH_INTR, 0x00100000); } - /* TRAP: Something bad happened in the middle of command - * execution. Has a billion types, subtypes, and even - * subsubtypes. */ if (status & 0x00200000) { - nv50_pgraph_trap_handler(dev); + int r; + + nouveau_pgraph_intr_error(dev, nsource | + NV03_PGRAPH_NSOURCE_PROTECTION_ERROR); + + NV_ERROR(dev, "magic set 1:\n"); + for (r = 0x408900; r <= 0x408910; r += 4) + NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, + nv_rd32(dev, r)); + nv_wr32(dev, 0x408900, + nv_rd32(dev, 0x408904) | 0xc0000000); + for (r = 0x408e08; r <= 0x408e24; r += 4) + NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, + nv_rd32(dev, r)); + nv_wr32(dev, 0x408e08, + nv_rd32(dev, 0x408e08) | 0xc0000000); + + NV_ERROR(dev, "magic set 2:\n"); + for (r = 0x409900; r <= 0x409910; r += 4) + NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, + nv_rd32(dev, r)); + nv_wr32(dev, 0x409900, + nv_rd32(dev, 0x409904) | 0xc0000000); + for (r = 0x409e08; r <= 0x409e24; r += 4) + NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, + nv_rd32(dev, r)); + nv_wr32(dev, 0x409e08, + nv_rd32(dev, 0x409e08) | 0xc0000000); + status &= ~0x00200000; + nv_wr32(dev, NV03_PGRAPH_NSOURCE, nsource); nv_wr32(dev, NV03_PGRAPH_INTR, 0x00200000); } - /* Unknown, never seen: 0x00400000 */ - - /* SINGLE_STEP: Happens on every method if you turned on - * single stepping in 40008c */ - if (status & 0x01000000) { - nouveau_graph_trap_info(dev, &trap); - if (nouveau_ratelimit()) - nouveau_graph_dump_trap_info(dev, - "PGRAPH_SINGLE_STEP", &trap); - status &= ~0x01000000; - nv_wr32(dev, NV03_PGRAPH_INTR, 0x01000000); - } - - /* 0x02000000 happens when you pause a ctxprog... - * but the only way this can happen that I know is by - * poking the relevant MMIO register, and we don't - * do that. */ - if (status) { NV_INFO(dev, "Unhandled PGRAPH_INTR - 0x%08x\n", status); @@ -1184,8 +672,7 @@ nv50_pgraph_irq_handler(struct drm_device *dev) } nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); - if (nv_rd32(dev, 0x400824) & (1 << 31)) - nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); + nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); } static void diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/trunk/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 86785b8d42ed..ed1590577b6c 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_sgdma.c @@ -1,7 +1,6 @@ #include "drmP.h" #include "nouveau_drv.h" #include -#include #define NV_CTXDMA_PAGE_SHIFT 12 #define NV_CTXDMA_PAGE_SIZE (1 << NV_CTXDMA_PAGE_SHIFT) diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_state.c b/trunk/drivers/gpu/drm/nouveau/nouveau_state.c index 10656a6be8e6..eb8f084d5f53 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_state.c @@ -24,7 +24,6 @@ */ #include -#include #include "drmP.h" #include "drm.h" #include "drm_sarea.h" @@ -36,6 +35,7 @@ #include "nouveau_drm.h" #include "nv50_display.h" +static int nouveau_stub_init(struct drm_device *dev) { return 0; } static void nouveau_stub_takedown(struct drm_device *dev) {} static int nouveau_init_engine_ptrs(struct drm_device *dev) @@ -277,8 +277,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) engine->timer.init = nv04_timer_init; engine->timer.read = nv04_timer_read; engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv50_fb_init; - engine->fb.takedown = nv50_fb_takedown; + engine->fb.init = nouveau_stub_init; + engine->fb.takedown = nouveau_stub_takedown; engine->graph.grclass = nv50_graph_grclass; engine->graph.init = nv50_graph_init; engine->graph.takedown = nv50_graph_takedown; diff --git a/trunk/drivers/gpu/drm/nouveau/nv04_crtc.c b/trunk/drivers/gpu/drm/nouveau/nv04_crtc.c index eba687f1099e..a1d1ebb073d9 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/trunk/drivers/gpu/drm/nouveau/nv04_crtc.c @@ -230,9 +230,9 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) struct drm_framebuffer *fb = crtc->fb; /* Calculate our timings */ - int horizDisplay = (mode->crtc_hdisplay >> 3) - 1; - int horizStart = (mode->crtc_hsync_start >> 3) + 1; - int horizEnd = (mode->crtc_hsync_end >> 3) + 1; + int horizDisplay = (mode->crtc_hdisplay >> 3) - 1; + int horizStart = (mode->crtc_hsync_start >> 3) - 1; + int horizEnd = (mode->crtc_hsync_end >> 3) - 1; int horizTotal = (mode->crtc_htotal >> 3) - 5; int horizBlankStart = (mode->crtc_hdisplay >> 3) - 1; int horizBlankEnd = (mode->crtc_htotal >> 3) - 1; diff --git a/trunk/drivers/gpu/drm/nouveau/nv04_fbcon.c b/trunk/drivers/gpu/drm/nouveau/nv04_fbcon.c index 813b25cec726..3da90c2c4e63 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/trunk/drivers/gpu/drm/nouveau/nv04_fbcon.c @@ -118,8 +118,8 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) return; } - width = ALIGN(image->width, 8); - dsize = ALIGN(width * image->height, 32) >> 5; + width = ALIGN(image->width, 32); + dsize = (width * image->height) >> 5; if (info->fix.visual == FB_VISUAL_TRUECOLOR || info->fix.visual == FB_VISUAL_DIRECTCOLOR) { @@ -136,8 +136,8 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) ((image->dx + image->width) & 0xffff)); OUT_RING(chan, bg); OUT_RING(chan, fg); - OUT_RING(chan, (image->height << 16) | width); OUT_RING(chan, (image->height << 16) | image->width); + OUT_RING(chan, (image->height << 16) | width); OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff)); while (dsize) { diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_display.c b/trunk/drivers/gpu/drm/nouveau/nv50_display.c index fac6c88a2b1f..61a89f2dc553 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv50_display.c +++ b/trunk/drivers/gpu/drm/nouveau/nv50_display.c @@ -522,8 +522,8 @@ int nv50_display_create(struct drm_device *dev) } for (i = 0 ; i < dcb->connector.entries; i++) { - if (i != 0 && dcb->connector.entry[i].index2 == - dcb->connector.entry[i - 1].index2) + if (i != 0 && dcb->connector.entry[i].index == + dcb->connector.entry[i - 1].index) continue; nouveau_connector_create(dev, &dcb->connector.entry[i]); } diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_fb.c b/trunk/drivers/gpu/drm/nouveau/nv50_fb.c deleted file mode 100644 index a95e6941ba88..000000000000 --- a/trunk/drivers/gpu/drm/nouveau/nv50_fb.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "drmP.h" -#include "drm.h" -#include "nouveau_drv.h" -#include "nouveau_drm.h" - -int -nv50_fb_init(struct drm_device *dev) -{ - /* This is needed to get meaningful information from 100c90 - * on traps. No idea what these values mean exactly. */ - struct drm_nouveau_private *dev_priv = dev->dev_private; - - switch (dev_priv->chipset) { - case 0x50: - nv_wr32(dev, 0x100c90, 0x0707ff); - break; - case 0xa5: - case 0xa8: - nv_wr32(dev, 0x100c90, 0x0d0fff); - break; - default: - nv_wr32(dev, 0x100c90, 0x1d07ff); - break; - } - - return 0; -} - -void -nv50_fb_takedown(struct drm_device *dev) -{ -} diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_fbcon.c b/trunk/drivers/gpu/drm/nouveau/nv50_fbcon.c index 25a3cd8794f9..993c7126fbde 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/trunk/drivers/gpu/drm/nouveau/nv50_fbcon.c @@ -233,7 +233,7 @@ nv50_fbcon_accel_init(struct fb_info *info) BEGIN_RING(chan, NvSub2D, 0x0808, 3); OUT_RING(chan, 0); OUT_RING(chan, 0); - OUT_RING(chan, 1); + OUT_RING(chan, 0); BEGIN_RING(chan, NvSub2D, 0x081c, 1); OUT_RING(chan, 1); BEGIN_RING(chan, NvSub2D, 0x0840, 4); diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_graph.c b/trunk/drivers/gpu/drm/nouveau/nv50_graph.c index c62b33a02f88..857a09671a39 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/trunk/drivers/gpu/drm/nouveau/nv50_graph.c @@ -56,10 +56,6 @@ nv50_graph_init_intr(struct drm_device *dev) static void nv50_graph_init_regs__nv(struct drm_device *dev) { - struct drm_nouveau_private *dev_priv = dev->dev_private; - uint32_t units = nv_rd32(dev, 0x1540); - int i; - NV_DEBUG(dev, "\n"); nv_wr32(dev, 0x400804, 0xc0000000); @@ -69,20 +65,6 @@ nv50_graph_init_regs__nv(struct drm_device *dev) nv_wr32(dev, 0x405018, 0xc0000000); nv_wr32(dev, 0x402000, 0xc0000000); - for (i = 0; i < 16; i++) { - if (units & 1 << i) { - if (dev_priv->chipset < 0xa0) { - nv_wr32(dev, 0x408900 + (i << 12), 0xc0000000); - nv_wr32(dev, 0x408e08 + (i << 12), 0xc0000000); - nv_wr32(dev, 0x408314 + (i << 12), 0xc0000000); - } else { - nv_wr32(dev, 0x408600 + (i << 11), 0xc0000000); - nv_wr32(dev, 0x408708 + (i << 11), 0xc0000000); - nv_wr32(dev, 0x40831c + (i << 11), 0xc0000000); - } - } - } - nv_wr32(dev, 0x400108, 0xffffffff); nv_wr32(dev, 0x400824, 0x00004000); @@ -247,6 +229,10 @@ nv50_graph_create_context(struct nouveau_channel *chan) nouveau_grctx_vals_load(dev, ctx); } nv_wo32(dev, ctx, 0x00000/4, chan->ramin->instance >> 12); + if ((dev_priv->chipset & 0xf0) == 0xa0) + nv_wo32(dev, ctx, 0x00004/4, 0x00000000); + else + nv_wo32(dev, ctx, 0x0011c/4, 0x00000000); dev_priv->engine.instmem.finish_access(dev); return 0; diff --git a/trunk/drivers/gpu/drm/nouveau/nv50_grctx.c b/trunk/drivers/gpu/drm/nouveau/nv50_grctx.c index 546b31949a30..d105fcd42ca0 100644 --- a/trunk/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/trunk/drivers/gpu/drm/nouveau/nv50_grctx.c @@ -64,9 +64,6 @@ #define CP_FLAG_ALWAYS ((2 * 32) + 13) #define CP_FLAG_ALWAYS_FALSE 0 #define CP_FLAG_ALWAYS_TRUE 1 -#define CP_FLAG_INTR ((2 * 32) + 15) -#define CP_FLAG_INTR_NOT_PENDING 0 -#define CP_FLAG_INTR_PENDING 1 #define CP_CTX 0x00100000 #define CP_CTX_COUNT 0x000f0000 @@ -217,8 +214,6 @@ nv50_grctx_init(struct nouveau_grctx *ctx) cp_name(ctx, cp_setup_save); cp_set (ctx, UNK1D, SET); cp_wait(ctx, STATUS, BUSY); - cp_wait(ctx, INTR, PENDING); - cp_bra (ctx, STATUS, BUSY, cp_setup_save); cp_set (ctx, UNK01, SET); cp_set (ctx, SWAP_DIRECTION, SAVE); @@ -274,7 +269,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) int offset, base; uint32_t units = nv_rd32 (ctx->dev, 0x1540); - /* 0800: DISPATCH */ + /* 0800 */ cp_ctx(ctx, 0x400808, 7); gr_def(ctx, 0x400814, 0x00000030); cp_ctx(ctx, 0x400834, 0x32); @@ -305,7 +300,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) gr_def(ctx, 0x400b20, 0x0001629d); } - /* 0C00: VFETCH */ + /* 0C00 */ cp_ctx(ctx, 0x400c08, 0x2); gr_def(ctx, 0x400c08, 0x0000fe0c); @@ -331,7 +326,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) cp_ctx(ctx, 0x401540, 0x5); gr_def(ctx, 0x401550, 0x00001018); - /* 1800: STREAMOUT */ + /* 1800 */ cp_ctx(ctx, 0x401814, 0x1); gr_def(ctx, 0x401814, 0x000000ff); if (dev_priv->chipset == 0x50) { @@ -646,7 +641,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) if (dev_priv->chipset == 0x50) cp_ctx(ctx, 0x4063e0, 0x1); - /* 6800: M2MF */ + /* 6800 */ if (dev_priv->chipset < 0x90) { cp_ctx(ctx, 0x406814, 0x2b); gr_def(ctx, 0x406818, 0x00000f80); diff --git a/trunk/drivers/gpu/drm/r128/r128_cce.c b/trunk/drivers/gpu/drm/r128/r128_cce.c index e671d0e74d4c..4c39a407aa4a 100644 --- a/trunk/drivers/gpu/drm/r128/r128_cce.c +++ b/trunk/drivers/gpu/drm/r128/r128_cce.c @@ -31,7 +31,6 @@ #include #include -#include #include "drmP.h" #include "drm.h" diff --git a/trunk/drivers/gpu/drm/radeon/Makefile b/trunk/drivers/gpu/drm/radeon/Makefile index 3c91312dea9a..ed38262d9985 100644 --- a/trunk/drivers/gpu/drm/radeon/Makefile +++ b/trunk/drivers/gpu/drm/radeon/Makefile @@ -50,7 +50,7 @@ $(obj)/r600_cs.o: $(obj)/r600_reg_safe.h radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ radeon_irq.o r300_cmdbuf.o r600_cp.o # add KMS driver -radeon-y += radeon_device.o radeon_asic.o radeon_kms.o \ +radeon-y += radeon_device.o radeon_kms.o \ radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \ atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \ radeon_legacy_crtc.o radeon_legacy_encoders.o radeon_connectors.o \ diff --git a/trunk/drivers/gpu/drm/radeon/atom.c b/trunk/drivers/gpu/drm/radeon/atom.c index 07b7ebf1f466..d75788feac6c 100644 --- a/trunk/drivers/gpu/drm/radeon/atom.c +++ b/trunk/drivers/gpu/drm/radeon/atom.c @@ -24,7 +24,6 @@ #include #include -#include #include #define ATOM_DEBUG @@ -53,17 +52,15 @@ typedef struct { struct atom_context *ctx; + uint32_t *ps, *ws; int ps_shift; uint16_t start; - unsigned last_jump; - unsigned long last_jump_jiffies; - bool abort; } atom_exec_context; int atom_debug = 0; -static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params); -int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params); +static void atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params); +void atom_execute_table(struct atom_context *ctx, int index, uint32_t * params); static uint32_t atom_arg_mask[8] = { 0xFFFFFFFF, 0xFFFF, 0xFFFF00, 0xFFFF0000, 0xFF, 0xFF00, 0xFF0000, @@ -607,17 +604,12 @@ static void atom_op_beep(atom_exec_context *ctx, int *ptr, int arg) static void atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg) { int idx = U8((*ptr)++); - int r = 0; - if (idx < ATOM_TABLE_NAMES_CNT) SDEBUG(" table: %d (%s)\n", idx, atom_table_names[idx]); else SDEBUG(" table: %d\n", idx); if (U16(ctx->ctx->cmd_table + 4 + 2 * idx)) - r = atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); - if (r) { - ctx->abort = true; - } + atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); } static void atom_op_clear(atom_exec_context *ctx, int *ptr, int arg) @@ -681,8 +673,6 @@ static void atom_op_eot(atom_exec_context *ctx, int *ptr, int arg) static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) { int execute = 0, target = U16(*ptr); - unsigned long cjiffies; - (*ptr) += 2; switch (arg) { case ATOM_COND_ABOVE: @@ -710,25 +700,8 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) if (arg != ATOM_COND_ALWAYS) SDEBUG(" taken: %s\n", execute ? "yes" : "no"); SDEBUG(" target: 0x%04X\n", target); - if (execute) { - if (ctx->last_jump == (ctx->start + target)) { - cjiffies = jiffies; - if (time_after(cjiffies, ctx->last_jump_jiffies)) { - cjiffies -= ctx->last_jump_jiffies; - if ((jiffies_to_msecs(cjiffies) > 1000)) { - DRM_ERROR("atombios stuck in loop for more than 1sec aborting\n"); - ctx->abort = true; - } - } else { - /* jiffies wrap around we will just wait a little longer */ - ctx->last_jump_jiffies = jiffies; - } - } else { - ctx->last_jump = ctx->start + target; - ctx->last_jump_jiffies = jiffies; - } + if (execute) *ptr = ctx->start + target; - } } static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg) @@ -1131,7 +1104,7 @@ static struct { atom_op_shr, ATOM_ARG_MC}, { atom_op_debug, 0},}; -static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params) +static void atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params) { int base = CU16(ctx->cmd_table + 4 + 2 * index); int len, ws, ps, ptr; @@ -1139,7 +1112,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 atom_exec_context ectx; if (!base) - return -EINVAL; + return; len = CU16(base + ATOM_CT_SIZE_PTR); ws = CU8(base + ATOM_CT_WS_PTR); @@ -1152,8 +1125,6 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 ectx.ps_shift = ps / 4; ectx.start = base; ectx.ps = params; - ectx.abort = false; - ectx.last_jump = 0; if (ws) ectx.ws = kzalloc(4 * ws, GFP_KERNEL); else @@ -1166,11 +1137,6 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 SDEBUG("%s @ 0x%04X\n", atom_op_names[op], ptr - 1); else SDEBUG("[%d] @ 0x%04X\n", op, ptr - 1); - if (ectx.abort) { - DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", - base, len, ws, ps, ptr - 1); - return -EINVAL; - } if (op < ATOM_OP_CNT && op > 0) opcode_table[op].func(&ectx, &ptr, @@ -1186,13 +1152,10 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 if (ws) kfree(ectx.ws); - return 0; } -int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) +void atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) { - int r; - mutex_lock(&ctx->mutex); /* reset reg block */ ctx->reg_block = 0; @@ -1200,9 +1163,8 @@ int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) ctx->fb_base = 0; /* reset io mode */ ctx->io_mode = ATOM_IO_MM; - r = atom_execute_table_locked(ctx, index, params); + atom_execute_table_locked(ctx, index, params); mutex_unlock(&ctx->mutex); - return r; } static int atom_iio_len[] = { 1, 2, 3, 3, 3, 3, 4, 4, 4, 3 }; @@ -1286,7 +1248,9 @@ int atom_asic_init(struct atom_context *ctx) if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT)) return 1; - return atom_execute_table(ctx, ATOM_CMD_INIT, ps); + atom_execute_table(ctx, ATOM_CMD_INIT, ps); + + return 0; } void atom_destroy(struct atom_context *ctx) @@ -1296,16 +1260,12 @@ void atom_destroy(struct atom_context *ctx) kfree(ctx); } -bool atom_parse_data_header(struct atom_context *ctx, int index, +void atom_parse_data_header(struct atom_context *ctx, int index, uint16_t * size, uint8_t * frev, uint8_t * crev, uint16_t * data_start) { int offset = index * 2 + 4; int idx = CU16(ctx->data_table + offset); - u16 *mdt = (u16 *)(ctx->bios + ctx->data_table + 4); - - if (!mdt[index]) - return false; if (size) *size = CU16(idx); @@ -1314,42 +1274,38 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, if (crev) *crev = CU8(idx + 3); *data_start = idx; - return true; + return; } -bool atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t * frev, +void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t * frev, uint8_t * crev) { int offset = index * 2 + 4; int idx = CU16(ctx->cmd_table + offset); - u16 *mct = (u16 *)(ctx->bios + ctx->cmd_table + 4); - - if (!mct[index]) - return false; if (frev) *frev = CU8(idx + 2); if (crev) *crev = CU8(idx + 3); - return true; + return; } int atom_allocate_fb_scratch(struct atom_context *ctx) { int index = GetIndexIntoMasterTable(DATA, VRAM_UsageByFirmware); uint16_t data_offset; - int usage_bytes = 0; + int usage_bytes; struct _ATOM_VRAM_USAGE_BY_FIRMWARE *firmware_usage; - if (atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) { - firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset); + atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset); - DRM_DEBUG("atom firmware requested %08x %dkb\n", - firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, - firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); + firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset); - usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; - } + DRM_DEBUG("atom firmware requested %08x %dkb\n", + firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, + firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); + + usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; if (usage_bytes == 0) usage_bytes = 20 * 1024; /* allocate some scratch memory */ diff --git a/trunk/drivers/gpu/drm/radeon/atom.h b/trunk/drivers/gpu/drm/radeon/atom.h index cd1b64ab5ca7..bc73781423a1 100644 --- a/trunk/drivers/gpu/drm/radeon/atom.h +++ b/trunk/drivers/gpu/drm/radeon/atom.h @@ -140,13 +140,11 @@ struct atom_context { extern int atom_debug; struct atom_context *atom_parse(struct card_info *, void *); -int atom_execute_table(struct atom_context *, int, uint32_t *); +void atom_execute_table(struct atom_context *, int, uint32_t *); int atom_asic_init(struct atom_context *); void atom_destroy(struct atom_context *); -bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, - uint8_t *frev, uint8_t *crev, uint16_t *data_start); -bool atom_parse_cmd_header(struct atom_context *ctx, int index, - uint8_t *frev, uint8_t *crev); +void atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, uint8_t *frev, uint8_t *crev, uint16_t *data_start); +void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev); int atom_allocate_fb_scratch(struct atom_context *ctx); #include "atom-types.h" #include "atombios.h" diff --git a/trunk/drivers/gpu/drm/radeon/atombios_crtc.c b/trunk/drivers/gpu/drm/radeon/atombios_crtc.c index fd4ef6d18849..dd9fdf560611 100644 --- a/trunk/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/trunk/drivers/gpu/drm/radeon/atombios_crtc.c @@ -353,55 +353,12 @@ static void atombios_crtc_set_timing(struct drm_crtc *crtc, atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); } -static void atombios_disable_ss(struct drm_crtc *crtc) -{ - struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); - struct drm_device *dev = crtc->dev; - struct radeon_device *rdev = dev->dev_private; - u32 ss_cntl; - - if (ASIC_IS_DCE4(rdev)) { - switch (radeon_crtc->pll_id) { - case ATOM_PPLL1: - ss_cntl = RREG32(EVERGREEN_P1PLL_SS_CNTL); - ss_cntl &= ~EVERGREEN_PxPLL_SS_EN; - WREG32(EVERGREEN_P1PLL_SS_CNTL, ss_cntl); - break; - case ATOM_PPLL2: - ss_cntl = RREG32(EVERGREEN_P2PLL_SS_CNTL); - ss_cntl &= ~EVERGREEN_PxPLL_SS_EN; - WREG32(EVERGREEN_P2PLL_SS_CNTL, ss_cntl); - break; - case ATOM_DCPLL: - case ATOM_PPLL_INVALID: - return; - } - } else if (ASIC_IS_AVIVO(rdev)) { - switch (radeon_crtc->pll_id) { - case ATOM_PPLL1: - ss_cntl = RREG32(AVIVO_P1PLL_INT_SS_CNTL); - ss_cntl &= ~1; - WREG32(AVIVO_P1PLL_INT_SS_CNTL, ss_cntl); - break; - case ATOM_PPLL2: - ss_cntl = RREG32(AVIVO_P2PLL_INT_SS_CNTL); - ss_cntl &= ~1; - WREG32(AVIVO_P2PLL_INT_SS_CNTL, ss_cntl); - break; - case ATOM_DCPLL: - case ATOM_PPLL_INVALID: - return; - } - } -} - - union atom_enable_ss { ENABLE_LVDS_SS_PARAMETERS legacy; ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION v1; }; -static void atombios_enable_ss(struct drm_crtc *crtc) +static void atombios_set_ss(struct drm_crtc *crtc, int enable) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); struct drm_device *dev = crtc->dev; @@ -430,9 +387,9 @@ static void atombios_enable_ss(struct drm_crtc *crtc) step = dig->ss->step; delay = dig->ss->delay; range = dig->ss->range; - } else + } else if (enable) return; - } else + } else if (enable) return; break; } @@ -449,13 +406,13 @@ static void atombios_enable_ss(struct drm_crtc *crtc) args.v1.ucSpreadSpectrumDelay = delay; args.v1.ucSpreadSpectrumRange = range; args.v1.ucPpll = radeon_crtc->crtc_id ? ATOM_PPLL2 : ATOM_PPLL1; - args.v1.ucEnable = ATOM_ENABLE; + args.v1.ucEnable = enable; } else { args.legacy.usSpreadSpectrumPercentage = cpu_to_le16(percentage); args.legacy.ucSpreadSpectrumType = type; args.legacy.ucSpreadSpectrumStepSize_Delay = (step & 3) << 2; args.legacy.ucSpreadSpectrumStepSize_Delay |= (delay & 7) << 4; - args.legacy.ucEnable = ATOM_ENABLE; + args.legacy.ucEnable = enable; } atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); } @@ -521,6 +478,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, /* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */ if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1) adjusted_clock = mode->clock * 2; + /* LVDS PLL quirks */ + if (encoder->encoder_type == DRM_MODE_ENCODER_LVDS) { + struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; + pll->algo = dig->pll_algo; + } } else { if (encoder->encoder_type != DRM_MODE_ENCODER_DAC) pll->flags |= RADEON_PLL_NO_ODD_POST_DIV; @@ -541,9 +503,8 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, int index; index = GetIndexIntoMasterTable(COMMAND, AdjustDisplayPll); - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, - &crev)) - return adjusted_clock; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, + &crev); memset(&args, 0, sizeof(args)); @@ -581,16 +542,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, } } else if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { /* may want to enable SS on DP/eDP eventually */ - /*args.v3.sInput.ucDispPllConfig |= - DISPPLL_CONFIG_SS_ENABLE;*/ - if (encoder_mode == ATOM_ENCODER_MODE_DP) + args.v3.sInput.ucDispPllConfig |= + DISPPLL_CONFIG_SS_ENABLE; + if (mode->clock > 165000) args.v3.sInput.ucDispPllConfig |= - DISPPLL_CONFIG_COHERENT_MODE; - else { - if (mode->clock > 165000) - args.v3.sInput.ucDispPllConfig |= - DISPPLL_CONFIG_DUAL_LINK; - } + DISPPLL_CONFIG_DUAL_LINK; } atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); @@ -636,9 +592,8 @@ static void atombios_crtc_set_dcpll(struct drm_crtc *crtc) memset(&args, 0, sizeof(args)); index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, - &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, + &crev); switch (frev) { case 1: @@ -712,9 +667,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode &ref_div, &post_div); index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, - &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, + &crev); switch (frev) { case 1: @@ -1129,12 +1083,15 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc, /* TODO color tiling */ - atombios_disable_ss(crtc); + /* pick pll */ + radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); + + atombios_set_ss(crtc, 0); /* always set DCPLL */ if (ASIC_IS_DCE4(rdev)) atombios_crtc_set_dcpll(crtc); atombios_crtc_set_pll(crtc, adjusted_mode); - atombios_enable_ss(crtc); + atombios_set_ss(crtc, 1); if (ASIC_IS_DCE4(rdev)) atombios_set_crtc_dtd_timing(crtc, adjusted_mode); @@ -1163,11 +1120,6 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, static void atombios_crtc_prepare(struct drm_crtc *crtc) { - struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); - - /* pick pll */ - radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); - atombios_lock_crtc(crtc, ATOM_ENABLE); atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); } diff --git a/trunk/drivers/gpu/drm/radeon/atombios_dp.c b/trunk/drivers/gpu/drm/radeon/atombios_dp.c index 28b31c64f48d..8a133bda00a2 100644 --- a/trunk/drivers/gpu/drm/radeon/atombios_dp.c +++ b/trunk/drivers/gpu/drm/radeon/atombios_dp.c @@ -745,14 +745,14 @@ void dp_link_train(struct drm_encoder *encoder, >> DP_TRAIN_PRE_EMPHASIS_SHIFT); /* disable the training pattern on the sink */ - dp_set_training(radeon_connector, DP_TRAINING_PATTERN_DISABLE); - - /* disable the training pattern on the source */ if (ASIC_IS_DCE4(rdev)) atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE); else radeon_dp_encoder_service(rdev, ATOM_DP_ACTION_TRAINING_COMPLETE, dig_connector->dp_clock, enc_id, 0); + + radeon_dp_encoder_service(rdev, ATOM_DP_ACTION_TRAINING_COMPLETE, + dig_connector->dp_clock, enc_id, 0); } int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, diff --git a/trunk/drivers/gpu/drm/radeon/evergreen.c b/trunk/drivers/gpu/drm/radeon/evergreen.c index e8f447e20507..bd2e7aa85c1d 100644 --- a/trunk/drivers/gpu/drm/radeon/evergreen.c +++ b/trunk/drivers/gpu/drm/radeon/evergreen.c @@ -23,10 +23,8 @@ */ #include #include -#include #include "drmP.h" #include "radeon.h" -#include "radeon_asic.h" #include "radeon_drm.h" #include "rv770d.h" #include "atom.h" @@ -438,6 +436,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev) int evergreen_mc_init(struct radeon_device *rdev) { + fixed20_12 a; u32 tmp; int chansize, numchan; @@ -482,8 +481,12 @@ int evergreen_mc_init(struct radeon_device *rdev) rdev->mc.real_vram_size = rdev->mc.aper_size; } r600_vram_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); - + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); return 0; } @@ -743,7 +746,6 @@ int evergreen_init(struct radeon_device *rdev) void evergreen_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); evergreen_suspend(rdev); #if 0 r600_blit_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/r100.c b/trunk/drivers/gpu/drm/radeon/r100.c index c9580497ede4..91eb762eb3f9 100644 --- a/trunk/drivers/gpu/drm/radeon/r100.c +++ b/trunk/drivers/gpu/drm/radeon/r100.c @@ -26,13 +26,11 @@ * Jerome Glisse */ #include -#include #include "drmP.h" #include "drm.h" #include "radeon_drm.h" #include "radeon_reg.h" #include "radeon.h" -#include "radeon_asic.h" #include "r100d.h" #include "rs100d.h" #include "rv200d.h" @@ -237,9 +235,9 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) void r100_pci_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); r100_pci_gart_disable(rdev); radeon_gart_table_ram_free(rdev); + radeon_gart_fini(rdev); } int r100_irq_set(struct radeon_device *rdev) @@ -314,12 +312,10 @@ int r100_irq_process(struct radeon_device *rdev) /* Vertical blank interrupts */ if (status & RADEON_CRTC_VBLANK_STAT) { drm_handle_vblank(rdev->ddev, 0); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); } if (status & RADEON_CRTC2_VBLANK_STAT) { drm_handle_vblank(rdev->ddev, 1); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); } if (status & RADEON_FP_DETECT_STAT) { @@ -745,8 +741,6 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size) udelay(10); rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR); rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR); - /* protect against crazy HW on resume */ - rdev->cp.wptr &= rdev->cp.ptr_mask; /* Set cp mode to bus mastering & enable cp*/ WREG32(RADEON_CP_CSQ_MODE, REG_SET(RADEON_INDIRECT2_START, indirect2_start) | @@ -1810,7 +1804,6 @@ void r100_set_common_regs(struct radeon_device *rdev) { struct drm_device *dev = rdev->ddev; bool force_dac2 = false; - u32 tmp; /* set these so they don't interfere with anything */ WREG32(RADEON_OV0_SCALE_CNTL, 0); @@ -1882,12 +1875,6 @@ void r100_set_common_regs(struct radeon_device *rdev) WREG32(RADEON_DISP_HW_DEBUG, disp_hw_debug); WREG32(RADEON_DAC_CNTL2, dac2_cntl); } - - /* switch PM block to ACPI mode */ - tmp = RREG32_PLL(RADEON_PLL_PWRMGT_CNTL); - tmp &= ~RADEON_PM_MODE_SEL; - WREG32_PLL(RADEON_PLL_PWRMGT_CNTL, tmp); - } /* @@ -2035,7 +2022,6 @@ void r100_mc_init(struct radeon_device *rdev) radeon_vram_location(rdev, &rdev->mc, base); if (!(rdev->flags & RADEON_IS_AGP)) radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); } @@ -2399,8 +2385,6 @@ void r100_bandwidth_update(struct radeon_device *rdev) uint32_t pixel_bytes1 = 0; uint32_t pixel_bytes2 = 0; - radeon_update_display_priority(rdev); - if (rdev->mode_info.crtcs[0]->base.enabled) { mode1 = &rdev->mode_info.crtcs[0]->base.mode; pixel_bytes1 = rdev->mode_info.crtcs[0]->base.fb->bits_per_pixel / 8; @@ -2429,8 +2413,11 @@ void r100_bandwidth_update(struct radeon_device *rdev) /* * determine is there is enough bw for current mode */ - sclk_ff = rdev->pm.sclk; - mclk_ff = rdev->pm.mclk; + mclk_ff.full = rfixed_const(rdev->clock.default_mclk); + temp_ff.full = rfixed_const(100); + mclk_ff.full = rfixed_div(mclk_ff, temp_ff); + sclk_ff.full = rfixed_const(rdev->clock.default_sclk); + sclk_ff.full = rfixed_div(sclk_ff, temp_ff); temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1); temp_ff.full = rfixed_const(temp); @@ -3453,7 +3440,6 @@ int r100_suspend(struct radeon_device *rdev) void r100_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/r200.c b/trunk/drivers/gpu/drm/radeon/r200.c index 85617c311212..1146c9909c2c 100644 --- a/trunk/drivers/gpu/drm/radeon/r200.c +++ b/trunk/drivers/gpu/drm/radeon/r200.c @@ -30,7 +30,6 @@ #include "radeon_drm.h" #include "radeon_reg.h" #include "radeon.h" -#include "radeon_asic.h" #include "r100d.h" #include "r200_reg_safe.h" diff --git a/trunk/drivers/gpu/drm/radeon/r300.c b/trunk/drivers/gpu/drm/radeon/r300.c index 561048a7c0a4..4cef90cd74e5 100644 --- a/trunk/drivers/gpu/drm/radeon/r300.c +++ b/trunk/drivers/gpu/drm/radeon/r300.c @@ -26,12 +26,10 @@ * Jerome Glisse */ #include -#include #include "drmP.h" #include "drm.h" #include "radeon_reg.h" #include "radeon.h" -#include "radeon_asic.h" #include "radeon_drm.h" #include "r100_track.h" #include "r300d.h" @@ -166,9 +164,9 @@ void rv370_pcie_gart_disable(struct radeon_device *rdev) void rv370_pcie_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); rv370_pcie_gart_disable(rdev); radeon_gart_table_vram_free(rdev); + radeon_gart_fini(rdev); } void r300_fence_ring_emit(struct radeon_device *rdev, @@ -483,7 +481,6 @@ void r300_mc_init(struct radeon_device *rdev) radeon_vram_location(rdev, &rdev->mc, base); if (!(rdev->flags & RADEON_IS_AGP)) radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); } void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes) @@ -1337,7 +1334,6 @@ int r300_suspend(struct radeon_device *rdev) void r300_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/r420.c b/trunk/drivers/gpu/drm/radeon/r420.c index 3dc968c9f5a4..c7593b8f58ee 100644 --- a/trunk/drivers/gpu/drm/radeon/r420.c +++ b/trunk/drivers/gpu/drm/radeon/r420.c @@ -26,11 +26,9 @@ * Jerome Glisse */ #include -#include #include "drmP.h" #include "radeon_reg.h" #include "radeon.h" -#include "radeon_asic.h" #include "atom.h" #include "r100d.h" #include "r420d.h" @@ -268,7 +266,6 @@ int r420_suspend(struct radeon_device *rdev) void r420_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/r520.c b/trunk/drivers/gpu/drm/radeon/r520.c index 3c44b8d39318..2b8a5dd13516 100644 --- a/trunk/drivers/gpu/drm/radeon/r520.c +++ b/trunk/drivers/gpu/drm/radeon/r520.c @@ -27,7 +27,6 @@ */ #include "drmP.h" #include "radeon.h" -#include "radeon_asic.h" #include "atom.h" #include "r520d.h" @@ -122,13 +121,19 @@ static void r520_vram_get_type(struct radeon_device *rdev) void r520_mc_init(struct radeon_device *rdev) { + fixed20_12 a; r520_vram_get_type(rdev); r100_vram_init_sizes(rdev); radeon_vram_location(rdev, &rdev->mc, 0); if (!(rdev->flags & RADEON_IS_AGP)) radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); } void r520_mc_program(struct radeon_device *rdev) diff --git a/trunk/drivers/gpu/drm/radeon/r600.c b/trunk/drivers/gpu/drm/radeon/r600.c index 8f3454e2056a..c52290197292 100644 --- a/trunk/drivers/gpu/drm/radeon/r600.c +++ b/trunk/drivers/gpu/drm/radeon/r600.c @@ -25,14 +25,12 @@ * Alex Deucher * Jerome Glisse */ -#include #include #include #include #include "drmP.h" #include "radeon_drm.h" #include "radeon.h" -#include "radeon_asic.h" #include "radeon_mode.h" #include "r600d.h" #include "atom.h" @@ -493,9 +491,9 @@ void r600_pcie_gart_disable(struct radeon_device *rdev) void r600_pcie_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); r600_pcie_gart_disable(rdev); radeon_gart_table_vram_free(rdev); + radeon_gart_fini(rdev); } void r600_agp_enable(struct radeon_device *rdev) @@ -677,6 +675,7 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) int r600_mc_init(struct radeon_device *rdev) { + fixed20_12 a; u32 tmp; int chansize, numchan; @@ -720,10 +719,14 @@ int r600_mc_init(struct radeon_device *rdev) rdev->mc.real_vram_size = rdev->mc.aper_size; } r600_vram_gtt_location(rdev, &rdev->mc); - + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); if (rdev->flags & RADEON_IS_IGP) rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); - radeon_update_bandwidth_info(rdev); return 0; } @@ -1129,7 +1132,6 @@ void r600_gpu_init(struct radeon_device *rdev) /* Setup pipes */ WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); - WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); tmp = R6XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); WREG32(VGT_OUT_DEALLOC_CNTL, (tmp * 4) & DEALLOC_DIST_MASK); @@ -2117,7 +2119,6 @@ int r600_init(struct radeon_device *rdev) void r600_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r600_audio_fini(rdev); r600_blit_fini(rdev); r600_cp_fini(rdev); @@ -2397,19 +2398,19 @@ static void r600_disable_interrupt_state(struct radeon_device *rdev) WREG32(DC_HPD4_INT_CONTROL, tmp); if (ASIC_IS_DCE32(rdev)) { tmp = RREG32(DC_HPD5_INT_CONTROL) & DC_HPDx_INT_POLARITY; - WREG32(DC_HPD5_INT_CONTROL, tmp); + WREG32(DC_HPD5_INT_CONTROL, 0); tmp = RREG32(DC_HPD6_INT_CONTROL) & DC_HPDx_INT_POLARITY; - WREG32(DC_HPD6_INT_CONTROL, tmp); + WREG32(DC_HPD6_INT_CONTROL, 0); } } else { WREG32(DACA_AUTODETECT_INT_CONTROL, 0); WREG32(DACB_AUTODETECT_INT_CONTROL, 0); tmp = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; - WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, tmp); + WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, 0); tmp = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; - WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, tmp); + WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, 0); tmp = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; - WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, tmp); + WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, 0); } } @@ -2764,7 +2765,6 @@ int r600_irq_process(struct radeon_device *rdev) case 0: /* D1 vblank */ if (disp_int & LB_D1_VBLANK_INTERRUPT) { drm_handle_vblank(rdev->ddev, 0); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); disp_int &= ~LB_D1_VBLANK_INTERRUPT; DRM_DEBUG("IH: D1 vblank\n"); @@ -2786,7 +2786,6 @@ int r600_irq_process(struct radeon_device *rdev) case 0: /* D2 vblank */ if (disp_int & LB_D2_VBLANK_INTERRUPT) { drm_handle_vblank(rdev->ddev, 1); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); disp_int &= ~LB_D2_VBLANK_INTERRUPT; DRM_DEBUG("IH: D2 vblank\n"); @@ -2835,14 +2834,14 @@ int r600_irq_process(struct radeon_device *rdev) break; case 10: if (disp_int_cont2 & DC_HPD5_INTERRUPT) { - disp_int_cont2 &= ~DC_HPD5_INTERRUPT; + disp_int_cont &= ~DC_HPD5_INTERRUPT; queue_hotplug = true; DRM_DEBUG("IH: HPD5\n"); } break; case 12: if (disp_int_cont2 & DC_HPD6_INTERRUPT) { - disp_int_cont2 &= ~DC_HPD6_INTERRUPT; + disp_int_cont &= ~DC_HPD6_INTERRUPT; queue_hotplug = true; DRM_DEBUG("IH: HPD6\n"); } diff --git a/trunk/drivers/gpu/drm/radeon/r600_audio.c b/trunk/drivers/gpu/drm/radeon/r600_audio.c index dac7042b797e..db928016d034 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_audio.c +++ b/trunk/drivers/gpu/drm/radeon/r600_audio.c @@ -181,6 +181,41 @@ int r600_audio_init(struct radeon_device *rdev) return 0; } +/* + * determin how the encoders and audio interface is wired together + */ +int r600_audio_tmds_index(struct drm_encoder *encoder) +{ + struct drm_device *dev = encoder->dev; + struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); + struct drm_encoder *other; + + switch (radeon_encoder->encoder_id) { + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: + return 0; + + case ENCODER_OBJECT_ID_INTERNAL_LVTM1: + /* special case check if an TMDS1 is present */ + list_for_each_entry(other, &dev->mode_config.encoder_list, head) { + if (to_radeon_encoder(other)->encoder_id == + ENCODER_OBJECT_ID_INTERNAL_TMDS1) + return 1; + } + return 0; + + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: + return 1; + + default: + DRM_ERROR("Unsupported encoder type 0x%02X\n", + radeon_encoder->encoder_id); + return -1; + } +} + /* * atach the audio codec to the clock source of the encoder */ @@ -189,7 +224,6 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock) struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; int base_rate = 48000; switch (radeon_encoder->encoder_id) { @@ -197,34 +231,32 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock) case ENCODER_OBJECT_ID_INTERNAL_LVTM1: WREG32_P(R600_AUDIO_TIMING, 0, ~0x301); break; + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: WREG32_P(R600_AUDIO_TIMING, 0x100, ~0x301); break; + default: DRM_ERROR("Unsupported encoder type 0x%02X\n", radeon_encoder->encoder_id); return; } - switch (dig->dig_encoder) { + switch (r600_audio_tmds_index(encoder)) { case 0: - WREG32(R600_AUDIO_PLL1_MUL, base_rate * 50); - WREG32(R600_AUDIO_PLL1_DIV, clock * 100); + WREG32(R600_AUDIO_PLL1_MUL, base_rate*50); + WREG32(R600_AUDIO_PLL1_DIV, clock*100); WREG32(R600_AUDIO_CLK_SRCSEL, 0); break; case 1: - WREG32(R600_AUDIO_PLL2_MUL, base_rate * 50); - WREG32(R600_AUDIO_PLL2_DIV, clock * 100); + WREG32(R600_AUDIO_PLL2_MUL, base_rate*50); + WREG32(R600_AUDIO_PLL2_DIV, clock*100); WREG32(R600_AUDIO_CLK_SRCSEL, 1); break; - default: - dev_err(rdev->dev, "Unsupported DIG on encoder 0x%02X\n", - radeon_encoder->encoder_id); - return; } } diff --git a/trunk/drivers/gpu/drm/radeon/r600_blit_shaders.c b/trunk/drivers/gpu/drm/radeon/r600_blit_shaders.c index 0271b53fa2dd..a112c59f9d82 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_blit_shaders.c +++ b/trunk/drivers/gpu/drm/radeon/r600_blit_shaders.c @@ -1,42 +1,7 @@ -/* - * Copyright 2009 Advanced Micro Devices, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Alex Deucher - */ #include #include -/* - * R6xx+ cards need to use the 3D engine to blit data which requires - * quite a bit of hw state setup. Rather than pull the whole 3D driver - * (which normally generates the 3D state) into the DRM, we opt to use - * statically generated state tables. The regsiter state and shaders - * were hand generated to support blitting functionality. See the 3D - * driver or documentation for descriptions of the registers and - * shader instructions. - */ - const u32 r6xx_default_state[] = { 0xc0002400, diff --git a/trunk/drivers/gpu/drm/radeon/r600_cp.c b/trunk/drivers/gpu/drm/radeon/r600_cp.c index 68e6f4349309..40416c068d9f 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_cp.c +++ b/trunk/drivers/gpu/drm/radeon/r600_cp.c @@ -1548,13 +1548,10 @@ static void r700_gfx_init(struct drm_device *dev, RADEON_WRITE(R600_CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); RADEON_WRITE(R600_CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); - RADEON_WRITE(R600_GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); RADEON_WRITE(R700_CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); RADEON_WRITE(R700_CGTS_SYS_TCC_DISABLE, 0); RADEON_WRITE(R700_CGTS_TCC_DISABLE, 0); - RADEON_WRITE(R700_CGTS_USER_SYS_TCC_DISABLE, 0); - RADEON_WRITE(R700_CGTS_USER_TCC_DISABLE, 0); num_qd_pipes = R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & R600_INACTIVE_QD_PIPES_MASK) >> 8); diff --git a/trunk/drivers/gpu/drm/radeon/r600_cs.c b/trunk/drivers/gpu/drm/radeon/r600_cs.c index c39c1bc13016..cd2c63bce501 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_cs.c +++ b/trunk/drivers/gpu/drm/radeon/r600_cs.c @@ -45,7 +45,6 @@ struct r600_cs_track { u32 nbanks; u32 npipes; /* value we track */ - u32 sq_config; u32 nsamples; u32 cb_color_base_last[8]; struct radeon_bo *cb_color_bo[8]; @@ -142,8 +141,6 @@ static void r600_cs_track_init(struct r600_cs_track *track) { int i; - /* assume DX9 mode */ - track->sq_config = DX9_CONSTS; for (i = 0; i < 8; i++) { track->cb_color_base_last[i] = 0; track->cb_color_size[i] = 0; @@ -718,9 +715,6 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx tmp =radeon_get_ib_value(p, idx); ib[idx] = 0; break; - case SQ_CONFIG: - track->sq_config = radeon_get_ib_value(p, idx); - break; case R_028800_DB_DEPTH_CONTROL: track->db_depth_control = radeon_get_ib_value(p, idx); break; @@ -875,54 +869,6 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx case SQ_PGM_START_VS: case SQ_PGM_START_GS: case SQ_PGM_START_PS: - case SQ_ALU_CONST_CACHE_GS_0: - case SQ_ALU_CONST_CACHE_GS_1: - case SQ_ALU_CONST_CACHE_GS_2: - case SQ_ALU_CONST_CACHE_GS_3: - case SQ_ALU_CONST_CACHE_GS_4: - case SQ_ALU_CONST_CACHE_GS_5: - case SQ_ALU_CONST_CACHE_GS_6: - case SQ_ALU_CONST_CACHE_GS_7: - case SQ_ALU_CONST_CACHE_GS_8: - case SQ_ALU_CONST_CACHE_GS_9: - case SQ_ALU_CONST_CACHE_GS_10: - case SQ_ALU_CONST_CACHE_GS_11: - case SQ_ALU_CONST_CACHE_GS_12: - case SQ_ALU_CONST_CACHE_GS_13: - case SQ_ALU_CONST_CACHE_GS_14: - case SQ_ALU_CONST_CACHE_GS_15: - case SQ_ALU_CONST_CACHE_PS_0: - case SQ_ALU_CONST_CACHE_PS_1: - case SQ_ALU_CONST_CACHE_PS_2: - case SQ_ALU_CONST_CACHE_PS_3: - case SQ_ALU_CONST_CACHE_PS_4: - case SQ_ALU_CONST_CACHE_PS_5: - case SQ_ALU_CONST_CACHE_PS_6: - case SQ_ALU_CONST_CACHE_PS_7: - case SQ_ALU_CONST_CACHE_PS_8: - case SQ_ALU_CONST_CACHE_PS_9: - case SQ_ALU_CONST_CACHE_PS_10: - case SQ_ALU_CONST_CACHE_PS_11: - case SQ_ALU_CONST_CACHE_PS_12: - case SQ_ALU_CONST_CACHE_PS_13: - case SQ_ALU_CONST_CACHE_PS_14: - case SQ_ALU_CONST_CACHE_PS_15: - case SQ_ALU_CONST_CACHE_VS_0: - case SQ_ALU_CONST_CACHE_VS_1: - case SQ_ALU_CONST_CACHE_VS_2: - case SQ_ALU_CONST_CACHE_VS_3: - case SQ_ALU_CONST_CACHE_VS_4: - case SQ_ALU_CONST_CACHE_VS_5: - case SQ_ALU_CONST_CACHE_VS_6: - case SQ_ALU_CONST_CACHE_VS_7: - case SQ_ALU_CONST_CACHE_VS_8: - case SQ_ALU_CONST_CACHE_VS_9: - case SQ_ALU_CONST_CACHE_VS_10: - case SQ_ALU_CONST_CACHE_VS_11: - case SQ_ALU_CONST_CACHE_VS_12: - case SQ_ALU_CONST_CACHE_VS_13: - case SQ_ALU_CONST_CACHE_VS_14: - case SQ_ALU_CONST_CACHE_VS_15: r = r600_cs_packet_next_reloc(p, &reloc); if (r) { dev_warn(p->dev, "bad SET_CONTEXT_REG " @@ -1280,15 +1226,13 @@ static int r600_packet3_check(struct radeon_cs_parser *p, } break; case PACKET3_SET_ALU_CONST: - if (track->sq_config & DX9_CONSTS) { - start_reg = (idx_value << 2) + PACKET3_SET_ALU_CONST_OFFSET; - end_reg = 4 * pkt->count + start_reg - 4; - if ((start_reg < PACKET3_SET_ALU_CONST_OFFSET) || - (start_reg >= PACKET3_SET_ALU_CONST_END) || - (end_reg >= PACKET3_SET_ALU_CONST_END)) { - DRM_ERROR("bad SET_ALU_CONST\n"); - return -EINVAL; - } + start_reg = (idx_value << 2) + PACKET3_SET_ALU_CONST_OFFSET; + end_reg = 4 * pkt->count + start_reg - 4; + if ((start_reg < PACKET3_SET_ALU_CONST_OFFSET) || + (start_reg >= PACKET3_SET_ALU_CONST_END) || + (end_reg >= PACKET3_SET_ALU_CONST_END)) { + DRM_ERROR("bad SET_ALU_CONST\n"); + return -EINVAL; } break; case PACKET3_SET_BOOL_CONST: diff --git a/trunk/drivers/gpu/drm/radeon/r600_hdmi.c b/trunk/drivers/gpu/drm/radeon/r600_hdmi.c index 029fa1406d1d..fcc949df0e5d 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/trunk/drivers/gpu/drm/radeon/r600_hdmi.c @@ -42,13 +42,13 @@ enum r600_hdmi_color_format { */ enum r600_hdmi_iec_status_bits { AUDIO_STATUS_DIG_ENABLE = 0x01, - AUDIO_STATUS_V = 0x02, - AUDIO_STATUS_VCFG = 0x04, + AUDIO_STATUS_V = 0x02, + AUDIO_STATUS_VCFG = 0x04, AUDIO_STATUS_EMPHASIS = 0x08, AUDIO_STATUS_COPYRIGHT = 0x10, AUDIO_STATUS_NONAUDIO = 0x20, AUDIO_STATUS_PROFESSIONAL = 0x40, - AUDIO_STATUS_LEVEL = 0x80 + AUDIO_STATUS_LEVEL = 0x80 }; struct { @@ -85,7 +85,7 @@ struct { static void r600_hdmi_calc_CTS(uint32_t clock, int *CTS, int N, int freq) { if (*CTS == 0) - *CTS = clock * N / (128 * freq) * 1000; + *CTS = clock*N/(128*freq)*1000; DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", N, *CTS, freq); } @@ -131,11 +131,11 @@ static void r600_hdmi_infoframe_checksum(uint8_t packetType, uint8_t length, uint8_t *frame) { - int i; - frame[0] = packetType + versionNumber + length; - for (i = 1; i <= length; i++) - frame[0] += frame[i]; - frame[0] = 0x100 - frame[0]; + int i; + frame[0] = packetType + versionNumber + length; + for (i = 1; i <= length; i++) + frame[0] += frame[i]; + frame[0] = 0x100 - frame[0]; } /* @@ -417,141 +417,90 @@ void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, WREG32_P(offset+R600_HDMI_CNTL, 0x04000000, ~0x04000000); } -static int r600_hdmi_find_free_block(struct drm_device *dev) -{ - struct radeon_device *rdev = dev->dev_private; - struct drm_encoder *encoder; - struct radeon_encoder *radeon_encoder; - bool free_blocks[3] = { true, true, true }; - - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { - radeon_encoder = to_radeon_encoder(encoder); - switch (radeon_encoder->hdmi_offset) { - case R600_HDMI_BLOCK1: - free_blocks[0] = false; - break; - case R600_HDMI_BLOCK2: - free_blocks[1] = false; - break; - case R600_HDMI_BLOCK3: - free_blocks[2] = false; - break; - } - } - - if (rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690) { - return free_blocks[0] ? R600_HDMI_BLOCK1 : 0; - } else if (rdev->family >= CHIP_R600) { - if (free_blocks[0]) - return R600_HDMI_BLOCK1; - else if (free_blocks[1]) - return R600_HDMI_BLOCK2; - } - return 0; -} - -static void r600_hdmi_assign_block(struct drm_encoder *encoder) +/* + * enable/disable the HDMI engine + */ +void r600_hdmi_enable(struct drm_encoder *encoder, int enable) { struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; + uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; - if (!dig) { - dev_err(rdev->dev, "Enabling HDMI on non-dig encoder\n"); + if (!offset) return; - } - if (ASIC_IS_DCE4(rdev)) { - /* TODO */ - } else if (ASIC_IS_DCE3(rdev)) { - radeon_encoder->hdmi_offset = dig->dig_encoder ? - R600_HDMI_BLOCK3 : R600_HDMI_BLOCK1; - if (ASIC_IS_DCE32(rdev)) - radeon_encoder->hdmi_config_offset = dig->dig_encoder ? - R600_HDMI_CONFIG2 : R600_HDMI_CONFIG1; - } else if (rdev->family >= CHIP_R600) { - radeon_encoder->hdmi_offset = r600_hdmi_find_free_block(dev); + DRM_DEBUG("%s HDMI interface @ 0x%04X\n", enable ? "Enabling" : "Disabling", offset); + + /* some version of atombios ignore the enable HDMI flag + * so enabling/disabling HDMI was moved here for TMDS1+2 */ + switch (radeon_encoder->encoder_id) { + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: + WREG32_P(AVIVO_TMDSA_CNTL, enable ? 0x4 : 0x0, ~0x4); + WREG32(offset+R600_HDMI_ENABLE, enable ? 0x101 : 0x0); + break; + + case ENCODER_OBJECT_ID_INTERNAL_LVTM1: + WREG32_P(AVIVO_LVTMA_CNTL, enable ? 0x4 : 0x0, ~0x4); + WREG32(offset+R600_HDMI_ENABLE, enable ? 0x105 : 0x0); + break; + + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: + /* This part is doubtfull in my opinion */ + WREG32(offset+R600_HDMI_ENABLE, enable ? 0x110 : 0x0); + break; + + default: + DRM_ERROR("unknown HDMI output type\n"); + break; } } /* - * enable the HDMI engine + * determin at which register offset the HDMI encoder is */ -void r600_hdmi_enable(struct drm_encoder *encoder) +void r600_hdmi_init(struct drm_encoder *encoder) { - struct drm_device *dev = encoder->dev; - struct radeon_device *rdev = dev->dev_private; struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - if (!radeon_encoder->hdmi_offset) { - r600_hdmi_assign_block(encoder); - if (!radeon_encoder->hdmi_offset) { - dev_warn(rdev->dev, "Could not find HDMI block for " - "0x%x encoder\n", radeon_encoder->encoder_id); - return; - } - } - - if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { - WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0x1, ~0x1); - } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { - int offset = radeon_encoder->hdmi_offset; - switch (radeon_encoder->encoder_id) { - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: - WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4); - WREG32(offset + R600_HDMI_ENABLE, 0x101); + switch (radeon_encoder->encoder_id) { + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: + radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; + break; + + case ENCODER_OBJECT_ID_INTERNAL_LVTM1: + switch (r600_audio_tmds_index(encoder)) { + case 0: + radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; break; - case ENCODER_OBJECT_ID_INTERNAL_LVTM1: - WREG32_P(AVIVO_LVTMA_CNTL, 0x4, ~0x4); - WREG32(offset + R600_HDMI_ENABLE, 0x105); + case 1: + radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; break; default: - dev_err(rdev->dev, "Unknown HDMI output type\n"); + radeon_encoder->hdmi_offset = 0; break; } - } + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: + radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; + break; - DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", - radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); -} + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: + radeon_encoder->hdmi_offset = R600_HDMI_DIG; + break; -/* - * disable the HDMI engine - */ -void r600_hdmi_disable(struct drm_encoder *encoder) -{ - struct drm_device *dev = encoder->dev; - struct radeon_device *rdev = dev->dev_private; - struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - - if (!radeon_encoder->hdmi_offset) { - dev_err(rdev->dev, "Disabling not enabled HDMI\n"); - return; + default: + radeon_encoder->hdmi_offset = 0; + break; } - DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", - radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); - - if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { - WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0, ~0x1); - } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { - int offset = radeon_encoder->hdmi_offset; - switch (radeon_encoder->encoder_id) { - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: - WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4); - WREG32(offset + R600_HDMI_ENABLE, 0); - break; - case ENCODER_OBJECT_ID_INTERNAL_LVTM1: - WREG32_P(AVIVO_LVTMA_CNTL, 0, ~0x4); - WREG32(offset + R600_HDMI_ENABLE, 0); - break; - default: - dev_err(rdev->dev, "Unknown HDMI output type\n"); - break; - } - } + DRM_DEBUG("using HDMI engine at offset 0x%04X for encoder 0x%x\n", + radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); - radeon_encoder->hdmi_offset = 0; - radeon_encoder->hdmi_config_offset = 0; + /* TODO: make this configureable */ + radeon_encoder->hdmi_audio_workaround = 0; } diff --git a/trunk/drivers/gpu/drm/radeon/r600_reg.h b/trunk/drivers/gpu/drm/radeon/r600_reg.h index 7b1d22370f6e..d0e28ffdeda9 100644 --- a/trunk/drivers/gpu/drm/radeon/r600_reg.h +++ b/trunk/drivers/gpu/drm/radeon/r600_reg.h @@ -152,9 +152,9 @@ #define R600_AUDIO_STATUS_BITS 0x73d8 /* HDMI base register addresses */ -#define R600_HDMI_BLOCK1 0x7400 -#define R600_HDMI_BLOCK2 0x7700 -#define R600_HDMI_BLOCK3 0x7800 +#define R600_HDMI_TMDS1 0x7400 +#define R600_HDMI_TMDS2 0x7700 +#define R600_HDMI_DIG 0x7800 /* HDMI registers */ #define R600_HDMI_ENABLE 0x00 @@ -185,8 +185,4 @@ #define R600_HDMI_AUDIO_DEBUG_2 0xe8 #define R600_HDMI_AUDIO_DEBUG_3 0xec -/* HDMI additional config base register addresses */ -#define R600_HDMI_CONFIG1 0x7600 -#define R600_HDMI_CONFIG2 0x7a00 - #endif diff --git a/trunk/drivers/gpu/drm/radeon/r600d.h b/trunk/drivers/gpu/drm/radeon/r600d.h index 59c1f8793e60..5b2e4d442823 100644 --- a/trunk/drivers/gpu/drm/radeon/r600d.h +++ b/trunk/drivers/gpu/drm/radeon/r600d.h @@ -77,55 +77,6 @@ #define CB_COLOR0_FRAG 0x280e0 #define CB_COLOR0_MASK 0x28100 -#define SQ_ALU_CONST_CACHE_PS_0 0x28940 -#define SQ_ALU_CONST_CACHE_PS_1 0x28944 -#define SQ_ALU_CONST_CACHE_PS_2 0x28948 -#define SQ_ALU_CONST_CACHE_PS_3 0x2894c -#define SQ_ALU_CONST_CACHE_PS_4 0x28950 -#define SQ_ALU_CONST_CACHE_PS_5 0x28954 -#define SQ_ALU_CONST_CACHE_PS_6 0x28958 -#define SQ_ALU_CONST_CACHE_PS_7 0x2895c -#define SQ_ALU_CONST_CACHE_PS_8 0x28960 -#define SQ_ALU_CONST_CACHE_PS_9 0x28964 -#define SQ_ALU_CONST_CACHE_PS_10 0x28968 -#define SQ_ALU_CONST_CACHE_PS_11 0x2896c -#define SQ_ALU_CONST_CACHE_PS_12 0x28970 -#define SQ_ALU_CONST_CACHE_PS_13 0x28974 -#define SQ_ALU_CONST_CACHE_PS_14 0x28978 -#define SQ_ALU_CONST_CACHE_PS_15 0x2897c -#define SQ_ALU_CONST_CACHE_VS_0 0x28980 -#define SQ_ALU_CONST_CACHE_VS_1 0x28984 -#define SQ_ALU_CONST_CACHE_VS_2 0x28988 -#define SQ_ALU_CONST_CACHE_VS_3 0x2898c -#define SQ_ALU_CONST_CACHE_VS_4 0x28990 -#define SQ_ALU_CONST_CACHE_VS_5 0x28994 -#define SQ_ALU_CONST_CACHE_VS_6 0x28998 -#define SQ_ALU_CONST_CACHE_VS_7 0x2899c -#define SQ_ALU_CONST_CACHE_VS_8 0x289a0 -#define SQ_ALU_CONST_CACHE_VS_9 0x289a4 -#define SQ_ALU_CONST_CACHE_VS_10 0x289a8 -#define SQ_ALU_CONST_CACHE_VS_11 0x289ac -#define SQ_ALU_CONST_CACHE_VS_12 0x289b0 -#define SQ_ALU_CONST_CACHE_VS_13 0x289b4 -#define SQ_ALU_CONST_CACHE_VS_14 0x289b8 -#define SQ_ALU_CONST_CACHE_VS_15 0x289bc -#define SQ_ALU_CONST_CACHE_GS_0 0x289c0 -#define SQ_ALU_CONST_CACHE_GS_1 0x289c4 -#define SQ_ALU_CONST_CACHE_GS_2 0x289c8 -#define SQ_ALU_CONST_CACHE_GS_3 0x289cc -#define SQ_ALU_CONST_CACHE_GS_4 0x289d0 -#define SQ_ALU_CONST_CACHE_GS_5 0x289d4 -#define SQ_ALU_CONST_CACHE_GS_6 0x289d8 -#define SQ_ALU_CONST_CACHE_GS_7 0x289dc -#define SQ_ALU_CONST_CACHE_GS_8 0x289e0 -#define SQ_ALU_CONST_CACHE_GS_9 0x289e4 -#define SQ_ALU_CONST_CACHE_GS_10 0x289e8 -#define SQ_ALU_CONST_CACHE_GS_11 0x289ec -#define SQ_ALU_CONST_CACHE_GS_12 0x289f0 -#define SQ_ALU_CONST_CACHE_GS_13 0x289f4 -#define SQ_ALU_CONST_CACHE_GS_14 0x289f8 -#define SQ_ALU_CONST_CACHE_GS_15 0x289fc - #define CONFIG_MEMSIZE 0x5428 #define CONFIG_CNTL 0x5424 #define CP_STAT 0x8680 diff --git a/trunk/drivers/gpu/drm/radeon/radeon.h b/trunk/drivers/gpu/drm/radeon/radeon.h index 034218c3dbbb..829e26e8a4bb 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon.h +++ b/trunk/drivers/gpu/drm/radeon/radeon.h @@ -91,8 +91,6 @@ extern int radeon_tv; extern int radeon_new_pll; extern int radeon_dynpm; extern int radeon_audio; -extern int radeon_disp_priority; -extern int radeon_hw_i2c; /* * Copy from radeon_drv.h so we don't have to include both and have conflicting @@ -170,7 +168,6 @@ struct radeon_clock { * Power management */ int radeon_pm_init(struct radeon_device *rdev); -void radeon_pm_fini(struct radeon_device *rdev); void radeon_pm_compute_clocks(struct radeon_device *rdev); void radeon_combios_get_power_modes(struct radeon_device *rdev); void radeon_atombios_get_power_modes(struct radeon_device *rdev); @@ -690,7 +687,6 @@ struct radeon_pm { bool downclocked; int active_crtcs; int req_vblank; - bool vblank_sync; fixed20_12 max_bandwidth; fixed20_12 igp_sideport_mclk; fixed20_12 igp_system_mclk; @@ -701,7 +697,6 @@ struct radeon_pm { fixed20_12 ht_bandwidth; fixed20_12 core_bandwidth; fixed20_12 sclk; - fixed20_12 mclk; fixed20_12 needed_bandwidth; /* XXX: use a define for num power modes */ struct radeon_power_state power_state[8]; @@ -712,7 +707,6 @@ struct radeon_pm { struct radeon_power_state *requested_power_state; struct radeon_pm_clock_info *requested_clock_mode; struct radeon_power_state *default_power_state; - struct radeon_i2c_chan *i2c_bus; }; @@ -735,6 +729,8 @@ int radeon_debugfs_add_files(struct radeon_device *rdev, struct drm_info_list *files, unsigned nfiles); int radeon_debugfs_fence_init(struct radeon_device *rdev); +int r100_debugfs_rbbm_init(struct radeon_device *rdev); +int r100_debugfs_cp_init(struct radeon_device *rdev); /* @@ -786,7 +782,7 @@ struct radeon_asic { int (*set_surface_reg)(struct radeon_device *rdev, int reg, uint32_t tiling_flags, uint32_t pitch, uint32_t offset, uint32_t obj_size); - void (*clear_surface_reg)(struct radeon_device *rdev, int reg); + int (*clear_surface_reg)(struct radeon_device *rdev, int reg); void (*bandwidth_update)(struct radeon_device *rdev); void (*hpd_init)(struct radeon_device *rdev); void (*hpd_fini)(struct radeon_device *rdev); @@ -866,12 +862,6 @@ union radeon_asic_config { struct rv770_asic rv770; }; -/* - * asic initizalization from radeon_asic.c - */ -void radeon_agp_disable(struct radeon_device *rdev); -int radeon_asic_init(struct radeon_device *rdev); - /* * IOCTL. @@ -1182,8 +1172,6 @@ extern void radeon_gart_restore(struct radeon_device *rdev); extern int radeon_modeset_init(struct radeon_device *rdev); extern void radeon_modeset_fini(struct radeon_device *rdev); extern bool radeon_card_posted(struct radeon_device *rdev); -extern void radeon_update_bandwidth_info(struct radeon_device *rdev); -extern void radeon_update_display_priority(struct radeon_device *rdev); extern bool radeon_boot_test_post_card(struct radeon_device *rdev); extern int radeon_clocks_init(struct radeon_device *rdev); extern void radeon_clocks_fini(struct radeon_device *rdev); @@ -1200,6 +1188,51 @@ extern int radeon_resume_kms(struct drm_device *dev); extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ +struct r100_mc_save { + u32 GENMO_WT; + u32 CRTC_EXT_CNTL; + u32 CRTC_GEN_CNTL; + u32 CRTC2_GEN_CNTL; + u32 CUR_OFFSET; + u32 CUR2_OFFSET; +}; +extern void r100_cp_disable(struct radeon_device *rdev); +extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); +extern void r100_cp_fini(struct radeon_device *rdev); +extern void r100_pci_gart_tlb_flush(struct radeon_device *rdev); +extern int r100_pci_gart_init(struct radeon_device *rdev); +extern void r100_pci_gart_fini(struct radeon_device *rdev); +extern int r100_pci_gart_enable(struct radeon_device *rdev); +extern void r100_pci_gart_disable(struct radeon_device *rdev); +extern int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); +extern int r100_debugfs_mc_info_init(struct radeon_device *rdev); +extern int r100_gui_wait_for_idle(struct radeon_device *rdev); +extern void r100_ib_fini(struct radeon_device *rdev); +extern int r100_ib_init(struct radeon_device *rdev); +extern void r100_irq_disable(struct radeon_device *rdev); +extern int r100_irq_set(struct radeon_device *rdev); +extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); +extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); +extern void r100_vram_init_sizes(struct radeon_device *rdev); +extern void r100_wb_disable(struct radeon_device *rdev); +extern void r100_wb_fini(struct radeon_device *rdev); +extern int r100_wb_init(struct radeon_device *rdev); +extern void r100_hdp_reset(struct radeon_device *rdev); +extern int r100_rb2d_reset(struct radeon_device *rdev); +extern int r100_cp_reset(struct radeon_device *rdev); +extern void r100_vga_render_disable(struct radeon_device *rdev); +extern int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p, + struct radeon_cs_packet *pkt, + struct radeon_bo *robj); +extern int r100_cs_parse_packet0(struct radeon_cs_parser *p, + struct radeon_cs_packet *pkt, + const unsigned *auth, unsigned n, + radeon_packet0_check_t check); +extern int r100_cs_packet_parse(struct radeon_cs_parser *p, + struct radeon_cs_packet *pkt, + unsigned idx); +extern void r100_enable_bm(struct radeon_device *rdev); +extern void r100_set_common_regs(struct radeon_device *rdev); /* rv200,rv250,rv280 */ extern void r200_set_safe_registers(struct radeon_device *rdev); @@ -1289,8 +1322,7 @@ extern int r600_audio_tmds_index(struct drm_encoder *encoder); extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock); extern void r600_audio_fini(struct radeon_device *rdev); extern void r600_hdmi_init(struct drm_encoder *encoder); -extern void r600_hdmi_enable(struct drm_encoder *encoder); -extern void r600_hdmi_disable(struct drm_encoder *encoder); +extern void r600_hdmi_enable(struct drm_encoder *encoder, int enable); extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, diff --git a/trunk/drivers/gpu/drm/radeon/radeon_asic.c b/trunk/drivers/gpu/drm/radeon/radeon_asic.c deleted file mode 100644 index a4b4bc9fa322..000000000000 --- a/trunk/drivers/gpu/drm/radeon/radeon_asic.c +++ /dev/null @@ -1,772 +0,0 @@ -/* - * Copyright 2008 Advanced Micro Devices, Inc. - * Copyright 2008 Red Hat Inc. - * Copyright 2009 Jerome Glisse. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: Dave Airlie - * Alex Deucher - * Jerome Glisse - */ - -#include -#include -#include -#include -#include -#include -#include "radeon_reg.h" -#include "radeon.h" -#include "radeon_asic.h" -#include "atom.h" - -/* - * Registers accessors functions. - */ -static uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg) -{ - DRM_ERROR("Invalid callback to read register 0x%04X\n", reg); - BUG_ON(1); - return 0; -} - -static void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) -{ - DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n", - reg, v); - BUG_ON(1); -} - -static void radeon_register_accessor_init(struct radeon_device *rdev) -{ - rdev->mc_rreg = &radeon_invalid_rreg; - rdev->mc_wreg = &radeon_invalid_wreg; - rdev->pll_rreg = &radeon_invalid_rreg; - rdev->pll_wreg = &radeon_invalid_wreg; - rdev->pciep_rreg = &radeon_invalid_rreg; - rdev->pciep_wreg = &radeon_invalid_wreg; - - /* Don't change order as we are overridding accessor. */ - if (rdev->family < CHIP_RV515) { - rdev->pcie_reg_mask = 0xff; - } else { - rdev->pcie_reg_mask = 0x7ff; - } - /* FIXME: not sure here */ - if (rdev->family <= CHIP_R580) { - rdev->pll_rreg = &r100_pll_rreg; - rdev->pll_wreg = &r100_pll_wreg; - } - if (rdev->family >= CHIP_R420) { - rdev->mc_rreg = &r420_mc_rreg; - rdev->mc_wreg = &r420_mc_wreg; - } - if (rdev->family >= CHIP_RV515) { - rdev->mc_rreg = &rv515_mc_rreg; - rdev->mc_wreg = &rv515_mc_wreg; - } - if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { - rdev->mc_rreg = &rs400_mc_rreg; - rdev->mc_wreg = &rs400_mc_wreg; - } - if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { - rdev->mc_rreg = &rs690_mc_rreg; - rdev->mc_wreg = &rs690_mc_wreg; - } - if (rdev->family == CHIP_RS600) { - rdev->mc_rreg = &rs600_mc_rreg; - rdev->mc_wreg = &rs600_mc_wreg; - } - if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) { - rdev->pciep_rreg = &r600_pciep_rreg; - rdev->pciep_wreg = &r600_pciep_wreg; - } -} - - -/* helper to disable agp */ -void radeon_agp_disable(struct radeon_device *rdev) -{ - rdev->flags &= ~RADEON_IS_AGP; - if (rdev->family >= CHIP_R600) { - DRM_INFO("Forcing AGP to PCIE mode\n"); - rdev->flags |= RADEON_IS_PCIE; - } else if (rdev->family >= CHIP_RV515 || - rdev->family == CHIP_RV380 || - rdev->family == CHIP_RV410 || - rdev->family == CHIP_R423) { - DRM_INFO("Forcing AGP to PCIE mode\n"); - rdev->flags |= RADEON_IS_PCIE; - rdev->asic->gart_tlb_flush = &rv370_pcie_gart_tlb_flush; - rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; - } else { - DRM_INFO("Forcing AGP to PCI mode\n"); - rdev->flags |= RADEON_IS_PCI; - rdev->asic->gart_tlb_flush = &r100_pci_gart_tlb_flush; - rdev->asic->gart_set_page = &r100_pci_gart_set_page; - } - rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; -} - -/* - * ASIC - */ -static struct radeon_asic r100_asic = { - .init = &r100_init, - .fini = &r100_fini, - .suspend = &r100_suspend, - .resume = &r100_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r100_gpu_reset, - .gart_tlb_flush = &r100_pci_gart_tlb_flush, - .gart_set_page = &r100_pci_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r100_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r100_fence_ring_emit, - .cs_parse = &r100_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = NULL, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_legacy_get_engine_clock, - .set_engine_clock = &radeon_legacy_set_engine_clock, - .get_memory_clock = &radeon_legacy_get_memory_clock, - .set_memory_clock = NULL, - .get_pcie_lanes = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_legacy_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r200_asic = { - .init = &r100_init, - .fini = &r100_fini, - .suspend = &r100_suspend, - .resume = &r100_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r100_gpu_reset, - .gart_tlb_flush = &r100_pci_gart_tlb_flush, - .gart_set_page = &r100_pci_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r100_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r100_fence_ring_emit, - .cs_parse = &r100_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_legacy_get_engine_clock, - .set_engine_clock = &radeon_legacy_set_engine_clock, - .get_memory_clock = &radeon_legacy_get_memory_clock, - .set_memory_clock = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_legacy_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r300_asic = { - .init = &r300_init, - .fini = &r300_fini, - .suspend = &r300_suspend, - .resume = &r300_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &r100_pci_gart_tlb_flush, - .gart_set_page = &r100_pci_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_legacy_get_engine_clock, - .set_engine_clock = &radeon_legacy_set_engine_clock, - .get_memory_clock = &radeon_legacy_get_memory_clock, - .set_memory_clock = NULL, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = &rv370_set_pcie_lanes, - .set_clock_gating = &radeon_legacy_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r300_asic_pcie = { - .init = &r300_init, - .fini = &r300_fini, - .suspend = &r300_suspend, - .resume = &r300_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, - .gart_set_page = &rv370_pcie_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_legacy_get_engine_clock, - .set_engine_clock = &radeon_legacy_set_engine_clock, - .get_memory_clock = &radeon_legacy_get_memory_clock, - .set_memory_clock = NULL, - .set_pcie_lanes = &rv370_set_pcie_lanes, - .set_clock_gating = &radeon_legacy_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r420_asic = { - .init = &r420_init, - .fini = &r420_fini, - .suspend = &r420_suspend, - .resume = &r420_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, - .gart_set_page = &rv370_pcie_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = &rv370_set_pcie_lanes, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic rs400_asic = { - .init = &rs400_init, - .fini = &rs400_fini, - .suspend = &rs400_suspend, - .resume = &rs400_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &rs400_gart_tlb_flush, - .gart_set_page = &rs400_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &r100_irq_set, - .irq_process = &r100_irq_process, - .get_vblank_counter = &r100_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_legacy_get_engine_clock, - .set_engine_clock = &radeon_legacy_set_engine_clock, - .get_memory_clock = &radeon_legacy_get_memory_clock, - .set_memory_clock = NULL, - .get_pcie_lanes = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_legacy_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &r100_bandwidth_update, - .hpd_init = &r100_hpd_init, - .hpd_fini = &r100_hpd_fini, - .hpd_sense = &r100_hpd_sense, - .hpd_set_polarity = &r100_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic rs600_asic = { - .init = &rs600_init, - .fini = &rs600_fini, - .suspend = &rs600_suspend, - .resume = &rs600_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &rs600_gart_tlb_flush, - .gart_set_page = &rs600_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &rs600_irq_set, - .irq_process = &rs600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &rs600_bandwidth_update, - .hpd_init = &rs600_hpd_init, - .hpd_fini = &rs600_hpd_fini, - .hpd_sense = &rs600_hpd_sense, - .hpd_set_polarity = &rs600_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic rs690_asic = { - .init = &rs690_init, - .fini = &rs690_fini, - .suspend = &rs690_suspend, - .resume = &rs690_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &r300_gpu_reset, - .gart_tlb_flush = &rs400_gart_tlb_flush, - .gart_set_page = &rs400_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &r300_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &rs600_irq_set, - .irq_process = &rs600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r200_copy_dma, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &rs690_bandwidth_update, - .hpd_init = &rs600_hpd_init, - .hpd_fini = &rs600_hpd_fini, - .hpd_sense = &rs600_hpd_sense, - .hpd_set_polarity = &rs600_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic rv515_asic = { - .init = &rv515_init, - .fini = &rv515_fini, - .suspend = &rv515_suspend, - .resume = &rv515_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &rv515_gpu_reset, - .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, - .gart_set_page = &rv370_pcie_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &rv515_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &rs600_irq_set, - .irq_process = &rs600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = &rv370_set_pcie_lanes, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &rv515_bandwidth_update, - .hpd_init = &rs600_hpd_init, - .hpd_fini = &rs600_hpd_fini, - .hpd_sense = &rs600_hpd_sense, - .hpd_set_polarity = &rs600_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r520_asic = { - .init = &r520_init, - .fini = &rv515_fini, - .suspend = &rv515_suspend, - .resume = &r520_resume, - .vga_set_state = &r100_vga_set_state, - .gpu_reset = &rv515_gpu_reset, - .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, - .gart_set_page = &rv370_pcie_gart_set_page, - .cp_commit = &r100_cp_commit, - .ring_start = &rv515_ring_start, - .ring_test = &r100_ring_test, - .ring_ib_execute = &r100_ring_ib_execute, - .irq_set = &rs600_irq_set, - .irq_process = &rs600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r300_fence_ring_emit, - .cs_parse = &r300_cs_parse, - .copy_blit = &r100_copy_blit, - .copy_dma = &r200_copy_dma, - .copy = &r100_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = &rv370_set_pcie_lanes, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r100_set_surface_reg, - .clear_surface_reg = r100_clear_surface_reg, - .bandwidth_update = &rv515_bandwidth_update, - .hpd_init = &rs600_hpd_init, - .hpd_fini = &rs600_hpd_fini, - .hpd_sense = &rs600_hpd_sense, - .hpd_set_polarity = &rs600_hpd_set_polarity, - .ioctl_wait_idle = NULL, -}; - -static struct radeon_asic r600_asic = { - .init = &r600_init, - .fini = &r600_fini, - .suspend = &r600_suspend, - .resume = &r600_resume, - .cp_commit = &r600_cp_commit, - .vga_set_state = &r600_vga_set_state, - .gpu_reset = &r600_gpu_reset, - .gart_tlb_flush = &r600_pcie_gart_tlb_flush, - .gart_set_page = &rs600_gart_set_page, - .ring_test = &r600_ring_test, - .ring_ib_execute = &r600_ring_ib_execute, - .irq_set = &r600_irq_set, - .irq_process = &r600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r600_fence_ring_emit, - .cs_parse = &r600_cs_parse, - .copy_blit = &r600_copy_blit, - .copy_dma = &r600_copy_blit, - .copy = &r600_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = NULL, - .set_clock_gating = NULL, - .set_surface_reg = r600_set_surface_reg, - .clear_surface_reg = r600_clear_surface_reg, - .bandwidth_update = &rv515_bandwidth_update, - .hpd_init = &r600_hpd_init, - .hpd_fini = &r600_hpd_fini, - .hpd_sense = &r600_hpd_sense, - .hpd_set_polarity = &r600_hpd_set_polarity, - .ioctl_wait_idle = r600_ioctl_wait_idle, -}; - -static struct radeon_asic rs780_asic = { - .init = &r600_init, - .fini = &r600_fini, - .suspend = &r600_suspend, - .resume = &r600_resume, - .cp_commit = &r600_cp_commit, - .vga_set_state = &r600_vga_set_state, - .gpu_reset = &r600_gpu_reset, - .gart_tlb_flush = &r600_pcie_gart_tlb_flush, - .gart_set_page = &rs600_gart_set_page, - .ring_test = &r600_ring_test, - .ring_ib_execute = &r600_ring_ib_execute, - .irq_set = &r600_irq_set, - .irq_process = &r600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r600_fence_ring_emit, - .cs_parse = &r600_cs_parse, - .copy_blit = &r600_copy_blit, - .copy_dma = &r600_copy_blit, - .copy = &r600_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = NULL, - .set_memory_clock = NULL, - .get_pcie_lanes = NULL, - .set_pcie_lanes = NULL, - .set_clock_gating = NULL, - .set_surface_reg = r600_set_surface_reg, - .clear_surface_reg = r600_clear_surface_reg, - .bandwidth_update = &rs690_bandwidth_update, - .hpd_init = &r600_hpd_init, - .hpd_fini = &r600_hpd_fini, - .hpd_sense = &r600_hpd_sense, - .hpd_set_polarity = &r600_hpd_set_polarity, - .ioctl_wait_idle = r600_ioctl_wait_idle, -}; - -static struct radeon_asic rv770_asic = { - .init = &rv770_init, - .fini = &rv770_fini, - .suspend = &rv770_suspend, - .resume = &rv770_resume, - .cp_commit = &r600_cp_commit, - .gpu_reset = &rv770_gpu_reset, - .vga_set_state = &r600_vga_set_state, - .gart_tlb_flush = &r600_pcie_gart_tlb_flush, - .gart_set_page = &rs600_gart_set_page, - .ring_test = &r600_ring_test, - .ring_ib_execute = &r600_ring_ib_execute, - .irq_set = &r600_irq_set, - .irq_process = &r600_irq_process, - .get_vblank_counter = &rs600_get_vblank_counter, - .fence_ring_emit = &r600_fence_ring_emit, - .cs_parse = &r600_cs_parse, - .copy_blit = &r600_copy_blit, - .copy_dma = &r600_copy_blit, - .copy = &r600_copy_blit, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .get_pcie_lanes = &rv370_get_pcie_lanes, - .set_pcie_lanes = NULL, - .set_clock_gating = &radeon_atom_set_clock_gating, - .set_surface_reg = r600_set_surface_reg, - .clear_surface_reg = r600_clear_surface_reg, - .bandwidth_update = &rv515_bandwidth_update, - .hpd_init = &r600_hpd_init, - .hpd_fini = &r600_hpd_fini, - .hpd_sense = &r600_hpd_sense, - .hpd_set_polarity = &r600_hpd_set_polarity, - .ioctl_wait_idle = r600_ioctl_wait_idle, -}; - -static struct radeon_asic evergreen_asic = { - .init = &evergreen_init, - .fini = &evergreen_fini, - .suspend = &evergreen_suspend, - .resume = &evergreen_resume, - .cp_commit = NULL, - .gpu_reset = &evergreen_gpu_reset, - .vga_set_state = &r600_vga_set_state, - .gart_tlb_flush = &r600_pcie_gart_tlb_flush, - .gart_set_page = &rs600_gart_set_page, - .ring_test = NULL, - .ring_ib_execute = NULL, - .irq_set = NULL, - .irq_process = NULL, - .get_vblank_counter = NULL, - .fence_ring_emit = NULL, - .cs_parse = NULL, - .copy_blit = NULL, - .copy_dma = NULL, - .copy = NULL, - .get_engine_clock = &radeon_atom_get_engine_clock, - .set_engine_clock = &radeon_atom_set_engine_clock, - .get_memory_clock = &radeon_atom_get_memory_clock, - .set_memory_clock = &radeon_atom_set_memory_clock, - .set_pcie_lanes = NULL, - .set_clock_gating = NULL, - .set_surface_reg = r600_set_surface_reg, - .clear_surface_reg = r600_clear_surface_reg, - .bandwidth_update = &evergreen_bandwidth_update, - .hpd_init = &evergreen_hpd_init, - .hpd_fini = &evergreen_hpd_fini, - .hpd_sense = &evergreen_hpd_sense, - .hpd_set_polarity = &evergreen_hpd_set_polarity, -}; - -int radeon_asic_init(struct radeon_device *rdev) -{ - radeon_register_accessor_init(rdev); - switch (rdev->family) { - case CHIP_R100: - case CHIP_RV100: - case CHIP_RS100: - case CHIP_RV200: - case CHIP_RS200: - rdev->asic = &r100_asic; - break; - case CHIP_R200: - case CHIP_RV250: - case CHIP_RS300: - case CHIP_RV280: - rdev->asic = &r200_asic; - break; - case CHIP_R300: - case CHIP_R350: - case CHIP_RV350: - case CHIP_RV380: - if (rdev->flags & RADEON_IS_PCIE) - rdev->asic = &r300_asic_pcie; - else - rdev->asic = &r300_asic; - break; - case CHIP_R420: - case CHIP_R423: - case CHIP_RV410: - rdev->asic = &r420_asic; - break; - case CHIP_RS400: - case CHIP_RS480: - rdev->asic = &rs400_asic; - break; - case CHIP_RS600: - rdev->asic = &rs600_asic; - break; - case CHIP_RS690: - case CHIP_RS740: - rdev->asic = &rs690_asic; - break; - case CHIP_RV515: - rdev->asic = &rv515_asic; - break; - case CHIP_R520: - case CHIP_RV530: - case CHIP_RV560: - case CHIP_RV570: - case CHIP_R580: - rdev->asic = &r520_asic; - break; - case CHIP_R600: - case CHIP_RV610: - case CHIP_RV630: - case CHIP_RV620: - case CHIP_RV635: - case CHIP_RV670: - rdev->asic = &r600_asic; - break; - case CHIP_RS780: - case CHIP_RS880: - rdev->asic = &rs780_asic; - break; - case CHIP_RV770: - case CHIP_RV730: - case CHIP_RV710: - case CHIP_RV740: - rdev->asic = &rv770_asic; - break; - case CHIP_CEDAR: - case CHIP_REDWOOD: - case CHIP_JUNIPER: - case CHIP_CYPRESS: - case CHIP_HEMLOCK: - rdev->asic = &evergreen_asic; - break; - default: - /* FIXME: not supported yet */ - return -EINVAL; - } - - if (rdev->flags & RADEON_IS_IGP) { - rdev->asic->get_memory_clock = NULL; - rdev->asic->set_memory_clock = NULL; - } - - /* set the number of crtcs */ - if (rdev->flags & RADEON_SINGLE_CRTC) - rdev->num_crtc = 1; - else { - if (ASIC_IS_DCE4(rdev)) - rdev->num_crtc = 6; - else - rdev->num_crtc = 2; - } - - return 0; -} - -/* - * Wrapper around modesetting bits. Move to radeon_clocks.c? - */ -int radeon_clocks_init(struct radeon_device *rdev) -{ - int r; - - r = radeon_static_clocks_init(rdev->ddev); - if (r) { - return r; - } - DRM_INFO("Clocks initialized !\n"); - return 0; -} - -void radeon_clocks_fini(struct radeon_device *rdev) -{ -} diff --git a/trunk/drivers/gpu/drm/radeon/radeon_asic.h b/trunk/drivers/gpu/drm/radeon/radeon_asic.h index a0b8280663d1..d3a157b2bcb7 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_asic.h +++ b/trunk/drivers/gpu/drm/radeon/radeon_asic.h @@ -45,18 +45,10 @@ void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable); /* * r100,rv100,rs100,rv200,rs200 */ -struct r100_mc_save { - u32 GENMO_WT; - u32 CRTC_EXT_CNTL; - u32 CRTC_GEN_CNTL; - u32 CRTC2_GEN_CNTL; - u32 CUR_OFFSET; - u32 CUR2_OFFSET; -}; -int r100_init(struct radeon_device *rdev); -void r100_fini(struct radeon_device *rdev); -int r100_suspend(struct radeon_device *rdev); -int r100_resume(struct radeon_device *rdev); +extern int r100_init(struct radeon_device *rdev); +extern void r100_fini(struct radeon_device *rdev); +extern int r100_suspend(struct radeon_device *rdev); +extern int r100_resume(struct radeon_device *rdev); uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg); void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); void r100_vga_set_state(struct radeon_device *rdev, bool state); @@ -81,7 +73,7 @@ int r100_copy_blit(struct radeon_device *rdev, int r100_set_surface_reg(struct radeon_device *rdev, int reg, uint32_t tiling_flags, uint32_t pitch, uint32_t offset, uint32_t obj_size); -void r100_clear_surface_reg(struct radeon_device *rdev, int reg); +int r100_clear_surface_reg(struct radeon_device *rdev, int reg); void r100_bandwidth_update(struct radeon_device *rdev); void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); int r100_ring_test(struct radeon_device *rdev); @@ -90,42 +82,44 @@ void r100_hpd_fini(struct radeon_device *rdev); bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); void r100_hpd_set_polarity(struct radeon_device *rdev, enum radeon_hpd_id hpd); -int r100_debugfs_rbbm_init(struct radeon_device *rdev); -int r100_debugfs_cp_init(struct radeon_device *rdev); -void r100_cp_disable(struct radeon_device *rdev); -int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); -void r100_cp_fini(struct radeon_device *rdev); -int r100_pci_gart_init(struct radeon_device *rdev); -void r100_pci_gart_fini(struct radeon_device *rdev); -int r100_pci_gart_enable(struct radeon_device *rdev); -void r100_pci_gart_disable(struct radeon_device *rdev); -int r100_debugfs_mc_info_init(struct radeon_device *rdev); -int r100_gui_wait_for_idle(struct radeon_device *rdev); -void r100_ib_fini(struct radeon_device *rdev); -int r100_ib_init(struct radeon_device *rdev); -void r100_irq_disable(struct radeon_device *rdev); -void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); -void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); -void r100_vram_init_sizes(struct radeon_device *rdev); -void r100_wb_disable(struct radeon_device *rdev); -void r100_wb_fini(struct radeon_device *rdev); -int r100_wb_init(struct radeon_device *rdev); -void r100_hdp_reset(struct radeon_device *rdev); -int r100_rb2d_reset(struct radeon_device *rdev); -int r100_cp_reset(struct radeon_device *rdev); -void r100_vga_render_disable(struct radeon_device *rdev); -int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p, - struct radeon_cs_packet *pkt, - struct radeon_bo *robj); -int r100_cs_parse_packet0(struct radeon_cs_parser *p, - struct radeon_cs_packet *pkt, - const unsigned *auth, unsigned n, - radeon_packet0_check_t check); -int r100_cs_packet_parse(struct radeon_cs_parser *p, - struct radeon_cs_packet *pkt, - unsigned idx); -void r100_enable_bm(struct radeon_device *rdev); -void r100_set_common_regs(struct radeon_device *rdev); + +static struct radeon_asic r100_asic = { + .init = &r100_init, + .fini = &r100_fini, + .suspend = &r100_suspend, + .resume = &r100_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r100_gpu_reset, + .gart_tlb_flush = &r100_pci_gart_tlb_flush, + .gart_set_page = &r100_pci_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r100_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r100_fence_ring_emit, + .cs_parse = &r100_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = NULL, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_legacy_get_engine_clock, + .set_engine_clock = &radeon_legacy_set_engine_clock, + .get_memory_clock = &radeon_legacy_get_memory_clock, + .set_memory_clock = NULL, + .get_pcie_lanes = NULL, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_legacy_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; /* * r200,rv250,rs300,rv280 @@ -135,6 +129,43 @@ extern int r200_copy_dma(struct radeon_device *rdev, uint64_t dst_offset, unsigned num_pages, struct radeon_fence *fence); +static struct radeon_asic r200_asic = { + .init = &r100_init, + .fini = &r100_fini, + .suspend = &r100_suspend, + .resume = &r100_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r100_gpu_reset, + .gart_tlb_flush = &r100_pci_gart_tlb_flush, + .gart_set_page = &r100_pci_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r100_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r100_fence_ring_emit, + .cs_parse = &r100_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_legacy_get_engine_clock, + .set_engine_clock = &radeon_legacy_set_engine_clock, + .get_memory_clock = &radeon_legacy_get_memory_clock, + .set_memory_clock = NULL, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_legacy_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * r300,r350,rv350,rv380 @@ -155,6 +186,82 @@ extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); extern int rv370_get_pcie_lanes(struct radeon_device *rdev); +static struct radeon_asic r300_asic = { + .init = &r300_init, + .fini = &r300_fini, + .suspend = &r300_suspend, + .resume = &r300_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &r100_pci_gart_tlb_flush, + .gart_set_page = &r100_pci_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_legacy_get_engine_clock, + .set_engine_clock = &radeon_legacy_set_engine_clock, + .get_memory_clock = &radeon_legacy_get_memory_clock, + .set_memory_clock = NULL, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = &rv370_set_pcie_lanes, + .set_clock_gating = &radeon_legacy_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + + +static struct radeon_asic r300_asic_pcie = { + .init = &r300_init, + .fini = &r300_fini, + .suspend = &r300_suspend, + .resume = &r300_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, + .gart_set_page = &rv370_pcie_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_legacy_get_engine_clock, + .set_engine_clock = &radeon_legacy_set_engine_clock, + .get_memory_clock = &radeon_legacy_get_memory_clock, + .set_memory_clock = NULL, + .set_pcie_lanes = &rv370_set_pcie_lanes, + .set_clock_gating = &radeon_legacy_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * r420,r423,rv410 */ @@ -162,6 +269,44 @@ extern int r420_init(struct radeon_device *rdev); extern void r420_fini(struct radeon_device *rdev); extern int r420_suspend(struct radeon_device *rdev); extern int r420_resume(struct radeon_device *rdev); +static struct radeon_asic r420_asic = { + .init = &r420_init, + .fini = &r420_fini, + .suspend = &r420_suspend, + .resume = &r420_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, + .gart_set_page = &rv370_pcie_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = &rv370_set_pcie_lanes, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * rs400,rs480 @@ -174,6 +319,44 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev); int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); +static struct radeon_asic rs400_asic = { + .init = &rs400_init, + .fini = &rs400_fini, + .suspend = &rs400_suspend, + .resume = &rs400_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &rs400_gart_tlb_flush, + .gart_set_page = &rs400_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &r100_irq_set, + .irq_process = &r100_irq_process, + .get_vblank_counter = &r100_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_legacy_get_engine_clock, + .set_engine_clock = &radeon_legacy_set_engine_clock, + .get_memory_clock = &radeon_legacy_get_memory_clock, + .set_memory_clock = NULL, + .get_pcie_lanes = NULL, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_legacy_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &r100_bandwidth_update, + .hpd_init = &r100_hpd_init, + .hpd_fini = &r100_hpd_fini, + .hpd_sense = &r100_hpd_sense, + .hpd_set_polarity = &r100_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * rs600. @@ -196,6 +379,45 @@ bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); void rs600_hpd_set_polarity(struct radeon_device *rdev, enum radeon_hpd_id hpd); +static struct radeon_asic rs600_asic = { + .init = &rs600_init, + .fini = &rs600_fini, + .suspend = &rs600_suspend, + .resume = &rs600_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &rs600_gart_tlb_flush, + .gart_set_page = &rs600_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &rs600_irq_set, + .irq_process = &rs600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = NULL, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &rs600_bandwidth_update, + .hpd_init = &rs600_hpd_init, + .hpd_fini = &rs600_hpd_fini, + .hpd_sense = &rs600_hpd_sense, + .hpd_set_polarity = &rs600_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + + /* * rs690,rs740 */ @@ -206,6 +428,44 @@ int rs690_suspend(struct radeon_device *rdev); uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); void rs690_bandwidth_update(struct radeon_device *rdev); +static struct radeon_asic rs690_asic = { + .init = &rs690_init, + .fini = &rs690_fini, + .suspend = &rs690_suspend, + .resume = &rs690_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &r300_gpu_reset, + .gart_tlb_flush = &rs400_gart_tlb_flush, + .gart_set_page = &rs400_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &r300_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &rs600_irq_set, + .irq_process = &rs600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r200_copy_dma, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = NULL, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &rs690_bandwidth_update, + .hpd_init = &rs600_hpd_init, + .hpd_fini = &rs600_hpd_fini, + .hpd_sense = &rs600_hpd_sense, + .hpd_set_polarity = &rs600_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * rv515 @@ -221,12 +481,87 @@ void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); void rv515_bandwidth_update(struct radeon_device *rdev); int rv515_resume(struct radeon_device *rdev); int rv515_suspend(struct radeon_device *rdev); +static struct radeon_asic rv515_asic = { + .init = &rv515_init, + .fini = &rv515_fini, + .suspend = &rv515_suspend, + .resume = &rv515_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &rv515_gpu_reset, + .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, + .gart_set_page = &rv370_pcie_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &rv515_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &rs600_irq_set, + .irq_process = &rs600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = &rv370_set_pcie_lanes, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &rv515_bandwidth_update, + .hpd_init = &rs600_hpd_init, + .hpd_fini = &rs600_hpd_fini, + .hpd_sense = &rs600_hpd_sense, + .hpd_set_polarity = &rs600_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; + /* * r520,rv530,rv560,rv570,r580 */ int r520_init(struct radeon_device *rdev); int r520_resume(struct radeon_device *rdev); +static struct radeon_asic r520_asic = { + .init = &r520_init, + .fini = &rv515_fini, + .suspend = &rv515_suspend, + .resume = &r520_resume, + .vga_set_state = &r100_vga_set_state, + .gpu_reset = &rv515_gpu_reset, + .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, + .gart_set_page = &rv370_pcie_gart_set_page, + .cp_commit = &r100_cp_commit, + .ring_start = &rv515_ring_start, + .ring_test = &r100_ring_test, + .ring_ib_execute = &r100_ring_ib_execute, + .irq_set = &rs600_irq_set, + .irq_process = &rs600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r300_fence_ring_emit, + .cs_parse = &r300_cs_parse, + .copy_blit = &r100_copy_blit, + .copy_dma = &r200_copy_dma, + .copy = &r100_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = &rv370_set_pcie_lanes, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r100_set_surface_reg, + .clear_surface_reg = r100_clear_surface_reg, + .bandwidth_update = &rv515_bandwidth_update, + .hpd_init = &rs600_hpd_init, + .hpd_fini = &rs600_hpd_fini, + .hpd_sense = &rs600_hpd_sense, + .hpd_set_polarity = &rs600_hpd_set_polarity, + .ioctl_wait_idle = NULL, +}; /* * r600,rv610,rv630,rv620,rv635,rv670,rs780,rs880 @@ -256,7 +591,7 @@ int r600_gpu_reset(struct radeon_device *rdev); int r600_set_surface_reg(struct radeon_device *rdev, int reg, uint32_t tiling_flags, uint32_t pitch, uint32_t offset, uint32_t obj_size); -void r600_clear_surface_reg(struct radeon_device *rdev, int reg); +int r600_clear_surface_reg(struct radeon_device *rdev, int reg); void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); int r600_ring_test(struct radeon_device *rdev); int r600_copy_blit(struct radeon_device *rdev, @@ -269,6 +604,43 @@ void r600_hpd_set_polarity(struct radeon_device *rdev, enum radeon_hpd_id hpd); extern void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo); +static struct radeon_asic r600_asic = { + .init = &r600_init, + .fini = &r600_fini, + .suspend = &r600_suspend, + .resume = &r600_resume, + .cp_commit = &r600_cp_commit, + .vga_set_state = &r600_vga_set_state, + .gpu_reset = &r600_gpu_reset, + .gart_tlb_flush = &r600_pcie_gart_tlb_flush, + .gart_set_page = &rs600_gart_set_page, + .ring_test = &r600_ring_test, + .ring_ib_execute = &r600_ring_ib_execute, + .irq_set = &r600_irq_set, + .irq_process = &r600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r600_fence_ring_emit, + .cs_parse = &r600_cs_parse, + .copy_blit = &r600_copy_blit, + .copy_dma = &r600_copy_blit, + .copy = &r600_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = NULL, + .set_clock_gating = NULL, + .set_surface_reg = r600_set_surface_reg, + .clear_surface_reg = r600_clear_surface_reg, + .bandwidth_update = &rv515_bandwidth_update, + .hpd_init = &r600_hpd_init, + .hpd_fini = &r600_hpd_fini, + .hpd_sense = &r600_hpd_sense, + .hpd_set_polarity = &r600_hpd_set_polarity, + .ioctl_wait_idle = r600_ioctl_wait_idle, +}; + /* * rv770,rv730,rv710,rv740 */ @@ -278,6 +650,43 @@ int rv770_suspend(struct radeon_device *rdev); int rv770_resume(struct radeon_device *rdev); int rv770_gpu_reset(struct radeon_device *rdev); +static struct radeon_asic rv770_asic = { + .init = &rv770_init, + .fini = &rv770_fini, + .suspend = &rv770_suspend, + .resume = &rv770_resume, + .cp_commit = &r600_cp_commit, + .gpu_reset = &rv770_gpu_reset, + .vga_set_state = &r600_vga_set_state, + .gart_tlb_flush = &r600_pcie_gart_tlb_flush, + .gart_set_page = &rs600_gart_set_page, + .ring_test = &r600_ring_test, + .ring_ib_execute = &r600_ring_ib_execute, + .irq_set = &r600_irq_set, + .irq_process = &r600_irq_process, + .get_vblank_counter = &rs600_get_vblank_counter, + .fence_ring_emit = &r600_fence_ring_emit, + .cs_parse = &r600_cs_parse, + .copy_blit = &r600_copy_blit, + .copy_dma = &r600_copy_blit, + .copy = &r600_copy_blit, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .get_pcie_lanes = &rv370_get_pcie_lanes, + .set_pcie_lanes = NULL, + .set_clock_gating = &radeon_atom_set_clock_gating, + .set_surface_reg = r600_set_surface_reg, + .clear_surface_reg = r600_clear_surface_reg, + .bandwidth_update = &rv515_bandwidth_update, + .hpd_init = &r600_hpd_init, + .hpd_fini = &r600_hpd_fini, + .hpd_sense = &r600_hpd_sense, + .hpd_set_polarity = &r600_hpd_set_polarity, + .ioctl_wait_idle = r600_ioctl_wait_idle, +}; + /* * evergreen */ @@ -292,4 +701,40 @@ void evergreen_hpd_fini(struct radeon_device *rdev); bool evergreen_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); void evergreen_hpd_set_polarity(struct radeon_device *rdev, enum radeon_hpd_id hpd); + +static struct radeon_asic evergreen_asic = { + .init = &evergreen_init, + .fini = &evergreen_fini, + .suspend = &evergreen_suspend, + .resume = &evergreen_resume, + .cp_commit = NULL, + .gpu_reset = &evergreen_gpu_reset, + .vga_set_state = &r600_vga_set_state, + .gart_tlb_flush = &r600_pcie_gart_tlb_flush, + .gart_set_page = &rs600_gart_set_page, + .ring_test = NULL, + .ring_ib_execute = NULL, + .irq_set = NULL, + .irq_process = NULL, + .get_vblank_counter = NULL, + .fence_ring_emit = NULL, + .cs_parse = NULL, + .copy_blit = NULL, + .copy_dma = NULL, + .copy = NULL, + .get_engine_clock = &radeon_atom_get_engine_clock, + .set_engine_clock = &radeon_atom_set_engine_clock, + .get_memory_clock = &radeon_atom_get_memory_clock, + .set_memory_clock = &radeon_atom_set_memory_clock, + .set_pcie_lanes = NULL, + .set_clock_gating = NULL, + .set_surface_reg = r600_set_surface_reg, + .clear_surface_reg = r600_clear_surface_reg, + .bandwidth_update = &evergreen_bandwidth_update, + .hpd_init = &evergreen_hpd_init, + .hpd_fini = &evergreen_hpd_fini, + .hpd_sense = &evergreen_hpd_sense, + .hpd_set_polarity = &evergreen_hpd_set_polarity, +}; + #endif diff --git a/trunk/drivers/gpu/drm/radeon/radeon_atombios.c b/trunk/drivers/gpu/drm/radeon/radeon_atombios.c index 1fff95505cf5..93783b15c81d 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_atombios.c @@ -75,45 +75,46 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_i2c_gpio(struct radeon_dev memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec)); i2c.valid = false; - if (atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) { - i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset); - - for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) { - gpio = &i2c_info->asGPIO_Info[i]; - - if (gpio->sucI2cId.ucAccess == id) { - i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4; - i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4; - i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4; - i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4; - i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4; - i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4; - i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4; - i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4; - i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift); - i2c.mask_data_mask = (1 << gpio->ucDataMaskShift); - i2c.en_clk_mask = (1 << gpio->ucClkEnShift); - i2c.en_data_mask = (1 << gpio->ucDataEnShift); - i2c.y_clk_mask = (1 << gpio->ucClkY_Shift); - i2c.y_data_mask = (1 << gpio->ucDataY_Shift); - i2c.a_clk_mask = (1 << gpio->ucClkA_Shift); - i2c.a_data_mask = (1 << gpio->ucDataA_Shift); - - if (gpio->sucI2cId.sbfAccess.bfHW_Capable) - i2c.hw_capable = true; - else - i2c.hw_capable = false; - - if (gpio->sucI2cId.ucAccess == 0xa0) - i2c.mm_i2c = true; - else - i2c.mm_i2c = false; - - i2c.i2c_id = gpio->sucI2cId.ucAccess; - - i2c.valid = true; - break; - } + atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset); + + i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset); + + + for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) { + gpio = &i2c_info->asGPIO_Info[i]; + + if (gpio->sucI2cId.ucAccess == id) { + i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4; + i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4; + i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4; + i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4; + i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4; + i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4; + i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4; + i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4; + i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift); + i2c.mask_data_mask = (1 << gpio->ucDataMaskShift); + i2c.en_clk_mask = (1 << gpio->ucClkEnShift); + i2c.en_data_mask = (1 << gpio->ucDataEnShift); + i2c.y_clk_mask = (1 << gpio->ucClkY_Shift); + i2c.y_data_mask = (1 << gpio->ucDataY_Shift); + i2c.a_clk_mask = (1 << gpio->ucClkA_Shift); + i2c.a_data_mask = (1 << gpio->ucDataA_Shift); + + if (gpio->sucI2cId.sbfAccess.bfHW_Capable) + i2c.hw_capable = true; + else + i2c.hw_capable = false; + + if (gpio->sucI2cId.ucAccess == 0xa0) + i2c.mm_i2c = true; + else + i2c.mm_i2c = false; + + i2c.i2c_id = gpio->sucI2cId.ucAccess; + + i2c.valid = true; + break; } } @@ -134,21 +135,20 @@ static inline struct radeon_gpio_rec radeon_lookup_gpio(struct radeon_device *rd memset(&gpio, 0, sizeof(struct radeon_gpio_rec)); gpio.valid = false; - if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) { - gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset); + atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset); - num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / - sizeof(ATOM_GPIO_PIN_ASSIGNMENT); + gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset); - for (i = 0; i < num_indices; i++) { - pin = &gpio_info->asGPIO_Pin[i]; - if (id == pin->ucGPIO_ID) { - gpio.id = pin->ucGPIO_ID; - gpio.reg = pin->usGpioPin_AIndex * 4; - gpio.mask = (1 << pin->ucGpioPinBitShift); - gpio.valid = true; - break; - } + num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / sizeof(ATOM_GPIO_PIN_ASSIGNMENT); + + for (i = 0; i < num_indices; i++) { + pin = &gpio_info->asGPIO_Pin[i]; + if (id == pin->ucGPIO_ID) { + gpio.id = pin->ucGPIO_ID; + gpio.reg = pin->usGpioPin_AIndex * 4; + gpio.mask = (1 << pin->ucGpioPinBitShift); + gpio.valid = true; + break; } } @@ -264,8 +264,6 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, if ((supported_device == ATOM_DEVICE_CRT1_SUPPORT) || (supported_device == ATOM_DEVICE_DFP2_SUPPORT)) return false; - if (supported_device == ATOM_DEVICE_CRT2_SUPPORT) - *line_mux = 0x90; } /* ASUS HD 3600 XT board lists the DVI port as HDMI */ @@ -397,7 +395,9 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) struct radeon_gpio_rec gpio; struct radeon_hpd hpd; - if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) + atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); + + if (data_offset == 0) return false; if (crev < 2) @@ -449,43 +449,37 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) GetIndexIntoMasterTable(DATA, IntegratedSystemInfo); - if (atom_parse_data_header(ctx, index, &size, &frev, - &crev, &igp_offset)) { - - if (crev >= 2) { - igp_obj = - (ATOM_INTEGRATED_SYSTEM_INFO_V2 - *) (ctx->bios + igp_offset); - - if (igp_obj) { - uint32_t slot_config, ct; - - if (con_obj_num == 1) - slot_config = - igp_obj-> - ulDDISlot1Config; - else - slot_config = - igp_obj-> - ulDDISlot2Config; - - ct = (slot_config >> 16) & 0xff; - connector_type = - object_connector_convert - [ct]; - connector_object_id = ct; - igp_lane_info = - slot_config & 0xffff; - } else - continue; + atom_parse_data_header(ctx, index, &size, &frev, + &crev, &igp_offset); + + if (crev >= 2) { + igp_obj = + (ATOM_INTEGRATED_SYSTEM_INFO_V2 + *) (ctx->bios + igp_offset); + + if (igp_obj) { + uint32_t slot_config, ct; + + if (con_obj_num == 1) + slot_config = + igp_obj-> + ulDDISlot1Config; + else + slot_config = + igp_obj-> + ulDDISlot2Config; + + ct = (slot_config >> 16) & 0xff; + connector_type = + object_connector_convert + [ct]; + connector_object_id = ct; + igp_lane_info = + slot_config & 0xffff; } else continue; - } else { - igp_lane_info = 0; - connector_type = - object_connector_convert[con_obj_id]; - connector_object_id = con_obj_id; - } + } else + continue; } else { igp_lane_info = 0; connector_type = @@ -633,23 +627,20 @@ static uint16_t atombios_get_connector_object_id(struct drm_device *dev, uint8_t frev, crev; ATOM_XTMDS_INFO *xtmds; - if (atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) { - xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset); + atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); + xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset); - if (xtmds->ucSupportedLink & ATOM_XTMDS_SUPPORTED_DUALLINK) { - if (connector_type == DRM_MODE_CONNECTOR_DVII) - return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I; - else - return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D; - } else { - if (connector_type == DRM_MODE_CONNECTOR_DVII) - return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I; - else - return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D; - } - } else - return supported_devices_connector_object_id_convert - [connector_type]; + if (xtmds->ucSupportedLink & ATOM_XTMDS_SUPPORTED_DUALLINK) { + if (connector_type == DRM_MODE_CONNECTOR_DVII) + return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I; + else + return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D; + } else { + if (connector_type == DRM_MODE_CONNECTOR_DVII) + return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I; + else + return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D; + } } else { return supported_devices_connector_object_id_convert [connector_type]; @@ -681,8 +672,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct int i, j, max_device; struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE]; - if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) - return false; + atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); supported_devices = (union atom_supported_devices *)(ctx->bios + data_offset); @@ -875,11 +865,14 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) struct radeon_pll *mpll = &rdev->clock.mpll; uint16_t data_offset; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - firmware_info = - (union firmware_info *)(mode_info->atom_context->bios + - data_offset); + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, + &crev, &data_offset); + + firmware_info = + (union firmware_info *)(mode_info->atom_context->bios + + data_offset); + + if (firmware_info) { /* pixel clocks */ p1pll->reference_freq = le16_to_cpu(firmware_info->info.usReferenceClock); @@ -894,20 +887,6 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) p1pll->pll_out_max = le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output); - if (crev >= 4) { - p1pll->lcd_pll_out_min = - le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100; - if (p1pll->lcd_pll_out_min == 0) - p1pll->lcd_pll_out_min = p1pll->pll_out_min; - p1pll->lcd_pll_out_max = - le16_to_cpu(firmware_info->info_14.usLcdMaxPixelClockPLL_Output) * 100; - if (p1pll->lcd_pll_out_max == 0) - p1pll->lcd_pll_out_max = p1pll->pll_out_max; - } else { - p1pll->lcd_pll_out_min = p1pll->pll_out_min; - p1pll->lcd_pll_out_max = p1pll->pll_out_max; - } - if (p1pll->pll_out_min == 0) { if (ASIC_IS_AVIVO(rdev)) p1pll->pll_out_min = 64800; @@ -1013,10 +992,13 @@ bool radeon_atombios_sideport_present(struct radeon_device *rdev) u8 frev, crev; u16 data_offset; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - igp_info = (union igp_info *)(mode_info->atom_context->bios + + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, + &crev, &data_offset); + + igp_info = (union igp_info *)(mode_info->atom_context->bios + data_offset); + + if (igp_info) { switch (crev) { case 1: if (igp_info->info.ucMemoryType & 0xf0) @@ -1047,12 +1029,14 @@ bool radeon_atombios_get_tmds_info(struct radeon_encoder *encoder, uint16_t maxfreq; int i; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - tmds_info = - (struct _ATOM_TMDS_INFO *)(mode_info->atom_context->bios + - data_offset); + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, + &crev, &data_offset); + + tmds_info = + (struct _ATOM_TMDS_INFO *)(mode_info->atom_context->bios + + data_offset); + if (tmds_info) { maxfreq = le16_to_cpu(tmds_info->usMaxFrequency); for (i = 0; i < 4; i++) { tmds->tmds_pll[i].freq = @@ -1101,11 +1085,13 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct if (id > ATOM_MAX_SS_ENTRY) return NULL; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - ss_info = - (struct _ATOM_SPREAD_SPECTRUM_INFO *)(mode_info->atom_context->bios + data_offset); + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, + &crev, &data_offset); + ss_info = + (struct _ATOM_SPREAD_SPECTRUM_INFO *)(mode_info->atom_context->bios + data_offset); + + if (ss_info) { ss = kzalloc(sizeof(struct radeon_atom_ss), GFP_KERNEL); @@ -1128,6 +1114,30 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct return ss; } +static void radeon_atom_apply_lvds_quirks(struct drm_device *dev, + struct radeon_encoder_atom_dig *lvds) +{ + + /* Toshiba A300-1BU laptop panel doesn't like new pll divider algo */ + if ((dev->pdev->device == 0x95c4) && + (dev->pdev->subsystem_vendor == 0x1179) && + (dev->pdev->subsystem_device == 0xff50)) { + if ((lvds->native_mode.hdisplay == 1280) && + (lvds->native_mode.vdisplay == 800)) + lvds->pll_algo = PLL_ALGO_LEGACY; + } + + /* Dell Studio 15 laptop panel doesn't like new pll divider algo */ + if ((dev->pdev->device == 0x95c4) && + (dev->pdev->subsystem_vendor == 0x1028) && + (dev->pdev->subsystem_device == 0x029f)) { + if ((lvds->native_mode.hdisplay == 1280) && + (lvds->native_mode.vdisplay == 800)) + lvds->pll_algo = PLL_ALGO_LEGACY; + } + +} + union lvds_info { struct _ATOM_LVDS_INFO info; struct _ATOM_LVDS_INFO_V12 info_12; @@ -1146,10 +1156,13 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct uint8_t frev, crev; struct radeon_encoder_atom_dig *lvds = NULL; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - lvds_info = - (union lvds_info *)(mode_info->atom_context->bios + data_offset); + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, + &crev, &data_offset); + + lvds_info = + (union lvds_info *)(mode_info->atom_context->bios + data_offset); + + if (lvds_info) { lvds = kzalloc(sizeof(struct radeon_encoder_atom_dig), GFP_KERNEL); @@ -1207,6 +1220,9 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct lvds->pll_algo = PLL_ALGO_LEGACY; } + /* LVDS quirks */ + radeon_atom_apply_lvds_quirks(dev, lvds); + encoder->native_mode = lvds->native_mode; } return lvds; @@ -1225,11 +1241,11 @@ radeon_atombios_get_primary_dac_info(struct radeon_encoder *encoder) uint8_t bg, dac; struct radeon_encoder_primary_dac *p_dac = NULL; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - dac_info = (struct _COMPASSIONATE_DATA *) - (mode_info->atom_context->bios + data_offset); + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); + + dac_info = (struct _COMPASSIONATE_DATA *)(mode_info->atom_context->bios + data_offset); + if (dac_info) { p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac), GFP_KERNEL); if (!p_dac) @@ -1254,9 +1270,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, u8 frev, crev; u16 data_offset, misc; - if (!atom_parse_data_header(mode_info->atom_context, data_index, NULL, - &frev, &crev, &data_offset)) - return false; + atom_parse_data_header(mode_info->atom_context, data_index, NULL, &frev, &crev, &data_offset); switch (crev) { case 1: @@ -1348,50 +1362,47 @@ radeon_atombios_get_tv_info(struct radeon_device *rdev) struct _ATOM_ANALOG_TV_INFO *tv_info; enum radeon_tv_std tv_std = TV_STD_NTSC; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); - tv_info = (struct _ATOM_ANALOG_TV_INFO *) - (mode_info->atom_context->bios + data_offset); + tv_info = (struct _ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset); - switch (tv_info->ucTV_BootUpDefaultStandard) { - case ATOM_TV_NTSC: - tv_std = TV_STD_NTSC; - DRM_INFO("Default TV standard: NTSC\n"); - break; - case ATOM_TV_NTSCJ: - tv_std = TV_STD_NTSC_J; - DRM_INFO("Default TV standard: NTSC-J\n"); - break; - case ATOM_TV_PAL: - tv_std = TV_STD_PAL; - DRM_INFO("Default TV standard: PAL\n"); - break; - case ATOM_TV_PALM: - tv_std = TV_STD_PAL_M; - DRM_INFO("Default TV standard: PAL-M\n"); - break; - case ATOM_TV_PALN: - tv_std = TV_STD_PAL_N; - DRM_INFO("Default TV standard: PAL-N\n"); - break; - case ATOM_TV_PALCN: - tv_std = TV_STD_PAL_CN; - DRM_INFO("Default TV standard: PAL-CN\n"); - break; - case ATOM_TV_PAL60: - tv_std = TV_STD_PAL_60; - DRM_INFO("Default TV standard: PAL-60\n"); - break; - case ATOM_TV_SECAM: - tv_std = TV_STD_SECAM; - DRM_INFO("Default TV standard: SECAM\n"); - break; - default: - tv_std = TV_STD_NTSC; - DRM_INFO("Unknown TV standard; defaulting to NTSC\n"); - break; - } + switch (tv_info->ucTV_BootUpDefaultStandard) { + case ATOM_TV_NTSC: + tv_std = TV_STD_NTSC; + DRM_INFO("Default TV standard: NTSC\n"); + break; + case ATOM_TV_NTSCJ: + tv_std = TV_STD_NTSC_J; + DRM_INFO("Default TV standard: NTSC-J\n"); + break; + case ATOM_TV_PAL: + tv_std = TV_STD_PAL; + DRM_INFO("Default TV standard: PAL\n"); + break; + case ATOM_TV_PALM: + tv_std = TV_STD_PAL_M; + DRM_INFO("Default TV standard: PAL-M\n"); + break; + case ATOM_TV_PALN: + tv_std = TV_STD_PAL_N; + DRM_INFO("Default TV standard: PAL-N\n"); + break; + case ATOM_TV_PALCN: + tv_std = TV_STD_PAL_CN; + DRM_INFO("Default TV standard: PAL-CN\n"); + break; + case ATOM_TV_PAL60: + tv_std = TV_STD_PAL_60; + DRM_INFO("Default TV standard: PAL-60\n"); + break; + case ATOM_TV_SECAM: + tv_std = TV_STD_SECAM; + DRM_INFO("Default TV standard: SECAM\n"); + break; + default: + tv_std = TV_STD_NTSC; + DRM_INFO("Unknown TV standard; defaulting to NTSC\n"); + break; } return tv_std; } @@ -1409,12 +1420,11 @@ radeon_atombios_get_tv_dac_info(struct radeon_encoder *encoder) uint8_t bg, dac; struct radeon_encoder_tv_dac *tv_dac = NULL; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); - dac_info = (struct _COMPASSIONATE_DATA *) - (mode_info->atom_context->bios + data_offset); + dac_info = (struct _COMPASSIONATE_DATA *)(mode_info->atom_context->bios + data_offset); + if (dac_info) { tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL); if (!tv_dac) @@ -1437,30 +1447,6 @@ radeon_atombios_get_tv_dac_info(struct radeon_encoder *encoder) return tv_dac; } -static const char *thermal_controller_names[] = { - "NONE", - "LM63", - "ADM1032", - "ADM1030", - "MUA6649", - "LM64", - "F75375", - "ASC7512", -}; - -static const char *pp_lib_thermal_controller_names[] = { - "NONE", - "LM63", - "ADM1032", - "ADM1030", - "MUA6649", - "LM64", - "F75375", - "RV6xx", - "RV770", - "ADT7473", -}; - union power_info { struct _ATOM_POWERPLAY_INFO info; struct _ATOM_POWERPLAY_INFO_V2 info_2; @@ -1480,22 +1466,15 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) struct _ATOM_PPLIB_STATE *power_state; int num_modes = 0, i, j; int state_index = 0, mode_index = 0; - struct radeon_i2c_bus_rec i2c_bus; + + atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); + + power_info = (union power_info *)(mode_info->atom_context->bios + data_offset); rdev->pm.default_power_state = NULL; - if (atom_parse_data_header(mode_info->atom_context, index, NULL, - &frev, &crev, &data_offset)) { - power_info = (union power_info *)(mode_info->atom_context->bios + data_offset); + if (power_info) { if (frev < 4) { - /* add the i2c bus for thermal/fan chip */ - if (power_info->info.ucOverdriveThermalController > 0) { - DRM_INFO("Possible %s thermal controller at 0x%02x\n", - thermal_controller_names[power_info->info.ucOverdriveThermalController], - power_info->info.ucOverdriveControllerAddress >> 1); - i2c_bus = radeon_lookup_i2c_gpio(rdev, power_info->info.ucOverdriveI2cLine); - rdev->pm.i2c_bus = radeon_i2c_create(rdev->ddev, &i2c_bus, "Thermal"); - } num_modes = power_info->info.ucNumOfPowerModeEntries; if (num_modes > ATOM_MAX_NUMBEROF_POWER_BLOCK) num_modes = ATOM_MAX_NUMBEROF_POWER_BLOCK; @@ -1705,24 +1684,6 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) } } } else if (frev == 4) { - /* add the i2c bus for thermal/fan chip */ - /* no support for internal controller yet */ - if (power_info->info_4.sThermalController.ucType > 0) { - if ((power_info->info_4.sThermalController.ucType == ATOM_PP_THERMALCONTROLLER_RV6xx) || - (power_info->info_4.sThermalController.ucType == ATOM_PP_THERMALCONTROLLER_RV770)) { - DRM_INFO("Internal thermal controller %s fan control\n", - (power_info->info_4.sThermalController.ucFanParameters & - ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); - } else { - DRM_INFO("Possible %s thermal controller at 0x%02x %s fan control\n", - pp_lib_thermal_controller_names[power_info->info_4.sThermalController.ucType], - power_info->info_4.sThermalController.ucI2cAddress >> 1, - (power_info->info_4.sThermalController.ucFanParameters & - ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); - i2c_bus = radeon_lookup_i2c_gpio(rdev, power_info->info_4.sThermalController.ucI2cLine); - rdev->pm.i2c_bus = radeon_i2c_create(rdev->ddev, &i2c_bus, "Thermal"); - } - } for (i = 0; i < power_info->info_4.ucNumStates; i++) { mode_index = 0; power_state = (struct _ATOM_PPLIB_STATE *) diff --git a/trunk/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/trunk/drivers/gpu/drm/radeon/radeon_atpx_handler.c index ed5dfe58f29c..3f557c4151e0 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -7,7 +7,6 @@ * ATPX support for both Intel/ATI */ #include -#include #include #include #include diff --git a/trunk/drivers/gpu/drm/radeon/radeon_bios.c b/trunk/drivers/gpu/drm/radeon/radeon_bios.c index 8ad71f701316..557240460526 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_bios.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_bios.c @@ -31,7 +31,6 @@ #include "atom.h" #include -#include /* * BIOS. */ diff --git a/trunk/drivers/gpu/drm/radeon/radeon_combios.c b/trunk/drivers/gpu/drm/radeon/radeon_combios.c index 2becdeda68a3..e9ea38ece375 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_combios.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_combios.c @@ -531,7 +531,10 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde case CHIP_RS300: switch (ddc_line) { case RADEON_GPIO_DVI_DDC: - i2c.hw_capable = true; + /* in theory this should be hw capable, + * but it doesn't seem to work + */ + i2c.hw_capable = false; break; default: i2c.hw_capable = false; @@ -630,8 +633,6 @@ bool radeon_combios_get_clock_info(struct drm_device *dev) p1pll->reference_div = RBIOS16(pll_info + 0x10); p1pll->pll_out_min = RBIOS32(pll_info + 0x12); p1pll->pll_out_max = RBIOS32(pll_info + 0x16); - p1pll->lcd_pll_out_min = p1pll->pll_out_min; - p1pll->lcd_pll_out_max = p1pll->pll_out_max; if (rev > 9) { p1pll->pll_in_min = RBIOS32(pll_info + 0x36); diff --git a/trunk/drivers/gpu/drm/radeon/radeon_connectors.c b/trunk/drivers/gpu/drm/radeon/radeon_connectors.c index 60d59816b94f..ee0083f982d8 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_connectors.c @@ -940,7 +940,7 @@ static void radeon_dp_connector_destroy(struct drm_connector *connector) if (radeon_connector->edid) kfree(radeon_connector->edid); if (radeon_dig_connector->dp_i2c_bus) - radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus); + radeon_i2c_destroy_dp(radeon_dig_connector->dp_i2c_bus); kfree(radeon_connector->con_priv); drm_sysfs_connector_remove(connector); drm_connector_cleanup(connector); diff --git a/trunk/drivers/gpu/drm/radeon/radeon_cs.c b/trunk/drivers/gpu/drm/radeon/radeon_cs.c index f9b0fe002c0a..70ba02ed7723 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_cs.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_cs.c @@ -193,11 +193,9 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error) radeon_bo_list_fence(&parser->validated, parser->ib->fence); } radeon_bo_list_unreserve(&parser->validated); - if (parser->relocs != NULL) { - for (i = 0; i < parser->nrelocs; i++) { - if (parser->relocs[i].gobj) - drm_gem_object_unreference_unlocked(parser->relocs[i].gobj); - } + for (i = 0; i < parser->nrelocs; i++) { + if (parser->relocs[i].gobj) + drm_gem_object_unreference_unlocked(parser->relocs[i].gobj); } kfree(parser->track); kfree(parser->relocs); @@ -245,8 +243,7 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) } r = radeon_cs_parser_relocs(&parser); if (r) { - if (r != -ERESTARTSYS) - DRM_ERROR("Failed to parse relocation %d!\n", r); + DRM_ERROR("Failed to parse relocation !\n"); radeon_cs_parser_fini(&parser, r); mutex_unlock(&rdev->cs_mutex); return r; diff --git a/trunk/drivers/gpu/drm/radeon/radeon_device.c b/trunk/drivers/gpu/drm/radeon/radeon_device.c index bddf17f97da8..e28e4ed5f720 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_device.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_device.c @@ -26,7 +26,6 @@ * Jerome Glisse */ #include -#include #include #include #include @@ -34,6 +33,7 @@ #include #include "radeon_reg.h" #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" /* @@ -242,36 +242,6 @@ bool radeon_card_posted(struct radeon_device *rdev) } -void radeon_update_bandwidth_info(struct radeon_device *rdev) -{ - fixed20_12 a; - u32 sclk, mclk; - - if (rdev->flags & RADEON_IS_IGP) { - sclk = radeon_get_engine_clock(rdev); - mclk = rdev->clock.default_mclk; - - a.full = rfixed_const(100); - rdev->pm.sclk.full = rfixed_const(sclk); - rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); - rdev->pm.mclk.full = rfixed_const(mclk); - rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a); - - a.full = rfixed_const(16); - /* core_bandwidth = sclk(Mhz) * 16 */ - rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a); - } else { - sclk = radeon_get_engine_clock(rdev); - mclk = radeon_get_memory_clock(rdev); - - a.full = rfixed_const(100); - rdev->pm.sclk.full = rfixed_const(sclk); - rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); - rdev->pm.mclk.full = rfixed_const(mclk); - rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a); - } -} - bool radeon_boot_test_post_card(struct radeon_device *rdev) { if (radeon_card_posted(rdev)) @@ -318,6 +288,181 @@ void radeon_dummy_page_fini(struct radeon_device *rdev) } +/* + * Registers accessors functions. + */ +uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg) +{ + DRM_ERROR("Invalid callback to read register 0x%04X\n", reg); + BUG_ON(1); + return 0; +} + +void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) +{ + DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n", + reg, v); + BUG_ON(1); +} + +void radeon_register_accessor_init(struct radeon_device *rdev) +{ + rdev->mc_rreg = &radeon_invalid_rreg; + rdev->mc_wreg = &radeon_invalid_wreg; + rdev->pll_rreg = &radeon_invalid_rreg; + rdev->pll_wreg = &radeon_invalid_wreg; + rdev->pciep_rreg = &radeon_invalid_rreg; + rdev->pciep_wreg = &radeon_invalid_wreg; + + /* Don't change order as we are overridding accessor. */ + if (rdev->family < CHIP_RV515) { + rdev->pcie_reg_mask = 0xff; + } else { + rdev->pcie_reg_mask = 0x7ff; + } + /* FIXME: not sure here */ + if (rdev->family <= CHIP_R580) { + rdev->pll_rreg = &r100_pll_rreg; + rdev->pll_wreg = &r100_pll_wreg; + } + if (rdev->family >= CHIP_R420) { + rdev->mc_rreg = &r420_mc_rreg; + rdev->mc_wreg = &r420_mc_wreg; + } + if (rdev->family >= CHIP_RV515) { + rdev->mc_rreg = &rv515_mc_rreg; + rdev->mc_wreg = &rv515_mc_wreg; + } + if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { + rdev->mc_rreg = &rs400_mc_rreg; + rdev->mc_wreg = &rs400_mc_wreg; + } + if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { + rdev->mc_rreg = &rs690_mc_rreg; + rdev->mc_wreg = &rs690_mc_wreg; + } + if (rdev->family == CHIP_RS600) { + rdev->mc_rreg = &rs600_mc_rreg; + rdev->mc_wreg = &rs600_mc_wreg; + } + if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) { + rdev->pciep_rreg = &r600_pciep_rreg; + rdev->pciep_wreg = &r600_pciep_wreg; + } +} + + +/* + * ASIC + */ +int radeon_asic_init(struct radeon_device *rdev) +{ + radeon_register_accessor_init(rdev); + switch (rdev->family) { + case CHIP_R100: + case CHIP_RV100: + case CHIP_RS100: + case CHIP_RV200: + case CHIP_RS200: + rdev->asic = &r100_asic; + break; + case CHIP_R200: + case CHIP_RV250: + case CHIP_RS300: + case CHIP_RV280: + rdev->asic = &r200_asic; + break; + case CHIP_R300: + case CHIP_R350: + case CHIP_RV350: + case CHIP_RV380: + if (rdev->flags & RADEON_IS_PCIE) + rdev->asic = &r300_asic_pcie; + else + rdev->asic = &r300_asic; + break; + case CHIP_R420: + case CHIP_R423: + case CHIP_RV410: + rdev->asic = &r420_asic; + break; + case CHIP_RS400: + case CHIP_RS480: + rdev->asic = &rs400_asic; + break; + case CHIP_RS600: + rdev->asic = &rs600_asic; + break; + case CHIP_RS690: + case CHIP_RS740: + rdev->asic = &rs690_asic; + break; + case CHIP_RV515: + rdev->asic = &rv515_asic; + break; + case CHIP_R520: + case CHIP_RV530: + case CHIP_RV560: + case CHIP_RV570: + case CHIP_R580: + rdev->asic = &r520_asic; + break; + case CHIP_R600: + case CHIP_RV610: + case CHIP_RV630: + case CHIP_RV620: + case CHIP_RV635: + case CHIP_RV670: + case CHIP_RS780: + case CHIP_RS880: + rdev->asic = &r600_asic; + break; + case CHIP_RV770: + case CHIP_RV730: + case CHIP_RV710: + case CHIP_RV740: + rdev->asic = &rv770_asic; + break; + case CHIP_CEDAR: + case CHIP_REDWOOD: + case CHIP_JUNIPER: + case CHIP_CYPRESS: + case CHIP_HEMLOCK: + rdev->asic = &evergreen_asic; + break; + default: + /* FIXME: not supported yet */ + return -EINVAL; + } + + if (rdev->flags & RADEON_IS_IGP) { + rdev->asic->get_memory_clock = NULL; + rdev->asic->set_memory_clock = NULL; + } + + return 0; +} + + +/* + * Wrapper around modesetting bits. + */ +int radeon_clocks_init(struct radeon_device *rdev) +{ + int r; + + r = radeon_static_clocks_init(rdev->ddev); + if (r) { + return r; + } + DRM_INFO("Clocks initialized !\n"); + return 0; +} + +void radeon_clocks_fini(struct radeon_device *rdev) +{ +} + /* ATOM accessor methods */ static uint32_t cail_pll_read(struct card_info *info, uint32_t reg) { @@ -422,6 +567,29 @@ static unsigned int radeon_vga_set_decode(void *cookie, bool state) return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; } +void radeon_agp_disable(struct radeon_device *rdev) +{ + rdev->flags &= ~RADEON_IS_AGP; + if (rdev->family >= CHIP_R600) { + DRM_INFO("Forcing AGP to PCIE mode\n"); + rdev->flags |= RADEON_IS_PCIE; + } else if (rdev->family >= CHIP_RV515 || + rdev->family == CHIP_RV380 || + rdev->family == CHIP_RV410 || + rdev->family == CHIP_R423) { + DRM_INFO("Forcing AGP to PCIE mode\n"); + rdev->flags |= RADEON_IS_PCIE; + rdev->asic->gart_tlb_flush = &rv370_pcie_gart_tlb_flush; + rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; + } else { + DRM_INFO("Forcing AGP to PCI mode\n"); + rdev->flags |= RADEON_IS_PCI; + rdev->asic->gart_tlb_flush = &r100_pci_gart_tlb_flush; + rdev->asic->gart_set_page = &r100_pci_gart_set_page; + } + rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; +} + void radeon_check_arguments(struct radeon_device *rdev) { /* vramlimit must be a power of two */ @@ -563,14 +731,6 @@ int radeon_device_init(struct radeon_device *rdev, return r; radeon_check_arguments(rdev); - /* all of the newer IGP chips have an internal gart - * However some rs4xx report as AGP, so remove that here. - */ - if ((rdev->family >= CHIP_RS400) && - (rdev->flags & RADEON_IS_IGP)) { - rdev->flags &= ~RADEON_IS_AGP; - } - if (rdev->flags & RADEON_IS_AGP && radeon_agpmode == -1) { radeon_agp_disable(rdev); } diff --git a/trunk/drivers/gpu/drm/radeon/radeon_display.c b/trunk/drivers/gpu/drm/radeon/radeon_display.c index b8d672828246..ba8d806dcf39 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_display.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_display.c @@ -368,9 +368,10 @@ static bool radeon_setup_enc_conn(struct drm_device *dev) if (rdev->bios) { if (rdev->is_atom_bios) { - ret = radeon_get_atom_connector_info_from_supported_devices_table(dev); - if (ret == false) + if (rdev->family >= CHIP_R600) ret = radeon_get_atom_connector_info_from_object_table(dev); + else + ret = radeon_get_atom_connector_info_from_supported_devices_table(dev); } else { ret = radeon_get_legacy_connector_info_from_bios(dev); if (ret == false) @@ -468,19 +469,10 @@ static void radeon_compute_pll_legacy(struct radeon_pll *pll, uint32_t best_error = 0xffffffff; uint32_t best_vco_diff = 1; uint32_t post_div; - u32 pll_out_min, pll_out_max; DRM_DEBUG("PLL freq %llu %u %u\n", freq, pll->min_ref_div, pll->max_ref_div); freq = freq * 1000; - if (pll->flags & RADEON_PLL_IS_LCD) { - pll_out_min = pll->lcd_pll_out_min; - pll_out_max = pll->lcd_pll_out_max; - } else { - pll_out_min = pll->pll_out_min; - pll_out_max = pll->pll_out_max; - } - if (pll->flags & RADEON_PLL_USE_REF_DIV) min_ref_div = max_ref_div = pll->reference_div; else { @@ -544,10 +536,10 @@ static void radeon_compute_pll_legacy(struct radeon_pll *pll, tmp = (uint64_t)pll->reference_freq * feedback_div; vco = radeon_div(tmp, ref_div); - if (vco < pll_out_min) { + if (vco < pll->pll_out_min) { min_feed_div = feedback_div + 1; continue; - } else if (vco > pll_out_max) { + } else if (vco > pll->pll_out_max) { max_feed_div = feedback_div; continue; } @@ -683,15 +675,6 @@ calc_fb_ref_div(struct radeon_pll *pll, { fixed20_12 ffreq, max_error, error, pll_out, a; u32 vco; - u32 pll_out_min, pll_out_max; - - if (pll->flags & RADEON_PLL_IS_LCD) { - pll_out_min = pll->lcd_pll_out_min; - pll_out_max = pll->lcd_pll_out_max; - } else { - pll_out_min = pll->pll_out_min; - pll_out_max = pll->pll_out_max; - } ffreq.full = rfixed_const(freq); /* max_error = ffreq * 0.0025; */ @@ -703,7 +686,7 @@ calc_fb_ref_div(struct radeon_pll *pll, vco = pll->reference_freq * (((*fb_div) * 10) + (*fb_div_frac)); vco = vco / ((*ref_div) * 10); - if ((vco < pll_out_min) || (vco > pll_out_max)) + if ((vco < pll->pll_out_min) || (vco > pll->pll_out_max)) continue; /* pll_out = vco / post_div; */ @@ -731,15 +714,6 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, { u32 fb_div = 0, fb_div_frac = 0, post_div = 0, ref_div = 0; u32 best_freq = 0, vco_frequency; - u32 pll_out_min, pll_out_max; - - if (pll->flags & RADEON_PLL_IS_LCD) { - pll_out_min = pll->lcd_pll_out_min; - pll_out_max = pll->lcd_pll_out_max; - } else { - pll_out_min = pll->pll_out_min; - pll_out_max = pll->pll_out_max; - } /* freq = freq / 10; */ do_div(freq, 10); @@ -750,7 +724,7 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, goto done; vco_frequency = freq * post_div; - if ((vco_frequency < pll_out_min) || (vco_frequency > pll_out_max)) + if ((vco_frequency < pll->pll_out_min) || (vco_frequency > pll->pll_out_max)) goto done; if (pll->flags & RADEON_PLL_USE_REF_DIV) { @@ -775,7 +749,7 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, continue; vco_frequency = freq * post_div; - if ((vco_frequency < pll_out_min) || (vco_frequency > pll_out_max)) + if ((vco_frequency < pll->pll_out_min) || (vco_frequency > pll->pll_out_max)) continue; if (pll->flags & RADEON_PLL_USE_REF_DIV) { ref_div = pll->reference_div; @@ -971,23 +945,6 @@ static int radeon_modeset_create_props(struct radeon_device *rdev) return 0; } -void radeon_update_display_priority(struct radeon_device *rdev) -{ - /* adjustment options for the display watermarks */ - if ((radeon_disp_priority == 0) || (radeon_disp_priority > 2)) { - /* set display priority to high for r3xx, rv515 chips - * this avoids flickering due to underflow to the - * display controllers during heavy acceleration. - */ - if (ASIC_IS_R300(rdev) || (rdev->family == CHIP_RV515)) - rdev->disp_priority = 2; - else - rdev->disp_priority = 0; - } else - rdev->disp_priority = radeon_disp_priority; - -} - int radeon_modeset_init(struct radeon_device *rdev) { int i; @@ -1019,6 +976,15 @@ int radeon_modeset_init(struct radeon_device *rdev) radeon_combios_check_hardcoded_edid(rdev); } + if (rdev->flags & RADEON_SINGLE_CRTC) + rdev->num_crtc = 1; + else { + if (ASIC_IS_DCE4(rdev)) + rdev->num_crtc = 6; + else + rdev->num_crtc = 2; + } + /* allocate crtcs */ for (i = 0; i < rdev->num_crtc; i++) { radeon_crtc_init(rdev->ddev, i); diff --git a/trunk/drivers/gpu/drm/radeon/radeon_drv.c b/trunk/drivers/gpu/drm/radeon/radeon_drv.c index 055a51732dcb..6eec0ece6a6c 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_drv.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_drv.c @@ -42,10 +42,9 @@ * KMS wrapper. * - 2.0.0 - initial interface * - 2.1.0 - add square tiling interface - * - 2.2.0 - add r6xx/r7xx const buffer support */ #define KMS_DRIVER_MAJOR 2 -#define KMS_DRIVER_MINOR 2 +#define KMS_DRIVER_MINOR 1 #define KMS_DRIVER_PATCHLEVEL 0 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); int radeon_driver_unload_kms(struct drm_device *dev); @@ -92,8 +91,6 @@ int radeon_tv = 1; int radeon_new_pll = -1; int radeon_dynpm = -1; int radeon_audio = 1; -int radeon_disp_priority = 0; -int radeon_hw_i2c = 0; MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); module_param_named(no_wb, radeon_no_wb, int, 0444); @@ -137,12 +134,6 @@ module_param_named(dynpm, radeon_dynpm, int, 0444); MODULE_PARM_DESC(audio, "Audio enable (0 = disable)"); module_param_named(audio, radeon_audio, int, 0444); -MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); -module_param_named(disp_priority, radeon_disp_priority, int, 0444); - -MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); -module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); - static int radeon_suspend(struct drm_device *dev, pm_message_t state) { drm_radeon_private_t *dev_priv = dev->dev_private; diff --git a/trunk/drivers/gpu/drm/radeon/radeon_drv.h b/trunk/drivers/gpu/drm/radeon/radeon_drv.h index 448eba89d1e6..ec55f2b23c22 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_drv.h +++ b/trunk/drivers/gpu/drm/radeon/radeon_drv.h @@ -107,10 +107,9 @@ * 1.30- Add support for occlusion queries * 1.31- Add support for num Z pipes from GET_PARAM * 1.32- fixes for rv740 setup - * 1.33- Add r6xx/r7xx const buffer support */ #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 33 +#define DRIVER_MINOR 32 #define DRIVER_PATCHLEVEL 0 enum radeon_cp_microcode_version { diff --git a/trunk/drivers/gpu/drm/radeon/radeon_encoders.c b/trunk/drivers/gpu/drm/radeon/radeon_encoders.c index 52d6f96f274b..bc926ea0a530 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_encoders.c @@ -302,7 +302,7 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, } if (ASIC_IS_DCE3(rdev) && - (radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT))) { + (radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT))) { struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); radeon_dp_set_link_config(connector, mode); } @@ -519,8 +519,7 @@ atombios_digital_setup(struct drm_encoder *encoder, int action) break; } - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); switch (frev) { case 1: @@ -594,6 +593,7 @@ atombios_digital_setup(struct drm_encoder *encoder, int action) } atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); + r600_hdmi_enable(encoder, hdmi_detected); } int @@ -708,7 +708,7 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action) struct radeon_connector_atom_dig *dig_connector = radeon_get_atom_connector_priv_from_encoder(encoder); union dig_encoder_control args; - int index = 0; + int index = 0, num = 0; uint8_t frev, crev; if (!dig || !dig_connector) @@ -724,9 +724,9 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action) else index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); } + num = dig->dig_encoder + 1; - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); args.v1.ucAction = action; args.v1.usPixelClock = cpu_to_le16(radeon_encoder->pixel_clock / 10); @@ -785,7 +785,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t struct drm_connector *connector; struct radeon_connector *radeon_connector; union dig_transmitter_control args; - int index = 0; + int index = 0, num = 0; uint8_t frev, crev; bool is_dp = false; int pll_id = 0; @@ -814,8 +814,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t } } - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); args.v1.ucAction = action; if (action == ATOM_TRANSMITTER_ACTION_INIT) { @@ -861,12 +860,15 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: args.v3.acConfig.ucTransmitterSel = 0; + num = 0; break; case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: args.v3.acConfig.ucTransmitterSel = 1; + num = 1; break; case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: args.v3.acConfig.ucTransmitterSel = 2; + num = 2; break; } @@ -877,19 +879,23 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t args.v3.acConfig.fCoherentMode = 1; } } else if (ASIC_IS_DCE32(rdev)) { - args.v2.acConfig.ucEncoderSel = dig->dig_encoder; + if (dig->dig_encoder == 1) + args.v2.acConfig.ucEncoderSel = 1; if (dig_connector->linkb) args.v2.acConfig.ucLinkSel = 1; switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: args.v2.acConfig.ucTransmitterSel = 0; + num = 0; break; case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: args.v2.acConfig.ucTransmitterSel = 1; + num = 1; break; case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: args.v2.acConfig.ucTransmitterSel = 2; + num = 2; break; } @@ -907,25 +913,31 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t else args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; - if ((rdev->flags & RADEON_IS_IGP) && - (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_UNIPHY)) { - if (is_dp || (radeon_encoder->pixel_clock <= 165000)) { - if (dig_connector->igp_lane_info & 0x1) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3; - else if (dig_connector->igp_lane_info & 0x2) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7; - else if (dig_connector->igp_lane_info & 0x4) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11; - else if (dig_connector->igp_lane_info & 0x8) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15; - } else { - if (dig_connector->igp_lane_info & 0x3) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7; - else if (dig_connector->igp_lane_info & 0xc) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15; + switch (radeon_encoder->encoder_id) { + case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: + if (rdev->flags & RADEON_IS_IGP) { + if (radeon_encoder->pixel_clock > 165000) { + if (dig_connector->igp_lane_info & 0x3) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7; + else if (dig_connector->igp_lane_info & 0xc) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15; + } else { + if (dig_connector->igp_lane_info & 0x1) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3; + else if (dig_connector->igp_lane_info & 0x2) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7; + else if (dig_connector->igp_lane_info & 0x4) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11; + else if (dig_connector->igp_lane_info & 0x8) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15; + } } + break; } + if (radeon_encoder->pixel_clock > 165000) + args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_8LANE_LINK; + if (dig_connector->linkb) args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB; else @@ -936,8 +948,6 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t else if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { if (dig->coherent_mode) args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT; - if (radeon_encoder->pixel_clock > 165000) - args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_8LANE_LINK; } } @@ -1044,25 +1054,16 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) if (is_dig) { switch (mode) { case DRM_MODE_DPMS_ON: - if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP) { + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); + { struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); - dp_link_train(encoder, connector); - if (ASIC_IS_DCE4(rdev)) - atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON); } - if (!ASIC_IS_DCE4(rdev)) - atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); break; case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_OFF: - if (!ASIC_IS_DCE4(rdev)) - atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0); - if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP) { - if (ASIC_IS_DCE4(rdev)) - atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF); - } + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0); break; } } else { @@ -1103,8 +1104,7 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) memset(&args, 0, sizeof(args)); - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) - return; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); switch (frev) { case 1: @@ -1216,9 +1216,6 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) } atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); - - /* update scratch regs with new routing */ - radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); } static void @@ -1329,9 +1326,19 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); + struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); + if (radeon_encoder->active_device & + (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) { + struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; + if (dig) + dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder); + } radeon_encoder->pixel_clock = adjusted_mode->clock; + radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); + atombios_set_encoder_crtc_source(encoder); + if (ASIC_IS_AVIVO(rdev)) { if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)) atombios_yuv_setup(encoder, true); @@ -1389,10 +1396,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, } atombios_apply_encoder_quirks(encoder, adjusted_mode); - if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { - r600_hdmi_enable(encoder); + /* XXX */ + if (!ASIC_IS_DCE4(rdev)) r600_hdmi_setmode(encoder, adjusted_mode); - } } static bool @@ -1412,8 +1418,7 @@ atombios_dac_load_detect(struct drm_encoder *encoder, struct drm_connector *conn memset(&args, 0, sizeof(args)); - if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) - return false; + atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); args.sDacload.ucMisc = 0; @@ -1487,20 +1492,8 @@ radeon_atom_dac_detect(struct drm_encoder *encoder, struct drm_connector *connec static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) { - struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - - if (radeon_encoder->active_device & - (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) { - struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; - if (dig) - dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder); - } - radeon_atom_output_lock(encoder, true); radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); - - /* this is needed for the pll/ss setup to work correctly in some cases */ - atombios_set_encoder_crtc_source(encoder); } static void radeon_atom_encoder_commit(struct drm_encoder *encoder) @@ -1516,8 +1509,6 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder) radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); if (radeon_encoder_is_digital(encoder)) { - if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) - r600_hdmi_disable(encoder); dig = radeon_encoder->enc_priv; dig->dig_encoder = -1; } @@ -1668,4 +1659,6 @@ radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t su drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); break; } + + r600_hdmi_init(encoder); } diff --git a/trunk/drivers/gpu/drm/radeon/radeon_fb.c b/trunk/drivers/gpu/drm/radeon/radeon_fb.c index 9ac57a09784b..8fccbf29235e 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_fb.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_fb.c @@ -28,7 +28,6 @@ */ #include -#include #include #include "drmP.h" diff --git a/trunk/drivers/gpu/drm/radeon/radeon_fence.c b/trunk/drivers/gpu/drm/radeon/radeon_fence.c index d90f95b405c5..8495d4e32e18 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_fence.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_fence.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "drmP.h" #include "drm.h" #include "radeon_reg.h" diff --git a/trunk/drivers/gpu/drm/radeon/radeon_i2c.c b/trunk/drivers/gpu/drm/radeon/radeon_i2c.c index 5def6f5dff38..4ae50c19589f 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_i2c.c @@ -59,7 +59,6 @@ bool radeon_ddc_probe(struct radeon_connector *radeon_connector) return false; } -/* bit banging i2c */ static void radeon_i2c_do_lock(struct radeon_i2c_chan *i2c, int lock_state) { @@ -182,30 +181,13 @@ static void set_data(void *i2c_priv, int data) WREG32(rec->en_data_reg, val); } -static int pre_xfer(struct i2c_adapter *i2c_adap) -{ - struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); - - radeon_i2c_do_lock(i2c, 1); - - return 0; -} - -static void post_xfer(struct i2c_adapter *i2c_adap) -{ - struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); - - radeon_i2c_do_lock(i2c, 0); -} - -/* hw i2c */ - static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) { + struct radeon_pll *spll = &rdev->clock.spll; u32 sclk = radeon_get_engine_clock(rdev); u32 prescale = 0; - u32 nm; - u8 n, m, loop; + u32 n, m; + u8 loop; int i2c_clock; switch (rdev->family) { @@ -221,15 +203,13 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) case CHIP_R300: case CHIP_R350: case CHIP_RV350: - i2c_clock = 60; - nm = (sclk * 10) / (i2c_clock * 4); + n = (spll->reference_freq) / (4 * 6); for (loop = 1; loop < 255; loop++) { - if ((nm / loop) < loop) + if ((loop * (loop - 1)) > n) break; } - n = loop - 1; - m = loop - 2; - prescale = m | (n << 8); + m = loop - 1; + prescale = m | (loop << 8); break; case CHIP_RV380: case CHIP_RS400: @@ -237,6 +217,7 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) case CHIP_R420: case CHIP_R423: case CHIP_RV410: + sclk = radeon_get_engine_clock(rdev); prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; break; case CHIP_RS600: @@ -251,6 +232,7 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) case CHIP_RV570: case CHIP_R580: i2c_clock = 50; + sclk = radeon_get_engine_clock(rdev); if (rdev->family == CHIP_R520) prescale = (127 << 8) + ((sclk * 10) / (4 * 127 * i2c_clock)); else @@ -309,7 +291,6 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap, prescale = radeon_get_i2c_prescale(rdev); reg = ((prescale << RADEON_I2C_PRESCALE_SHIFT) | - RADEON_I2C_DRIVE_EN | RADEON_I2C_START | RADEON_I2C_STOP | RADEON_I2C_GO); @@ -776,13 +757,26 @@ static int r500_hw_i2c_xfer(struct i2c_adapter *i2c_adap, return ret; } -static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, +static int radeon_sw_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) +{ + struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); + int ret; + + radeon_i2c_do_lock(i2c, 1); + ret = i2c_transfer(&i2c->algo.radeon.bit_adapter, msgs, num); + radeon_i2c_do_lock(i2c, 0); + + return ret; +} + +static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, + struct i2c_msg *msgs, int num) { struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); struct radeon_device *rdev = i2c->dev->dev_private; struct radeon_i2c_bus_rec *rec = &i2c->rec; - int ret = 0; + int ret; switch (rdev->family) { case CHIP_R100: @@ -803,12 +797,16 @@ static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, case CHIP_RV410: case CHIP_RS400: case CHIP_RS480: - ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); + if (rec->hw_capable) + ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); + else + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; case CHIP_RS600: case CHIP_RS690: case CHIP_RS740: /* XXX fill in hw i2c implementation */ + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; case CHIP_RV515: case CHIP_R520: @@ -816,16 +814,20 @@ static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, case CHIP_RV560: case CHIP_RV570: case CHIP_R580: - if (rec->mm_i2c) - ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); - else - ret = r500_hw_i2c_xfer(i2c_adap, msgs, num); + if (rec->hw_capable) { + if (rec->mm_i2c) + ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); + else + ret = r500_hw_i2c_xfer(i2c_adap, msgs, num); + } else + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; case CHIP_R600: case CHIP_RV610: case CHIP_RV630: case CHIP_RV670: /* XXX fill in hw i2c implementation */ + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; case CHIP_RV620: case CHIP_RV635: @@ -836,6 +838,7 @@ static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, case CHIP_RV710: case CHIP_RV740: /* XXX fill in hw i2c implementation */ + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; case CHIP_CEDAR: case CHIP_REDWOOD: @@ -843,6 +846,7 @@ static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, case CHIP_CYPRESS: case CHIP_HEMLOCK: /* XXX fill in hw i2c implementation */ + ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); break; default: DRM_ERROR("i2c: unhandled radeon chip\n"); @@ -853,21 +857,20 @@ static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, return ret; } -static u32 radeon_hw_i2c_func(struct i2c_adapter *adap) +static u32 radeon_i2c_func(struct i2c_adapter *adap) { return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; } static const struct i2c_algorithm radeon_i2c_algo = { - .master_xfer = radeon_hw_i2c_xfer, - .functionality = radeon_hw_i2c_func, + .master_xfer = radeon_i2c_xfer, + .functionality = radeon_i2c_func, }; struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, struct radeon_i2c_bus_rec *rec, const char *name) { - struct radeon_device *rdev = dev->dev_private; struct radeon_i2c_chan *i2c; int ret; @@ -875,43 +878,37 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, if (i2c == NULL) return NULL; + /* set the internal bit adapter */ + i2c->algo.radeon.bit_adapter.owner = THIS_MODULE; + i2c_set_adapdata(&i2c->algo.radeon.bit_adapter, i2c); + sprintf(i2c->algo.radeon.bit_adapter.name, "Radeon internal i2c bit bus %s", name); + i2c->algo.radeon.bit_adapter.algo_data = &i2c->algo.radeon.bit_data; + i2c->algo.radeon.bit_data.setsda = set_data; + i2c->algo.radeon.bit_data.setscl = set_clock; + i2c->algo.radeon.bit_data.getsda = get_data; + i2c->algo.radeon.bit_data.getscl = get_clock; + i2c->algo.radeon.bit_data.udelay = 20; + /* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always + * make this, 2 jiffies is a lot more reliable */ + i2c->algo.radeon.bit_data.timeout = 2; + i2c->algo.radeon.bit_data.data = i2c; + ret = i2c_bit_add_bus(&i2c->algo.radeon.bit_adapter); + if (ret) { + DRM_ERROR("Failed to register internal bit i2c %s\n", name); + goto out_free; + } + /* set the radeon i2c adapter */ + i2c->dev = dev; i2c->rec = *rec; i2c->adapter.owner = THIS_MODULE; - i2c->dev = dev; i2c_set_adapdata(&i2c->adapter, i2c); - if (rec->mm_i2c || - (rec->hw_capable && - radeon_hw_i2c && - ((rdev->family <= CHIP_RS480) || - ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580))))) { - /* set the radeon hw i2c adapter */ - sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name); - i2c->adapter.algo = &radeon_i2c_algo; - ret = i2c_add_adapter(&i2c->adapter); - if (ret) { - DRM_ERROR("Failed to register hw i2c %s\n", name); - goto out_free; - } - } else { - /* set the radeon bit adapter */ - sprintf(i2c->adapter.name, "Radeon i2c bit bus %s", name); - i2c->adapter.algo_data = &i2c->algo.bit; - i2c->algo.bit.pre_xfer = pre_xfer; - i2c->algo.bit.post_xfer = post_xfer; - i2c->algo.bit.setsda = set_data; - i2c->algo.bit.setscl = set_clock; - i2c->algo.bit.getsda = get_data; - i2c->algo.bit.getscl = get_clock; - i2c->algo.bit.udelay = 20; - /* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always - * make this, 2 jiffies is a lot more reliable */ - i2c->algo.bit.timeout = 2; - i2c->algo.bit.data = i2c; - ret = i2c_bit_add_bus(&i2c->adapter); - if (ret) { - DRM_ERROR("Failed to register bit i2c %s\n", name); - goto out_free; - } + sprintf(i2c->adapter.name, "Radeon i2c %s", name); + i2c->adapter.algo_data = &i2c->algo.radeon; + i2c->adapter.algo = &radeon_i2c_algo; + ret = i2c_add_adapter(&i2c->adapter); + if (ret) { + DRM_ERROR("Failed to register i2c %s\n", name); + goto out_free; } return i2c; @@ -956,6 +953,16 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c) { if (!i2c) return; + i2c_del_adapter(&i2c->algo.radeon.bit_adapter); + i2c_del_adapter(&i2c->adapter); + kfree(i2c); +} + +void radeon_i2c_destroy_dp(struct radeon_i2c_chan *i2c) +{ + if (!i2c) + return; + i2c_del_adapter(&i2c->adapter); kfree(i2c); } diff --git a/trunk/drivers/gpu/drm/radeon/radeon_irq_kms.c b/trunk/drivers/gpu/drm/radeon/radeon_irq_kms.c index a212041e8b0b..ea4c645ece11 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -67,10 +67,9 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev) /* Disable *all* interrupts */ rdev->irq.sw_int = false; - for (i = 0; i < rdev->num_crtc; i++) + for (i = 0; i < 2; i++) { rdev->irq.crtc_vblank_int[i] = false; - for (i = 0; i < 6; i++) - rdev->irq.hpd[i] = false; + } radeon_irq_set(rdev); /* Clear bits */ radeon_irq_process(rdev); @@ -96,29 +95,28 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev) } /* Disable *all* interrupts */ rdev->irq.sw_int = false; - for (i = 0; i < rdev->num_crtc; i++) + for (i = 0; i < 2; i++) { rdev->irq.crtc_vblank_int[i] = false; - for (i = 0; i < 6; i++) rdev->irq.hpd[i] = false; + } radeon_irq_set(rdev); } int radeon_irq_kms_init(struct radeon_device *rdev) { int r = 0; + int num_crtc = 2; + if (rdev->flags & RADEON_SINGLE_CRTC) + num_crtc = 1; spin_lock_init(&rdev->irq.sw_lock); - r = drm_vblank_init(rdev->ddev, rdev->num_crtc); + r = drm_vblank_init(rdev->ddev, num_crtc); if (r) { return r; } /* enable msi */ rdev->msi_enabled = 0; - /* MSIs don't seem to work reliably on all IGP - * chips. Disable MSI on them for now. - */ - if ((rdev->family >= CHIP_RV380) && - (!(rdev->flags & RADEON_IS_IGP))) { + if (rdev->family >= CHIP_RV380) { int ret = pci_enable_msi(rdev->pdev); if (!ret) { rdev->msi_enabled = 1; diff --git a/trunk/drivers/gpu/drm/radeon/radeon_kms.c b/trunk/drivers/gpu/drm/radeon/radeon_kms.c index d3657dcfdd26..20ec276e7596 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_kms.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_kms.c @@ -31,7 +31,6 @@ #include "radeon_drm.h" #include -#include int radeon_driver_unload_kms(struct drm_device *dev) { diff --git a/trunk/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/trunk/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 88865e38fe30..df23d6a01d02 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -603,10 +603,6 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod ? RADEON_CRTC2_INTERLACE_EN : 0)); - /* rs4xx chips seem to like to have the crtc enabled when the timing is set */ - if ((rdev->family == CHIP_RS400) || (rdev->family == CHIP_RS480)) - crtc2_gen_cntl |= RADEON_CRTC2_EN; - disp2_merge_cntl = RREG32(RADEON_DISP2_MERGE_CNTL); disp2_merge_cntl &= ~RADEON_DISP2_RGB_OFFSET_EN; @@ -634,10 +630,6 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod ? RADEON_CRTC_INTERLACE_EN : 0)); - /* rs4xx chips seem to like to have the crtc enabled when the timing is set */ - if ((rdev->family == CHIP_RS400) || (rdev->family == CHIP_RS480)) - crtc_gen_cntl |= RADEON_CRTC_EN; - crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); crtc_ext_cntl |= (RADEON_XCRT_CNT_EN | RADEON_CRTC_VSYNC_DIS | diff --git a/trunk/drivers/gpu/drm/radeon/radeon_legacy_tv.c b/trunk/drivers/gpu/drm/radeon/radeon_legacy_tv.c index f2ed27c8055b..417684daef4c 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_legacy_tv.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_legacy_tv.c @@ -57,10 +57,6 @@ #define NTSC_TV_PLL_N_14 693 #define NTSC_TV_PLL_P_14 7 -#define PAL_TV_PLL_M_14 19 -#define PAL_TV_PLL_N_14 353 -#define PAL_TV_PLL_P_14 5 - #define VERT_LEAD_IN_LINES 2 #define FRAC_BITS 0xe #define FRAC_MASK 0x3fff @@ -209,24 +205,9 @@ static const struct radeon_tv_mode_constants available_tv_modes[] = { 630627, /* defRestart */ 347, /* crtcPLL_N */ 14, /* crtcPLL_M */ - 8, /* crtcPLL_postDiv */ + 8, /* crtcPLL_postDiv */ 1022, /* pixToTV */ }, - { /* PAL timing for 14 Mhz ref clk */ - 800, /* horResolution */ - 600, /* verResolution */ - TV_STD_PAL, /* standard */ - 1131, /* horTotal */ - 742, /* verTotal */ - 813, /* horStart */ - 840, /* horSyncStart */ - 633, /* verSyncStart */ - 708369, /* defRestart */ - 211, /* crtcPLL_N */ - 9, /* crtcPLL_M */ - 8, /* crtcPLL_postDiv */ - 759, /* pixToTV */ - }, }; #define N_AVAILABLE_MODES ARRAY_SIZE(available_tv_modes) @@ -261,7 +242,7 @@ static const struct radeon_tv_mode_constants *radeon_legacy_tv_get_std_mode(stru if (pll->reference_freq == 2700) const_ptr = &available_tv_modes[1]; else - const_ptr = &available_tv_modes[3]; + const_ptr = &available_tv_modes[1]; /* FIX ME */ } return const_ptr; } @@ -704,9 +685,9 @@ void radeon_legacy_tv_mode_set(struct drm_encoder *encoder, n = PAL_TV_PLL_N_27; p = PAL_TV_PLL_P_27; } else { - m = PAL_TV_PLL_M_14; - n = PAL_TV_PLL_N_14; - p = PAL_TV_PLL_P_14; + m = PAL_TV_PLL_M_27; + n = PAL_TV_PLL_N_27; + p = PAL_TV_PLL_P_27; } } diff --git a/trunk/drivers/gpu/drm/radeon/radeon_mode.h b/trunk/drivers/gpu/drm/radeon/radeon_mode.h index 0b8e32776b10..1702b820aa4d 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_mode.h +++ b/trunk/drivers/gpu/drm/radeon/radeon_mode.h @@ -129,7 +129,6 @@ struct radeon_tmds_pll { #define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10) #define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11) #define RADEON_PLL_USE_POST_DIV (1 << 12) -#define RADEON_PLL_IS_LCD (1 << 13) /* pll algo */ enum radeon_pll_algo { @@ -150,8 +149,6 @@ struct radeon_pll { uint32_t pll_in_max; uint32_t pll_out_min; uint32_t pll_out_max; - uint32_t lcd_pll_out_min; - uint32_t lcd_pll_out_max; uint32_t best_vco; /* divider limits */ @@ -173,12 +170,17 @@ struct radeon_pll { enum radeon_pll_algo algo; }; +struct i2c_algo_radeon_data { + struct i2c_adapter bit_adapter; + struct i2c_algo_bit_data bit_data; +}; + struct radeon_i2c_chan { struct i2c_adapter adapter; struct drm_device *dev; union { - struct i2c_algo_bit_data bit; struct i2c_algo_dp_aux_data dp; + struct i2c_algo_radeon_data radeon; } algo; struct radeon_i2c_bus_rec rec; }; @@ -340,7 +342,6 @@ struct radeon_encoder { struct drm_display_mode native_mode; void *enc_priv; int hdmi_offset; - int hdmi_config_offset; int hdmi_audio_workaround; int hdmi_buffer_status; }; @@ -430,6 +431,7 @@ extern struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, struct radeon_i2c_bus_rec *rec, const char *name); extern void radeon_i2c_destroy(struct radeon_i2c_chan *i2c); +extern void radeon_i2c_destroy_dp(struct radeon_i2c_chan *i2c); extern void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus, u8 slave_addr, u8 addr, diff --git a/trunk/drivers/gpu/drm/radeon/radeon_object.c b/trunk/drivers/gpu/drm/radeon/radeon_object.c index 122774742bd5..fc9d00ac6b15 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_object.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_object.c @@ -30,7 +30,6 @@ * Dave Airlie */ #include -#include #include #include "radeon_drm.h" #include "radeon.h" @@ -186,10 +185,8 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr) return 0; } radeon_ttm_placement_from_domain(bo, domain); - if (domain == RADEON_GEM_DOMAIN_VRAM) { - /* force to pin into visible video ram */ - bo->placement.lpfn = bo->rdev->mc.visible_vram_size >> PAGE_SHIFT; - } + /* force to pin into visible video ram */ + bo->placement.lpfn = bo->rdev->mc.visible_vram_size >> PAGE_SHIFT; for (i = 0; i < bo->placement.num_placement; i++) bo->placements[i] |= TTM_PL_FLAG_NO_EVICT; r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); diff --git a/trunk/drivers/gpu/drm/radeon/radeon_pm.c b/trunk/drivers/gpu/drm/radeon/radeon_pm.c index a4b57493aa78..d4d1c39a0e99 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_pm.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_pm.c @@ -28,7 +28,6 @@ #define RADEON_RECLOCK_DELAY_MS 200 #define RADEON_WAIT_VBLANK_TIMEOUT 200 -static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish); static void radeon_pm_set_clocks_locked(struct radeon_device *rdev); static void radeon_pm_set_clocks(struct radeon_device *rdev); static void radeon_pm_idle_work_handler(struct work_struct *work); @@ -180,16 +179,6 @@ static void radeon_get_power_state(struct radeon_device *rdev, rdev->pm.requested_power_state->non_clock_info.pcie_lanes); } -static inline void radeon_sync_with_vblank(struct radeon_device *rdev) -{ - if (rdev->pm.active_crtcs) { - rdev->pm.vblank_sync = false; - wait_event_timeout( - rdev->irq.vblank_queue, rdev->pm.vblank_sync, - msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); - } -} - static void radeon_set_power_state(struct radeon_device *rdev) { /* if *_clock_mode are the same, *_power_state are as well */ @@ -200,28 +189,11 @@ static void radeon_set_power_state(struct radeon_device *rdev) rdev->pm.requested_clock_mode->sclk, rdev->pm.requested_clock_mode->mclk, rdev->pm.requested_power_state->non_clock_info.pcie_lanes); - /* set pcie lanes */ - /* TODO */ - /* set voltage */ - /* TODO */ - /* set engine clock */ - radeon_sync_with_vblank(rdev); - radeon_pm_debug_check_in_vbl(rdev, false); radeon_set_engine_clock(rdev, rdev->pm.requested_clock_mode->sclk); - radeon_pm_debug_check_in_vbl(rdev, true); - -#if 0 /* set memory clock */ - if (rdev->asic->set_memory_clock) { - radeon_sync_with_vblank(rdev); - radeon_pm_debug_check_in_vbl(rdev, false); - radeon_set_memory_clock(rdev, rdev->pm.requested_clock_mode->mclk); - radeon_pm_debug_check_in_vbl(rdev, true); - } -#endif rdev->pm.current_power_state = rdev->pm.requested_power_state; rdev->pm.current_clock_mode = rdev->pm.requested_clock_mode; @@ -257,12 +229,6 @@ int radeon_pm_init(struct radeon_device *rdev) return 0; } -void radeon_pm_fini(struct radeon_device *rdev) -{ - if (rdev->pm.i2c_bus) - radeon_i2c_destroy(rdev->pm.i2c_bus); -} - void radeon_pm_compute_clocks(struct radeon_device *rdev) { struct drm_device *ddev = rdev->ddev; @@ -279,8 +245,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev) list_for_each_entry(connector, &ddev->mode_config.connector_list, head) { if (connector->encoder && - connector->encoder->crtc && - connector->dpms != DRM_MODE_DPMS_OFF) { + connector->dpms != DRM_MODE_DPMS_OFF) { radeon_crtc = to_radeon_crtc(connector->encoder->crtc); rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id); ++count; @@ -368,7 +333,10 @@ static void radeon_pm_set_clocks_locked(struct radeon_device *rdev) break; } + /* check if we are in vblank */ + radeon_pm_debug_check_in_vbl(rdev, false); radeon_set_power_state(rdev); + radeon_pm_debug_check_in_vbl(rdev, true); rdev->pm.planned_action = PM_ACTION_NONE; } @@ -385,7 +353,10 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) rdev->pm.req_vblank |= (1 << 1); drm_vblank_get(rdev->ddev, 1); } - radeon_pm_set_clocks_locked(rdev); + if (rdev->pm.active_crtcs) + wait_event_interruptible_timeout( + rdev->irq.vblank_queue, 0, + msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); if (rdev->pm.req_vblank & (1 << 0)) { rdev->pm.req_vblank &= ~(1 << 0); drm_vblank_put(rdev->ddev, 0); @@ -395,6 +366,7 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) drm_vblank_put(rdev->ddev, 1); } + radeon_pm_set_clocks_locked(rdev); mutex_unlock(&rdev->cp.mutex); } diff --git a/trunk/drivers/gpu/drm/radeon/radeon_reg.h b/trunk/drivers/gpu/drm/radeon/radeon_reg.h index eabbc9cf30a7..5c0dc082d330 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_reg.h +++ b/trunk/drivers/gpu/drm/radeon/radeon_reg.h @@ -346,7 +346,6 @@ # define RADEON_TVPLL_PWRMGT_OFF (1 << 30) # define RADEON_TVCLK_TURNOFF (1 << 31) #define RADEON_PLL_PWRMGT_CNTL 0x0015 /* PLL */ -# define RADEON_PM_MODE_SEL (1 << 13) # define RADEON_TCL_BYPASS_DISABLE (1 << 20) #define RADEON_CLR_CMP_CLR_3D 0x1a24 #define RADEON_CLR_CMP_CLR_DST 0x15c8 diff --git a/trunk/drivers/gpu/drm/radeon/radeon_ring.c b/trunk/drivers/gpu/drm/radeon/radeon_ring.c index f6e1e8d4d986..e50513a62735 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_ring.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_ring.c @@ -26,7 +26,6 @@ * Jerome Glisse */ #include -#include #include "drmP.h" #include "radeon_drm.h" #include "radeon_reg.h" diff --git a/trunk/drivers/gpu/drm/radeon/radeon_ttm.c b/trunk/drivers/gpu/drm/radeon/radeon_ttm.c index d031b6863082..43c5ab34b634 100644 --- a/trunk/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/trunk/drivers/gpu/drm/radeon/radeon_ttm.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "radeon_reg.h" #include "radeon.h" diff --git a/trunk/drivers/gpu/drm/radeon/reg_srcs/r600 b/trunk/drivers/gpu/drm/radeon/reg_srcs/r600 index af0da4ae3f55..8f414a5f520f 100644 --- a/trunk/drivers/gpu/drm/radeon/reg_srcs/r600 +++ b/trunk/drivers/gpu/drm/radeon/reg_srcs/r600 @@ -26,16 +26,20 @@ r600 0x9400 0x00028408 VGT_INDX_OFFSET 0x00028AA0 VGT_INSTANCE_STEP_RATE_0 0x00028AA4 VGT_INSTANCE_STEP_RATE_1 +0x000088C0 VGT_LAST_COPY_STATE 0x00028400 VGT_MAX_VTX_INDX +0x000088D8 VGT_MC_LAT_CNTL 0x00028404 VGT_MIN_VTX_INDX 0x00028A94 VGT_MULTI_PRIM_IB_RESET_EN 0x0002840C VGT_MULTI_PRIM_IB_RESET_INDX 0x00008970 VGT_NUM_INDICES 0x00008974 VGT_NUM_INSTANCES 0x00028A10 VGT_OUTPUT_PATH_CNTL +0x00028C5C VGT_OUT_DEALLOC_CNTL 0x00028A84 VGT_PRIMITIVEID_EN 0x00008958 VGT_PRIMITIVE_TYPE 0x00028AB4 VGT_REUSE_OFF +0x00028C58 VGT_VERTEX_REUSE_BLOCK_CNTL 0x00028AB8 VGT_VTX_CNT_EN 0x000088B0 VGT_VTX_VECT_EJECT_REG 0x00028810 PA_CL_CLIP_CNTL @@ -276,6 +280,7 @@ r600 0x9400 0x00028E00 PA_SU_POLY_OFFSET_FRONT_SCALE 0x00028814 PA_SU_SC_MODE_CNTL 0x00028C08 PA_SU_VTX_CNTL +0x00008C00 SQ_CONFIG 0x00008C04 SQ_GPR_RESOURCE_MGMT_1 0x00008C08 SQ_GPR_RESOURCE_MGMT_2 0x00008C10 SQ_STACK_RESOURCE_MGMT_1 @@ -315,6 +320,18 @@ r600 0x9400 0x000283FC SQ_VTX_SEMANTIC_31 0x000288E0 SQ_VTX_SEMANTIC_CLEAR 0x0003CFF4 SQ_VTX_START_INST_LOC +0x0003C000 SQ_TEX_SAMPLER_WORD0_0 +0x0003C004 SQ_TEX_SAMPLER_WORD1_0 +0x0003C008 SQ_TEX_SAMPLER_WORD2_0 +0x00030000 SQ_ALU_CONSTANT0_0 +0x00030004 SQ_ALU_CONSTANT1_0 +0x00030008 SQ_ALU_CONSTANT2_0 +0x0003000C SQ_ALU_CONSTANT3_0 +0x0003E380 SQ_BOOL_CONST_0 +0x0003E384 SQ_BOOL_CONST_1 +0x0003E388 SQ_BOOL_CONST_2 +0x0003E200 SQ_LOOP_CONST_0 +0x0003E200 SQ_LOOP_CONST_DX10_0 0x000281C0 SQ_ALU_CONST_BUFFER_SIZE_GS_0 0x000281C4 SQ_ALU_CONST_BUFFER_SIZE_GS_1 0x000281C8 SQ_ALU_CONST_BUFFER_SIZE_GS_2 @@ -363,6 +380,54 @@ r600 0x9400 0x000281B4 SQ_ALU_CONST_BUFFER_SIZE_VS_13 0x000281B8 SQ_ALU_CONST_BUFFER_SIZE_VS_14 0x000281BC SQ_ALU_CONST_BUFFER_SIZE_VS_15 +0x000289C0 SQ_ALU_CONST_CACHE_GS_0 +0x000289C4 SQ_ALU_CONST_CACHE_GS_1 +0x000289C8 SQ_ALU_CONST_CACHE_GS_2 +0x000289CC SQ_ALU_CONST_CACHE_GS_3 +0x000289D0 SQ_ALU_CONST_CACHE_GS_4 +0x000289D4 SQ_ALU_CONST_CACHE_GS_5 +0x000289D8 SQ_ALU_CONST_CACHE_GS_6 +0x000289DC SQ_ALU_CONST_CACHE_GS_7 +0x000289E0 SQ_ALU_CONST_CACHE_GS_8 +0x000289E4 SQ_ALU_CONST_CACHE_GS_9 +0x000289E8 SQ_ALU_CONST_CACHE_GS_10 +0x000289EC SQ_ALU_CONST_CACHE_GS_11 +0x000289F0 SQ_ALU_CONST_CACHE_GS_12 +0x000289F4 SQ_ALU_CONST_CACHE_GS_13 +0x000289F8 SQ_ALU_CONST_CACHE_GS_14 +0x000289FC SQ_ALU_CONST_CACHE_GS_15 +0x00028940 SQ_ALU_CONST_CACHE_PS_0 +0x00028944 SQ_ALU_CONST_CACHE_PS_1 +0x00028948 SQ_ALU_CONST_CACHE_PS_2 +0x0002894C SQ_ALU_CONST_CACHE_PS_3 +0x00028950 SQ_ALU_CONST_CACHE_PS_4 +0x00028954 SQ_ALU_CONST_CACHE_PS_5 +0x00028958 SQ_ALU_CONST_CACHE_PS_6 +0x0002895C SQ_ALU_CONST_CACHE_PS_7 +0x00028960 SQ_ALU_CONST_CACHE_PS_8 +0x00028964 SQ_ALU_CONST_CACHE_PS_9 +0x00028968 SQ_ALU_CONST_CACHE_PS_10 +0x0002896C SQ_ALU_CONST_CACHE_PS_11 +0x00028970 SQ_ALU_CONST_CACHE_PS_12 +0x00028974 SQ_ALU_CONST_CACHE_PS_13 +0x00028978 SQ_ALU_CONST_CACHE_PS_14 +0x0002897C SQ_ALU_CONST_CACHE_PS_15 +0x00028980 SQ_ALU_CONST_CACHE_VS_0 +0x00028984 SQ_ALU_CONST_CACHE_VS_1 +0x00028988 SQ_ALU_CONST_CACHE_VS_2 +0x0002898C SQ_ALU_CONST_CACHE_VS_3 +0x00028990 SQ_ALU_CONST_CACHE_VS_4 +0x00028994 SQ_ALU_CONST_CACHE_VS_5 +0x00028998 SQ_ALU_CONST_CACHE_VS_6 +0x0002899C SQ_ALU_CONST_CACHE_VS_7 +0x000289A0 SQ_ALU_CONST_CACHE_VS_8 +0x000289A4 SQ_ALU_CONST_CACHE_VS_9 +0x000289A8 SQ_ALU_CONST_CACHE_VS_10 +0x000289AC SQ_ALU_CONST_CACHE_VS_11 +0x000289B0 SQ_ALU_CONST_CACHE_VS_12 +0x000289B4 SQ_ALU_CONST_CACHE_VS_13 +0x000289B8 SQ_ALU_CONST_CACHE_VS_14 +0x000289BC SQ_ALU_CONST_CACHE_VS_15 0x000288D8 SQ_PGM_CF_OFFSET_ES 0x000288DC SQ_PGM_CF_OFFSET_FS 0x000288D4 SQ_PGM_CF_OFFSET_GS @@ -429,7 +494,12 @@ r600 0x9400 0x00028438 SX_ALPHA_REF 0x00028410 SX_ALPHA_TEST_CONTROL 0x00028350 SX_MISC +0x0000A020 SMX_DC_CTL0 +0x0000A024 SMX_DC_CTL1 +0x0000A028 SMX_DC_CTL2 +0x00009608 TC_CNTL 0x00009604 TC_INVALIDATE +0x00009490 TD_CNTL 0x00009400 TD_FILTER4 0x00009404 TD_FILTER4_1 0x00009408 TD_FILTER4_2 @@ -754,9 +824,14 @@ r600 0x9400 0x00028428 CB_FOG_GREEN 0x00028424 CB_FOG_RED 0x00008040 WAIT_UNTIL +0x00008950 CC_GC_SHADER_PIPE_CONFIG +0x00008954 GC_USER_SHADER_PIPE_CONFIG 0x00009714 VC_ENHANCE 0x00009830 DB_DEBUG 0x00009838 DB_WATERMARKS 0x00028D28 DB_SRESULTS_COMPARE_STATE0 0x00028D44 DB_ALPHA_TO_MASK +0x00009504 TA_CNTL 0x00009700 VC_CNTL +0x00009718 VC_CONFIG +0x0000A02C SMX_DC_MC_INTF_CTL diff --git a/trunk/drivers/gpu/drm/radeon/rs400.c b/trunk/drivers/gpu/drm/radeon/rs400.c index 1a41cb268b72..626d51891ee9 100644 --- a/trunk/drivers/gpu/drm/radeon/rs400.c +++ b/trunk/drivers/gpu/drm/radeon/rs400.c @@ -26,10 +26,8 @@ * Jerome Glisse */ #include -#include #include #include "radeon.h" -#include "radeon_asic.h" #include "rs400d.h" /* This files gather functions specifics to : rs400,rs480 */ @@ -204,9 +202,9 @@ void rs400_gart_disable(struct radeon_device *rdev) void rs400_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); rs400_gart_disable(rdev); radeon_gart_table_ram_free(rdev); + radeon_gart_fini(rdev); } int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) @@ -266,7 +264,6 @@ void rs400_mc_init(struct radeon_device *rdev) base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; radeon_vram_location(rdev, &rdev->mc, base); radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); } uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg) @@ -391,8 +388,6 @@ static int rs400_startup(struct radeon_device *rdev) { int r; - r100_set_common_regs(rdev); - rs400_mc_program(rdev); /* Resume clock */ r300_clock_startup(rdev); @@ -458,7 +453,6 @@ int rs400_suspend(struct radeon_device *rdev) void rs400_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/rs600.c b/trunk/drivers/gpu/drm/radeon/rs600.c index abf824c2123d..47f046b78c6b 100644 --- a/trunk/drivers/gpu/drm/radeon/rs600.c +++ b/trunk/drivers/gpu/drm/radeon/rs600.c @@ -37,7 +37,6 @@ */ #include "drmP.h" #include "radeon.h" -#include "radeon_asic.h" #include "atom.h" #include "rs600d.h" @@ -268,9 +267,9 @@ void rs600_gart_disable(struct radeon_device *rdev) void rs600_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); rs600_gart_disable(rdev); radeon_gart_table_vram_free(rdev); + radeon_gart_fini(rdev); } #define R600_PTE_VALID (1 << 0) @@ -393,12 +392,10 @@ int rs600_irq_process(struct radeon_device *rdev) /* Vertical blank interrupts */ if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) { drm_handle_vblank(rdev->ddev, 0); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); } if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) { drm_handle_vblank(rdev->ddev, 1); - rdev->pm.vblank_sync = true; wake_up(&rdev->irq.vblank_queue); } if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(r500_disp_int)) { @@ -475,38 +472,13 @@ void rs600_mc_init(struct radeon_device *rdev) rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); base = RREG32_MC(R_000004_MC_FB_LOCATION); base = G_000004_MC_FB_START(base) << 16; - rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); radeon_vram_location(rdev, &rdev->mc, base); radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); } void rs600_bandwidth_update(struct radeon_device *rdev) { - struct drm_display_mode *mode0 = NULL; - struct drm_display_mode *mode1 = NULL; - u32 d1mode_priority_a_cnt, d2mode_priority_a_cnt; - /* FIXME: implement full support */ - - radeon_update_display_priority(rdev); - - if (rdev->mode_info.crtcs[0]->base.enabled) - mode0 = &rdev->mode_info.crtcs[0]->base.mode; - if (rdev->mode_info.crtcs[1]->base.enabled) - mode1 = &rdev->mode_info.crtcs[1]->base.mode; - - rs690_line_buffer_adjust(rdev, mode0, mode1); - - if (rdev->disp_priority == 2) { - d1mode_priority_a_cnt = RREG32(R_006548_D1MODE_PRIORITY_A_CNT); - d2mode_priority_a_cnt = RREG32(R_006D48_D2MODE_PRIORITY_A_CNT); - d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); - d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); - WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); - WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); - WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); - WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); - } + /* FIXME: implement, should this be like rs690 ? */ } uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg) @@ -626,7 +598,6 @@ int rs600_suspend(struct radeon_device *rdev) void rs600_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/rs600d.h b/trunk/drivers/gpu/drm/radeon/rs600d.h index e52d2695510b..c1c8f5885cbb 100644 --- a/trunk/drivers/gpu/drm/radeon/rs600d.h +++ b/trunk/drivers/gpu/drm/radeon/rs600d.h @@ -535,57 +535,4 @@ #define G_00016C_INVALIDATE_L1_TLB(x) (((x) >> 20) & 0x1) #define C_00016C_INVALIDATE_L1_TLB 0xFFEFFFFF -#define R_006548_D1MODE_PRIORITY_A_CNT 0x006548 -#define S_006548_D1MODE_PRIORITY_MARK_A(x) (((x) & 0x7FFF) << 0) -#define G_006548_D1MODE_PRIORITY_MARK_A(x) (((x) >> 0) & 0x7FFF) -#define C_006548_D1MODE_PRIORITY_MARK_A 0xFFFF8000 -#define S_006548_D1MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) -#define G_006548_D1MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) -#define C_006548_D1MODE_PRIORITY_A_OFF 0xFFFEFFFF -#define S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) -#define G_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) -#define C_006548_D1MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF -#define S_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) -#define G_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) -#define C_006548_D1MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF -#define R_00654C_D1MODE_PRIORITY_B_CNT 0x00654C -#define S_00654C_D1MODE_PRIORITY_MARK_B(x) (((x) & 0x7FFF) << 0) -#define G_00654C_D1MODE_PRIORITY_MARK_B(x) (((x) >> 0) & 0x7FFF) -#define C_00654C_D1MODE_PRIORITY_MARK_B 0xFFFF8000 -#define S_00654C_D1MODE_PRIORITY_B_OFF(x) (((x) & 0x1) << 16) -#define G_00654C_D1MODE_PRIORITY_B_OFF(x) (((x) >> 16) & 0x1) -#define C_00654C_D1MODE_PRIORITY_B_OFF 0xFFFEFFFF -#define S_00654C_D1MODE_PRIORITY_B_ALWAYS_ON(x) (((x) & 0x1) << 20) -#define G_00654C_D1MODE_PRIORITY_B_ALWAYS_ON(x) (((x) >> 20) & 0x1) -#define C_00654C_D1MODE_PRIORITY_B_ALWAYS_ON 0xFFEFFFFF -#define S_00654C_D1MODE_PRIORITY_B_FORCE_MASK(x) (((x) & 0x1) << 24) -#define G_00654C_D1MODE_PRIORITY_B_FORCE_MASK(x) (((x) >> 24) & 0x1) -#define C_00654C_D1MODE_PRIORITY_B_FORCE_MASK 0xFEFFFFFF -#define R_006D48_D2MODE_PRIORITY_A_CNT 0x006D48 -#define S_006D48_D2MODE_PRIORITY_MARK_A(x) (((x) & 0x7FFF) << 0) -#define G_006D48_D2MODE_PRIORITY_MARK_A(x) (((x) >> 0) & 0x7FFF) -#define C_006D48_D2MODE_PRIORITY_MARK_A 0xFFFF8000 -#define S_006D48_D2MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) -#define G_006D48_D2MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) -#define C_006D48_D2MODE_PRIORITY_A_OFF 0xFFFEFFFF -#define S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) -#define G_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) -#define C_006D48_D2MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF -#define S_006D48_D2MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) -#define G_006D48_D2MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) -#define C_006D48_D2MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF -#define R_006D4C_D2MODE_PRIORITY_B_CNT 0x006D4C -#define S_006D4C_D2MODE_PRIORITY_MARK_B(x) (((x) & 0x7FFF) << 0) -#define G_006D4C_D2MODE_PRIORITY_MARK_B(x) (((x) >> 0) & 0x7FFF) -#define C_006D4C_D2MODE_PRIORITY_MARK_B 0xFFFF8000 -#define S_006D4C_D2MODE_PRIORITY_B_OFF(x) (((x) & 0x1) << 16) -#define G_006D4C_D2MODE_PRIORITY_B_OFF(x) (((x) >> 16) & 0x1) -#define C_006D4C_D2MODE_PRIORITY_B_OFF 0xFFFEFFFF -#define S_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON(x) (((x) & 0x1) << 20) -#define G_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON(x) (((x) >> 20) & 0x1) -#define C_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON 0xFFEFFFFF -#define S_006D4C_D2MODE_PRIORITY_B_FORCE_MASK(x) (((x) & 0x1) << 24) -#define G_006D4C_D2MODE_PRIORITY_B_FORCE_MASK(x) (((x) >> 24) & 0x1) -#define C_006D4C_D2MODE_PRIORITY_B_FORCE_MASK 0xFEFFFFFF - #endif diff --git a/trunk/drivers/gpu/drm/radeon/rs690.c b/trunk/drivers/gpu/drm/radeon/rs690.c index bbf3da790fd5..83b9174f76f2 100644 --- a/trunk/drivers/gpu/drm/radeon/rs690.c +++ b/trunk/drivers/gpu/drm/radeon/rs690.c @@ -27,7 +27,6 @@ */ #include "drmP.h" #include "radeon.h" -#include "radeon_asic.h" #include "atom.h" #include "rs690d.h" @@ -58,57 +57,42 @@ static void rs690_gpu_init(struct radeon_device *rdev) } } -union igp_info { - struct _ATOM_INTEGRATED_SYSTEM_INFO info; - struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 info_v2; -}; - void rs690_pm_info(struct radeon_device *rdev) { int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo); - union igp_info *info; + struct _ATOM_INTEGRATED_SYSTEM_INFO *info; + struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *info_v2; + void *ptr; uint16_t data_offset; uint8_t frev, crev; fixed20_12 tmp; - if (atom_parse_data_header(rdev->mode_info.atom_context, index, NULL, - &frev, &crev, &data_offset)) { - info = (union igp_info *)(rdev->mode_info.atom_context->bios + data_offset); - - /* Get various system informations from bios */ - switch (crev) { - case 1: - tmp.full = rfixed_const(100); - rdev->pm.igp_sideport_mclk.full = rfixed_const(info->info.ulBootUpMemoryClock); - rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); - rdev->pm.igp_system_mclk.full = rfixed_const(le16_to_cpu(info->info.usK8MemoryClock)); - rdev->pm.igp_ht_link_clk.full = rfixed_const(le16_to_cpu(info->info.usFSBClock)); - rdev->pm.igp_ht_link_width.full = rfixed_const(info->info.ucHTLinkWidth); - break; - case 2: - tmp.full = rfixed_const(100); - rdev->pm.igp_sideport_mclk.full = rfixed_const(info->info_v2.ulBootUpSidePortClock); - rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); - rdev->pm.igp_system_mclk.full = rfixed_const(info->info_v2.ulBootUpUMAClock); - rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); - rdev->pm.igp_ht_link_clk.full = rfixed_const(info->info_v2.ulHTLinkFreq); - rdev->pm.igp_ht_link_clk.full = rfixed_div(rdev->pm.igp_ht_link_clk, tmp); - rdev->pm.igp_ht_link_width.full = rfixed_const(le16_to_cpu(info->info_v2.usMinHTLinkWidth)); - break; - default: - tmp.full = rfixed_const(100); - /* We assume the slower possible clock ie worst case */ - /* DDR 333Mhz */ - rdev->pm.igp_sideport_mclk.full = rfixed_const(333); - /* FIXME: system clock ? */ - rdev->pm.igp_system_mclk.full = rfixed_const(100); - rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); - rdev->pm.igp_ht_link_clk.full = rfixed_const(200); - rdev->pm.igp_ht_link_width.full = rfixed_const(8); - DRM_ERROR("No integrated system info for your GPU, using safe default\n"); - break; - } - } else { + atom_parse_data_header(rdev->mode_info.atom_context, index, NULL, + &frev, &crev, &data_offset); + ptr = rdev->mode_info.atom_context->bios + data_offset; + info = (struct _ATOM_INTEGRATED_SYSTEM_INFO *)ptr; + info_v2 = (struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *)ptr; + /* Get various system informations from bios */ + switch (crev) { + case 1: + tmp.full = rfixed_const(100); + rdev->pm.igp_sideport_mclk.full = rfixed_const(info->ulBootUpMemoryClock); + rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); + rdev->pm.igp_system_mclk.full = rfixed_const(le16_to_cpu(info->usK8MemoryClock)); + rdev->pm.igp_ht_link_clk.full = rfixed_const(le16_to_cpu(info->usFSBClock)); + rdev->pm.igp_ht_link_width.full = rfixed_const(info->ucHTLinkWidth); + break; + case 2: + tmp.full = rfixed_const(100); + rdev->pm.igp_sideport_mclk.full = rfixed_const(info_v2->ulBootUpSidePortClock); + rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); + rdev->pm.igp_system_mclk.full = rfixed_const(info_v2->ulBootUpUMAClock); + rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); + rdev->pm.igp_ht_link_clk.full = rfixed_const(info_v2->ulHTLinkFreq); + rdev->pm.igp_ht_link_clk.full = rfixed_div(rdev->pm.igp_ht_link_clk, tmp); + rdev->pm.igp_ht_link_width.full = rfixed_const(le16_to_cpu(info_v2->usMinHTLinkWidth)); + break; + default: tmp.full = rfixed_const(100); /* We assume the slower possible clock ie worst case */ /* DDR 333Mhz */ @@ -119,6 +103,7 @@ void rs690_pm_info(struct radeon_device *rdev) rdev->pm.igp_ht_link_clk.full = rfixed_const(200); rdev->pm.igp_ht_link_width.full = rfixed_const(8); DRM_ERROR("No integrated system info for your GPU, using safe default\n"); + break; } /* Compute various bandwidth */ /* k8_bandwidth = (memory_clk / 2) * 2 * 8 * 0.5 = memory_clk * 4 */ @@ -146,6 +131,7 @@ void rs690_pm_info(struct radeon_device *rdev) void rs690_mc_init(struct radeon_device *rdev) { + fixed20_12 a; u64 base; rs400_gart_adjust_size(rdev); @@ -159,10 +145,18 @@ void rs690_mc_init(struct radeon_device *rdev) base = RREG32_MC(R_000100_MCCFG_FB_LOCATION); base = G_000100_MC_FB_START(base) << 16; rs690_pm_info(rdev); + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); + a.full = rfixed_const(16); + /* core_bandwidth = sclk(Mhz) * 16 */ + rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a); rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); radeon_vram_location(rdev, &rdev->mc, base); radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); } void rs690_line_buffer_adjust(struct radeon_device *rdev, @@ -400,12 +394,10 @@ void rs690_bandwidth_update(struct radeon_device *rdev) struct drm_display_mode *mode1 = NULL; struct rs690_watermark wm0; struct rs690_watermark wm1; - u32 tmp, d1mode_priority_a_cnt, d2mode_priority_a_cnt; + u32 tmp; fixed20_12 priority_mark02, priority_mark12, fill_rate; fixed20_12 a, b; - radeon_update_display_priority(rdev); - if (rdev->mode_info.crtcs[0]->base.enabled) mode0 = &rdev->mode_info.crtcs[0]->base.mode; if (rdev->mode_info.crtcs[1]->base.enabled) @@ -415,8 +407,7 @@ void rs690_bandwidth_update(struct radeon_device *rdev) * modes if the user specifies HIGH for displaypriority * option. */ - if ((rdev->disp_priority == 2) && - ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740))) { + if (rdev->disp_priority == 2) { tmp = RREG32_MC(R_000104_MC_INIT_MISC_LAT_TIMER); tmp &= C_000104_MC_DISP0R_INIT_LAT; tmp &= C_000104_MC_DISP1R_INIT_LAT; @@ -491,16 +482,10 @@ void rs690_bandwidth_update(struct radeon_device *rdev) priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; - d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); - d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); - if (rdev->disp_priority == 2) { - d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); - d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); - } - WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); - WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); - WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); - WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); + WREG32(R_006548_D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); + WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); + WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); + WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); } else if (mode0) { if (rfixed_trunc(wm0.dbpp) > 64) a.full = rfixed_mul(wm0.dbpp, wm0.num_line_pair); @@ -527,11 +512,8 @@ void rs690_bandwidth_update(struct radeon_device *rdev) priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; - d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); - if (rdev->disp_priority == 2) - d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); - WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); - WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); + WREG32(R_006548_D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); + WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, S_006D48_D2MODE_PRIORITY_A_OFF(1)); WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, @@ -562,15 +544,12 @@ void rs690_bandwidth_update(struct radeon_device *rdev) priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; - d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); - if (rdev->disp_priority == 2) - d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); WREG32(R_006548_D1MODE_PRIORITY_A_CNT, S_006548_D1MODE_PRIORITY_A_OFF(1)); WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, S_00654C_D1MODE_PRIORITY_B_OFF(1)); - WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); - WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); + WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); + WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); } } @@ -678,7 +657,6 @@ int rs690_suspend(struct radeon_device *rdev) void rs690_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); diff --git a/trunk/drivers/gpu/drm/radeon/rs690d.h b/trunk/drivers/gpu/drm/radeon/rs690d.h index 36e6398a98ae..62d31e7a897f 100644 --- a/trunk/drivers/gpu/drm/radeon/rs690d.h +++ b/trunk/drivers/gpu/drm/radeon/rs690d.h @@ -182,9 +182,6 @@ #define S_006548_D1MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) #define G_006548_D1MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) #define C_006548_D1MODE_PRIORITY_A_OFF 0xFFFEFFFF -#define S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) -#define G_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) -#define C_006548_D1MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF #define S_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) #define G_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) #define C_006548_D1MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF diff --git a/trunk/drivers/gpu/drm/radeon/rv515.c b/trunk/drivers/gpu/drm/radeon/rv515.c index 9035121f4b58..bea747da123f 100644 --- a/trunk/drivers/gpu/drm/radeon/rv515.c +++ b/trunk/drivers/gpu/drm/radeon/rv515.c @@ -26,11 +26,9 @@ * Jerome Glisse */ #include -#include #include "drmP.h" #include "rv515d.h" #include "radeon.h" -#include "radeon_asic.h" #include "atom.h" #include "rv515_reg_safe.h" @@ -281,13 +279,19 @@ static void rv515_vram_get_type(struct radeon_device *rdev) void rv515_mc_init(struct radeon_device *rdev) { + fixed20_12 a; rv515_vram_get_type(rdev); r100_vram_init_sizes(rdev); radeon_vram_location(rdev, &rdev->mc, 0); if (!(rdev->flags & RADEON_IS_AGP)) radeon_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); } uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg) @@ -535,7 +539,6 @@ void rv515_set_safe_registers(struct radeon_device *rdev) void rv515_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r100_cp_fini(rdev); r100_wb_fini(rdev); r100_ib_fini(rdev); @@ -1017,7 +1020,7 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) struct drm_display_mode *mode1 = NULL; struct rv515_watermark wm0; struct rv515_watermark wm1; - u32 tmp, d1mode_priority_a_cnt, d2mode_priority_a_cnt; + u32 tmp; fixed20_12 priority_mark02, priority_mark12, fill_rate; fixed20_12 a, b; @@ -1085,16 +1088,10 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; - d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); - d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); - if (rdev->disp_priority == 2) { - d1mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; - d2mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; - } - WREG32(D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); - WREG32(D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); - WREG32(D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); - WREG32(D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); + WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); + WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); + WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); + WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); } else if (mode0) { if (rfixed_trunc(wm0.dbpp) > 64) a.full = rfixed_div(wm0.dbpp, wm0.num_line_pair); @@ -1121,11 +1118,8 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) priority_mark02.full = 0; if (wm0.priority_mark_max.full > priority_mark02.full) priority_mark02.full = wm0.priority_mark_max.full; - d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); - if (rdev->disp_priority == 2) - d1mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; - WREG32(D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); - WREG32(D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); + WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); + WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); WREG32(D2MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); WREG32(D2MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); } else { @@ -1154,13 +1148,10 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) priority_mark12.full = 0; if (wm1.priority_mark_max.full > priority_mark12.full) priority_mark12.full = wm1.priority_mark_max.full; - d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); - if (rdev->disp_priority == 2) - d2mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; WREG32(D1MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); WREG32(D1MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); - WREG32(D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); - WREG32(D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); + WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); + WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); } } @@ -1170,8 +1161,6 @@ void rv515_bandwidth_update(struct radeon_device *rdev) struct drm_display_mode *mode0 = NULL; struct drm_display_mode *mode1 = NULL; - radeon_update_display_priority(rdev); - if (rdev->mode_info.crtcs[0]->base.enabled) mode0 = &rdev->mode_info.crtcs[0]->base.mode; if (rdev->mode_info.crtcs[1]->base.enabled) @@ -1181,8 +1170,7 @@ void rv515_bandwidth_update(struct radeon_device *rdev) * modes if the user specifies HIGH for displaypriority * option. */ - if ((rdev->disp_priority == 2) && - (rdev->family == CHIP_RV515)) { + if (rdev->disp_priority == 2) { tmp = RREG32_MC(MC_MISC_LAT_TIMER); tmp &= ~MC_DISP1R_INIT_LAT_MASK; tmp &= ~MC_DISP0R_INIT_LAT_MASK; diff --git a/trunk/drivers/gpu/drm/radeon/rv770.c b/trunk/drivers/gpu/drm/radeon/rv770.c index 97958a64df1a..37887dee12af 100644 --- a/trunk/drivers/gpu/drm/radeon/rv770.c +++ b/trunk/drivers/gpu/drm/radeon/rv770.c @@ -27,10 +27,8 @@ */ #include #include -#include #include "drmP.h" #include "radeon.h" -#include "radeon_asic.h" #include "radeon_drm.h" #include "rv770d.h" #include "atom.h" @@ -127,9 +125,9 @@ void rv770_pcie_gart_disable(struct radeon_device *rdev) void rv770_pcie_gart_fini(struct radeon_device *rdev) { - radeon_gart_fini(rdev); rv770_pcie_gart_disable(rdev); radeon_gart_table_vram_free(rdev); + radeon_gart_fini(rdev); } @@ -649,13 +647,10 @@ static void rv770_gpu_init(struct radeon_device *rdev) WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); - WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); WREG32(CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); WREG32(CGTS_SYS_TCC_DISABLE, 0); WREG32(CGTS_TCC_DISABLE, 0); - WREG32(CGTS_USER_SYS_TCC_DISABLE, 0); - WREG32(CGTS_USER_TCC_DISABLE, 0); num_qd_pipes = R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); @@ -869,6 +864,7 @@ static void rv770_gpu_init(struct radeon_device *rdev) int rv770_mc_init(struct radeon_device *rdev) { + fixed20_12 a; u32 tmp; int chansize, numchan; @@ -912,8 +908,12 @@ int rv770_mc_init(struct radeon_device *rdev) rdev->mc.real_vram_size = rdev->mc.aper_size; } r600_vram_gtt_location(rdev, &rdev->mc); - radeon_update_bandwidth_info(rdev); - + /* FIXME: we should enforce default clock in case GPU is not in + * default setup + */ + a.full = rfixed_const(100); + rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); + rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); return 0; } @@ -1013,13 +1013,6 @@ int rv770_resume(struct radeon_device *rdev) DRM_ERROR("radeon: failled testing IB (%d).\n", r); return r; } - - r = r600_audio_init(rdev); - if (r) { - dev_err(rdev->dev, "radeon: audio init failed\n"); - return r; - } - return r; } @@ -1028,7 +1021,6 @@ int rv770_suspend(struct radeon_device *rdev) { int r; - r600_audio_fini(rdev); /* FIXME: we should wait for ring to be empty */ r700_cp_stop(rdev); rdev->cp.ready = false; @@ -1152,19 +1144,11 @@ int rv770_init(struct radeon_device *rdev) } } } - - r = r600_audio_init(rdev); - if (r) { - dev_err(rdev->dev, "radeon: audio init failed\n"); - return r; - } - return 0; } void rv770_fini(struct radeon_device *rdev) { - radeon_pm_fini(rdev); r600_blit_fini(rdev); r600_cp_fini(rdev); r600_wb_fini(rdev); diff --git a/trunk/drivers/gpu/drm/ttm/ttm_agp_backend.c b/trunk/drivers/gpu/drm/ttm/ttm_agp_backend.c index 4bf69c404491..4648ed2f0143 100644 --- a/trunk/drivers/gpu/drm/ttm/ttm_agp_backend.c +++ b/trunk/drivers/gpu/drm/ttm/ttm_agp_backend.c @@ -35,7 +35,6 @@ #include "ttm/ttm_placement.h" #include #include -#include #include #include diff --git a/trunk/drivers/gpu/drm/ttm/ttm_bo.c b/trunk/drivers/gpu/drm/ttm/ttm_bo.c index dd47b2a9a791..89c38c49066f 100644 --- a/trunk/drivers/gpu/drm/ttm/ttm_bo.c +++ b/trunk/drivers/gpu/drm/ttm/ttm_bo.c @@ -1425,8 +1425,8 @@ int ttm_bo_global_init(struct ttm_global_reference *ref) atomic_set(&glob->bo_count, 0); - ret = kobject_init_and_add( - &glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects"); + kobject_init(&glob->kobj, &ttm_bo_glob_kobj_type); + ret = kobject_add(&glob->kobj, ttm_get_kobj(), "buffer_objects"); if (unlikely(ret != 0)) kobject_put(&glob->kobj); return ret; diff --git a/trunk/drivers/gpu/drm/ttm/ttm_bo_util.c b/trunk/drivers/gpu/drm/ttm/ttm_bo_util.c index d764e82e799b..5ca37a58a98c 100644 --- a/trunk/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/trunk/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/gpu/drm/ttm/ttm_memory.c b/trunk/drivers/gpu/drm/ttm/ttm_memory.c index 801b702566e6..eb143e04d402 100644 --- a/trunk/drivers/gpu/drm/ttm/ttm_memory.c +++ b/trunk/drivers/gpu/drm/ttm/ttm_memory.c @@ -32,7 +32,6 @@ #include #include #include -#include #define TTM_MEMORY_ALLOC_RETRIES 4 @@ -261,8 +260,8 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob, zone->used_mem = 0; zone->glob = glob; glob->zone_kernel = zone; - ret = kobject_init_and_add( - &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); + kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); + ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); if (unlikely(ret != 0)) { kobject_put(&zone->kobj); return ret; @@ -297,8 +296,8 @@ static int ttm_mem_init_highmem_zone(struct ttm_mem_global *glob, zone->used_mem = 0; zone->glob = glob; glob->zone_highmem = zone; - ret = kobject_init_and_add( - &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); + kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); + ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); if (unlikely(ret != 0)) { kobject_put(&zone->kobj); return ret; @@ -344,8 +343,8 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob, zone->used_mem = 0; zone->glob = glob; glob->zone_dma32 = zone; - ret = kobject_init_and_add( - &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); + kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); + ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); if (unlikely(ret != 0)) { kobject_put(&zone->kobj); return ret; @@ -366,8 +365,10 @@ int ttm_mem_global_init(struct ttm_mem_global *glob) glob->swap_queue = create_singlethread_workqueue("ttm_swap"); INIT_WORK(&glob->work, ttm_shrink_work); init_waitqueue_head(&glob->queue); - ret = kobject_init_and_add( - &glob->kobj, &ttm_mem_glob_kobj_type, ttm_get_kobj(), "memory_accounting"); + kobject_init(&glob->kobj, &ttm_mem_glob_kobj_type); + ret = kobject_add(&glob->kobj, + ttm_get_kobj(), + "memory_accounting"); if (unlikely(ret != 0)) { kobject_put(&glob->kobj); return ret; diff --git a/trunk/drivers/gpu/drm/ttm/ttm_tt.c b/trunk/drivers/gpu/drm/ttm/ttm_tt.c index d5fd5b8faeb3..a759170763bb 100644 --- a/trunk/drivers/gpu/drm/ttm/ttm_tt.c +++ b/trunk/drivers/gpu/drm/ttm/ttm_tt.c @@ -28,14 +28,13 @@ * Authors: Thomas Hellstrom */ +#include #include #include #include #include #include -#include #include "drm_cache.h" -#include "drm_mem_util.h" #include "ttm/ttm_module.h" #include "ttm/ttm_bo_driver.h" #include "ttm/ttm_placement.h" @@ -44,15 +43,32 @@ static int ttm_tt_swapin(struct ttm_tt *ttm); /** * Allocates storage for pointers to the pages that back the ttm. + * + * Uses kmalloc if possible. Otherwise falls back to vmalloc. */ static void ttm_tt_alloc_page_directory(struct ttm_tt *ttm) { - ttm->pages = drm_calloc_large(ttm->num_pages, sizeof(*ttm->pages)); + unsigned long size = ttm->num_pages * sizeof(*ttm->pages); + ttm->pages = NULL; + + if (size <= PAGE_SIZE) + ttm->pages = kzalloc(size, GFP_KERNEL); + + if (!ttm->pages) { + ttm->pages = vmalloc_user(size); + if (ttm->pages) + ttm->page_flags |= TTM_PAGE_FLAG_VMALLOC; + } } static void ttm_tt_free_page_directory(struct ttm_tt *ttm) { - drm_free_large(ttm->pages); + if (ttm->page_flags & TTM_PAGE_FLAG_VMALLOC) { + vfree(ttm->pages); + ttm->page_flags &= ~TTM_PAGE_FLAG_VMALLOC; + } else { + kfree(ttm->pages); + } ttm->pages = NULL; } diff --git a/trunk/drivers/gpu/drm/via/via_dmablit.c b/trunk/drivers/gpu/drm/via/via_dmablit.c index 4c54f043068e..327380888b4a 100644 --- a/trunk/drivers/gpu/drm/via/via_dmablit.c +++ b/trunk/drivers/gpu/drm/via/via_dmablit.c @@ -40,7 +40,6 @@ #include "via_dmablit.h" #include -#include #define VIA_PGDN(x) (((unsigned long)(x)) & PAGE_MASK) #define VIA_PGOFF(x) (((unsigned long)(x)) & ~PAGE_MASK) diff --git a/trunk/drivers/gpu/drm/vmwgfx/Kconfig b/trunk/drivers/gpu/drm/vmwgfx/Kconfig index 30ad13344f7b..f20b8bcbef39 100644 --- a/trunk/drivers/gpu/drm/vmwgfx/Kconfig +++ b/trunk/drivers/gpu/drm/vmwgfx/Kconfig @@ -1,6 +1,6 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" - depends on DRM && PCI && FB + depends on DRM && PCI select FB_DEFERRED_IO select FB_CFB_FILLRECT select FB_CFB_COPYAREA diff --git a/trunk/drivers/gpu/vga/vgaarb.c b/trunk/drivers/gpu/vga/vgaarb.c index 441e38c95a85..8827814d0735 100644 --- a/trunk/drivers/gpu/vga/vgaarb.c +++ b/trunk/drivers/gpu/vga/vgaarb.c @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/hid/hid-3m-pct.c b/trunk/drivers/hid/hid-3m-pct.c index c31e0be8ccea..2370aefc86b2 100644 --- a/trunk/drivers/hid/hid-3m-pct.c +++ b/trunk/drivers/hid/hid-3m-pct.c @@ -15,7 +15,6 @@ #include #include #include -#include #include MODULE_AUTHOR("Stephane Chatty "); diff --git a/trunk/drivers/hid/hid-a4tech.c b/trunk/drivers/hid/hid-a4tech.c index 3a2b223c1da4..df474c699fb8 100644 --- a/trunk/drivers/hid/hid-a4tech.c +++ b/trunk/drivers/hid/hid-a4tech.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-apple.c b/trunk/drivers/hid/hid-apple.c index bba05d0a8980..78286b184ace 100644 --- a/trunk/drivers/hid/hid-apple.c +++ b/trunk/drivers/hid/hid-apple.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-debug.c b/trunk/drivers/hid/hid-debug.c index 56f314fbd4f9..0c4e75573186 100644 --- a/trunk/drivers/hid/hid-debug.c +++ b/trunk/drivers/hid/hid-debug.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/hid/hid-drff.c b/trunk/drivers/hid/hid-drff.c index 968b04f9b796..a239d20ad7a5 100644 --- a/trunk/drivers/hid/hid-drff.c +++ b/trunk/drivers/hid/hid-drff.c @@ -28,7 +28,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/hid/hid-gaff.c b/trunk/drivers/hid/hid-gaff.c index 88dfcf49a5d7..8a11ccddaf2e 100644 --- a/trunk/drivers/hid/hid-gaff.c +++ b/trunk/drivers/hid/hid-gaff.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-gyration.c b/trunk/drivers/hid/hid-gyration.c index 62416e6baeca..cab13e8c7d29 100644 --- a/trunk/drivers/hid/hid-gyration.c +++ b/trunk/drivers/hid/hid-gyration.c @@ -53,13 +53,10 @@ static int gyration_input_mapping(struct hid_device *hdev, struct hid_input *hi, static int gyration_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { - - if (!(hdev->claimed & HID_CLAIMED_INPUT) || !field->hidinput) - return 0; + struct input_dev *input = field->hidinput->input; if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && (usage->hid & 0xff) == 0x82) { - struct input_dev *input = field->hidinput->input; input_event(input, usage->type, usage->code, 1); input_sync(input); input_event(input, usage->type, usage->code, 0); diff --git a/trunk/drivers/hid/hid-lg2ff.c b/trunk/drivers/hid/hid-lg2ff.c index d888f1e6794f..4e6dc6e26523 100644 --- a/trunk/drivers/hid/hid-lg2ff.c +++ b/trunk/drivers/hid/hid-lg2ff.c @@ -22,7 +22,6 @@ #include -#include #include #include diff --git a/trunk/drivers/hid/hid-magicmouse.c b/trunk/drivers/hid/hid-magicmouse.c index 0d471fc2ab82..c174b64c3810 100644 --- a/trunk/drivers/hid/hid-magicmouse.c +++ b/trunk/drivers/hid/hid-magicmouse.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-mosart.c b/trunk/drivers/hid/hid-mosart.c index e91437c18906..c8718168fe42 100644 --- a/trunk/drivers/hid/hid-mosart.c +++ b/trunk/drivers/hid/hid-mosart.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include "usbhid/usbhid.h" diff --git a/trunk/drivers/hid/hid-ntrig.c b/trunk/drivers/hid/hid-ntrig.c index 9b24fc510712..edcc0c4247bb 100644 --- a/trunk/drivers/hid/hid-ntrig.c +++ b/trunk/drivers/hid/hid-ntrig.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-pl.c b/trunk/drivers/hid/hid-pl.c index 9f41e2bd8483..c6d7dbc935b1 100644 --- a/trunk/drivers/hid/hid-pl.c +++ b/trunk/drivers/hid/hid-pl.c @@ -39,7 +39,6 @@ #define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg) #include -#include #include #include diff --git a/trunk/drivers/hid/hid-quanta.c b/trunk/drivers/hid/hid-quanta.c index 54d3db50605b..01dd51c4986c 100644 --- a/trunk/drivers/hid/hid-quanta.c +++ b/trunk/drivers/hid/hid-quanta.c @@ -15,7 +15,6 @@ #include #include #include -#include MODULE_AUTHOR("Stephane Chatty "); MODULE_DESCRIPTION("Quanta dual-touch panel"); diff --git a/trunk/drivers/hid/hid-sjoy.c b/trunk/drivers/hid/hid-sjoy.c index e10a7687ebf2..203c438b016f 100644 --- a/trunk/drivers/hid/hid-sjoy.c +++ b/trunk/drivers/hid/hid-sjoy.c @@ -27,7 +27,6 @@ /* #define DEBUG */ #include -#include #include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-sony.c b/trunk/drivers/hid/hid-sony.c index 7502a4b2fa86..9bf00d77d92b 100644 --- a/trunk/drivers/hid/hid-sony.c +++ b/trunk/drivers/hid/hid-sony.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-stantum.c b/trunk/drivers/hid/hid-stantum.c index 90df886c5e04..2e592a06654e 100644 --- a/trunk/drivers/hid/hid-stantum.c +++ b/trunk/drivers/hid/hid-stantum.c @@ -15,7 +15,6 @@ #include #include #include -#include MODULE_AUTHOR("Stephane Chatty "); MODULE_DESCRIPTION("Stantum HID multitouch panels"); diff --git a/trunk/drivers/hid/hid-tmff.c b/trunk/drivers/hid/hid-tmff.c index 15434c814793..c32f32c84ac8 100644 --- a/trunk/drivers/hid/hid-tmff.c +++ b/trunk/drivers/hid/hid-tmff.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-wacom.c b/trunk/drivers/hid/hid-wacom.c index f7700cf49721..8d3b46f5d149 100644 --- a/trunk/drivers/hid/hid-wacom.c +++ b/trunk/drivers/hid/hid-wacom.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hid-zpff.c b/trunk/drivers/hid/hid-zpff.c index b7acceabba80..a79f0d78c6be 100644 --- a/trunk/drivers/hid/hid-zpff.c +++ b/trunk/drivers/hid/hid-zpff.c @@ -23,7 +23,6 @@ #include #include -#include #include #include "hid-ids.h" diff --git a/trunk/drivers/hid/hidraw.c b/trunk/drivers/hid/hidraw.c index 6eadf1a9b3cc..d04476700b7b 100644 --- a/trunk/drivers/hid/hidraw.c +++ b/trunk/drivers/hid/hidraw.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/hid/usbhid/hid-pidff.c b/trunk/drivers/hid/usbhid/hid-pidff.c index ef381d79cfa8..e565dbe91d97 100644 --- a/trunk/drivers/hid/usbhid/hid-pidff.c +++ b/trunk/drivers/hid/usbhid/hid-pidff.c @@ -25,7 +25,6 @@ #define debug(format, arg...) pr_debug("hid-pidff: " format "\n" , ## arg) #include -#include #include #include diff --git a/trunk/drivers/hid/usbhid/hid-quirks.c b/trunk/drivers/hid/usbhid/hid-quirks.c index 1152f9b5fd44..928943c7ce9a 100644 --- a/trunk/drivers/hid/usbhid/hid-quirks.c +++ b/trunk/drivers/hid/usbhid/hid-quirks.c @@ -16,7 +16,6 @@ */ #include -#include #include "../hid-ids.h" @@ -61,7 +60,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, - { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, diff --git a/trunk/drivers/hwmon/ad7414.c b/trunk/drivers/hwmon/ad7414.c index 1e4c21fc1a89..bfda8c80ef24 100644 --- a/trunk/drivers/hwmon/ad7414.c +++ b/trunk/drivers/hwmon/ad7414.c @@ -27,7 +27,6 @@ #include #include #include -#include /* AD7414 registers */ diff --git a/trunk/drivers/hwmon/ad7418.c b/trunk/drivers/hwmon/ad7418.c index ffc781fec185..f97b5b356875 100644 --- a/trunk/drivers/hwmon/ad7418.c +++ b/trunk/drivers/hwmon/ad7418.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "lm75.h" diff --git a/trunk/drivers/hwmon/adcxx.c b/trunk/drivers/hwmon/adcxx.c index fbdc7655303b..74d9c5195e44 100644 --- a/trunk/drivers/hwmon/adcxx.c +++ b/trunk/drivers/hwmon/adcxx.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/hwmon/adt7411.c b/trunk/drivers/hwmon/adt7411.c index 4086c7257f91..3471884e42d2 100644 --- a/trunk/drivers/hwmon/adt7411.c +++ b/trunk/drivers/hwmon/adt7411.c @@ -21,7 +21,6 @@ #include #include #include -#include #define ADT7411_REG_INT_TEMP_VDD_LSB 0x03 #define ADT7411_REG_EXT_TEMP_AIN14_LSB 0x04 diff --git a/trunk/drivers/hwmon/adt7462.c b/trunk/drivers/hwmon/adt7462.c index 2af0c7b6b4e4..b8156b4893bb 100644 --- a/trunk/drivers/hwmon/adt7462.c +++ b/trunk/drivers/hwmon/adt7462.c @@ -28,7 +28,6 @@ #include #include #include -#include /* Addresses to scan */ static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END }; diff --git a/trunk/drivers/hwmon/adt7470.c b/trunk/drivers/hwmon/adt7470.c index 9e775717abb7..3445ce1cba81 100644 --- a/trunk/drivers/hwmon/adt7470.c +++ b/trunk/drivers/hwmon/adt7470.c @@ -29,7 +29,6 @@ #include #include #include -#include /* Addresses to scan */ static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END }; diff --git a/trunk/drivers/hwmon/asus_atk0110.c b/trunk/drivers/hwmon/asus_atk0110.c index 75f3fa55663d..028284f544e3 100644 --- a/trunk/drivers/hwmon/asus_atk0110.c +++ b/trunk/drivers/hwmon/asus_atk0110.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/hwmon/atxp1.c b/trunk/drivers/hwmon/atxp1.c index 33cc143b2069..94cadc19f0c5 100644 --- a/trunk/drivers/hwmon/atxp1.c +++ b/trunk/drivers/hwmon/atxp1.c @@ -28,7 +28,6 @@ #include #include #include -#include MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("System voltages control via Attansic ATXP1"); diff --git a/trunk/drivers/hwmon/f75375s.c b/trunk/drivers/hwmon/f75375s.c index bad2cf3ef4a4..277398f9c938 100644 --- a/trunk/drivers/hwmon/f75375s.c +++ b/trunk/drivers/hwmon/f75375s.c @@ -35,7 +35,6 @@ #include #include #include -#include /* Addresses to scan */ static const unsigned short normal_i2c[] = { 0x2d, 0x2e, I2C_CLIENT_END }; diff --git a/trunk/drivers/hwmon/i5k_amb.c b/trunk/drivers/hwmon/i5k_amb.c index e880e2c3871d..27d7f72a5f11 100644 --- a/trunk/drivers/hwmon/i5k_amb.c +++ b/trunk/drivers/hwmon/i5k_amb.c @@ -30,7 +30,6 @@ #include #include #include -#include #define DRVNAME "i5k_amb" diff --git a/trunk/drivers/hwmon/ibmaem.c b/trunk/drivers/hwmon/ibmaem.c index eaee546af19a..405d3fb5d76f 100644 --- a/trunk/drivers/hwmon/ibmaem.c +++ b/trunk/drivers/hwmon/ibmaem.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/hwmon/ibmpex.c b/trunk/drivers/hwmon/ibmpex.c index 06d4eafcf76b..a36363312f2f 100644 --- a/trunk/drivers/hwmon/ibmpex.c +++ b/trunk/drivers/hwmon/ibmpex.c @@ -25,7 +25,6 @@ #include #include #include -#include #define REFRESH_INTERVAL (2 * HZ) #define DRVNAME "ibmpex" diff --git a/trunk/drivers/hwmon/lm70.c b/trunk/drivers/hwmon/lm70.c index fd108cfc05c7..ab8a5d3c7690 100644 --- a/trunk/drivers/hwmon/lm70.c +++ b/trunk/drivers/hwmon/lm70.c @@ -34,7 +34,6 @@ #include #include #include -#include #define DRVNAME "lm70" diff --git a/trunk/drivers/hwmon/lm73.c b/trunk/drivers/hwmon/lm73.c index 4d1b76bc8148..c5f39ba103c0 100644 --- a/trunk/drivers/hwmon/lm73.c +++ b/trunk/drivers/hwmon/lm73.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/hwmon/max1111.c b/trunk/drivers/hwmon/max1111.c index 12a54aa29776..9ac497271adf 100644 --- a/trunk/drivers/hwmon/max1111.c +++ b/trunk/drivers/hwmon/max1111.c @@ -20,7 +20,6 @@ #include #include #include -#include #define MAX1111_TX_BUF_SIZE 1 #define MAX1111_RX_BUF_SIZE 2 diff --git a/trunk/drivers/hwmon/mc13783-adc.c b/trunk/drivers/hwmon/mc13783-adc.c index ce3c7bc81814..883fa8197da4 100644 --- a/trunk/drivers/hwmon/mc13783-adc.c +++ b/trunk/drivers/hwmon/mc13783-adc.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/hwmon/sht15.c b/trunk/drivers/hwmon/sht15.c index 6b2d8ae64fe1..864a371f6eb9 100644 --- a/trunk/drivers/hwmon/sht15.c +++ b/trunk/drivers/hwmon/sht15.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #define SHT15_MEASURE_TEMP 3 diff --git a/trunk/drivers/hwmon/wm831x-hwmon.c b/trunk/drivers/hwmon/wm831x-hwmon.c index 97b1f834a471..c16e9e74c356 100644 --- a/trunk/drivers/hwmon/wm831x-hwmon.c +++ b/trunk/drivers/hwmon/wm831x-hwmon.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/algos/i2c-algo-bit.c b/trunk/drivers/i2c/algos/i2c-algo-bit.c index a39e6cff86e7..e8d568c3fb09 100644 --- a/trunk/drivers/i2c/algos/i2c-algo-bit.c +++ b/trunk/drivers/i2c/algos/i2c-algo-bit.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/i2c/algos/i2c-algo-pcf.c b/trunk/drivers/i2c/algos/i2c-algo-pcf.c index 5eebf562ff31..6b6bd06202b2 100644 --- a/trunk/drivers/i2c/algos/i2c-algo-pcf.c +++ b/trunk/drivers/i2c/algos/i2c-algo-pcf.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-amd8111.c b/trunk/drivers/i2c/busses/i2c-amd8111.c index 2fbef27b6cd6..d0dc970d7370 100644 --- a/trunk/drivers/i2c/busses/i2c-amd8111.c +++ b/trunk/drivers/i2c/busses/i2c-amd8111.c @@ -17,7 +17,6 @@ #include #include #include -#include #include MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/i2c/busses/i2c-bfin-twi.c b/trunk/drivers/i2c/busses/i2c-bfin-twi.c index f1e14dd590c9..fe3fb567317d 100644 --- a/trunk/drivers/i2c/busses/i2c-bfin-twi.c +++ b/trunk/drivers/i2c/busses/i2c-bfin-twi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-davinci.c b/trunk/drivers/i2c/busses/i2c-davinci.c index 4523364e6722..c89687a10835 100644 --- a/trunk/drivers/i2c/busses/i2c-davinci.c +++ b/trunk/drivers/i2c/busses/i2c-davinci.c @@ -35,7 +35,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/i2c/busses/i2c-designware.c b/trunk/drivers/i2c/busses/i2c-designware.c index b664ed8bbdb3..3e72b69aa7f8 100644 --- a/trunk/drivers/i2c/busses/i2c-designware.c +++ b/trunk/drivers/i2c/busses/i2c-designware.c @@ -36,7 +36,6 @@ #include #include #include -#include /* * Registers offset diff --git a/trunk/drivers/i2c/busses/i2c-elektor.c b/trunk/drivers/i2c/busses/i2c-elektor.c index 612255614a66..448b4bf35eb7 100644 --- a/trunk/drivers/i2c/busses/i2c-elektor.c +++ b/trunk/drivers/i2c/busses/i2c-elektor.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-gpio.c b/trunk/drivers/i2c/busses/i2c-gpio.c index c21077d248af..32104eac8d3d 100644 --- a/trunk/drivers/i2c/busses/i2c-gpio.c +++ b/trunk/drivers/i2c/busses/i2c-gpio.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-highlander.c b/trunk/drivers/i2c/busses/i2c-highlander.c index ce87a902c94d..87ecace415da 100644 --- a/trunk/drivers/i2c/busses/i2c-highlander.c +++ b/trunk/drivers/i2c/busses/i2c-highlander.c @@ -19,7 +19,6 @@ #include #include #include -#include #define SMCR 0x00 #define SMCR_START (1 << 0) diff --git a/trunk/drivers/i2c/busses/i2c-imx.c b/trunk/drivers/i2c/busses/i2c-imx.c index f7e27b702375..32375bddae7d 100644 --- a/trunk/drivers/i2c/busses/i2c-imx.c +++ b/trunk/drivers/i2c/busses/i2c-imx.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-ixp2000.c b/trunk/drivers/i2c/busses/i2c-ixp2000.c index 5d8aed5ec21b..c016f7a2c5fc 100644 --- a/trunk/drivers/i2c/busses/i2c-ixp2000.c +++ b/trunk/drivers/i2c/busses/i2c-ixp2000.c @@ -32,7 +32,6 @@ #include #include #include -#include #include /* Pick up IXP2000-specific bits */ #include diff --git a/trunk/drivers/i2c/busses/i2c-mpc.c b/trunk/drivers/i2c/busses/i2c-mpc.c index f1321f763789..78a15af32942 100644 --- a/trunk/drivers/i2c/busses/i2c-mpc.c +++ b/trunk/drivers/i2c/busses/i2c-mpc.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-mv64xxx.c b/trunk/drivers/i2c/busses/i2c-mv64xxx.c index 3623a4499084..ed387ffa4730 100644 --- a/trunk/drivers/i2c/busses/i2c-mv64xxx.c +++ b/trunk/drivers/i2c/busses/i2c-mv64xxx.c @@ -10,7 +10,6 @@ * or implied. */ #include -#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-nforce2.c b/trunk/drivers/i2c/busses/i2c-nforce2.c index 4a48dd4ef787..4a700587ef18 100644 --- a/trunk/drivers/i2c/busses/i2c-nforce2.c +++ b/trunk/drivers/i2c/busses/i2c-nforce2.c @@ -56,7 +56,6 @@ #include #include #include -#include #include MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/i2c/busses/i2c-nomadik.c b/trunk/drivers/i2c/busses/i2c-nomadik.c index a4f8d33fa389..a15f731fa451 100644 --- a/trunk/drivers/i2c/busses/i2c-nomadik.c +++ b/trunk/drivers/i2c/busses/i2c-nomadik.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-ocores.c b/trunk/drivers/i2c/busses/i2c-ocores.c index b4ed4ca802ed..0dabe643ec51 100644 --- a/trunk/drivers/i2c/busses/i2c-ocores.c +++ b/trunk/drivers/i2c/busses/i2c-ocores.c @@ -18,7 +18,6 @@ #include #include #include -#include #include struct ocores_i2c { diff --git a/trunk/drivers/i2c/busses/i2c-octeon.c b/trunk/drivers/i2c/busses/i2c-octeon.c index a2481f40ea1c..60375504fa49 100644 --- a/trunk/drivers/i2c/busses/i2c-octeon.c +++ b/trunk/drivers/i2c/busses/i2c-octeon.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-omap.c b/trunk/drivers/i2c/busses/i2c-omap.c index 6bd0f19cd451..c7c237537f81 100644 --- a/trunk/drivers/i2c/busses/i2c-omap.c +++ b/trunk/drivers/i2c/busses/i2c-omap.c @@ -37,7 +37,6 @@ #include #include #include -#include /* I2C controller revisions */ #define OMAP_I2C_REV_2 0x20 diff --git a/trunk/drivers/i2c/busses/i2c-parport.c b/trunk/drivers/i2c/busses/i2c-parport.c index 846583ed4763..220fca7f23a6 100644 --- a/trunk/drivers/i2c/busses/i2c-parport.c +++ b/trunk/drivers/i2c/busses/i2c-parport.c @@ -32,7 +32,6 @@ #include #include #include -#include #include "i2c-parport.h" /* ----- Device list ------------------------------------------------------ */ diff --git a/trunk/drivers/i2c/busses/i2c-pasemi.c b/trunk/drivers/i2c/busses/i2c-pasemi.c index d3d4a4b43a1d..0d20ff46a518 100644 --- a/trunk/drivers/i2c/busses/i2c-pasemi.c +++ b/trunk/drivers/i2c/busses/i2c-pasemi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include static struct pci_driver pasemi_smb_driver; diff --git a/trunk/drivers/i2c/busses/i2c-pnx.c b/trunk/drivers/i2c/busses/i2c-pnx.c index 247103372a06..9532dee6b580 100644 --- a/trunk/drivers/i2c/busses/i2c-pnx.c +++ b/trunk/drivers/i2c/busses/i2c-pnx.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-pxa.c b/trunk/drivers/i2c/busses/i2c-pxa.c index 14d249f5ed3f..90ffbf6f9d4f 100644 --- a/trunk/drivers/i2c/busses/i2c-pxa.c +++ b/trunk/drivers/i2c/busses/i2c-pxa.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-s3c2410.c b/trunk/drivers/i2c/busses/i2c-s3c2410.c index d27072b2249f..1d8c98613fa0 100644 --- a/trunk/drivers/i2c/busses/i2c-s3c2410.c +++ b/trunk/drivers/i2c/busses/i2c-s3c2410.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-sh_mobile.c b/trunk/drivers/i2c/busses/i2c-sh_mobile.c index ffb405d7c6f2..ccc46418ef7f 100644 --- a/trunk/drivers/i2c/busses/i2c-sh_mobile.c +++ b/trunk/drivers/i2c/busses/i2c-sh_mobile.c @@ -31,7 +31,6 @@ #include #include #include -#include /* Transmit operation: */ /* */ diff --git a/trunk/drivers/i2c/busses/i2c-simtec.c b/trunk/drivers/i2c/busses/i2c-simtec.c index 78b06107342c..6407f47bda82 100644 --- a/trunk/drivers/i2c/busses/i2c-simtec.c +++ b/trunk/drivers/i2c/busses/i2c-simtec.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/busses/i2c-stu300.c b/trunk/drivers/i2c/busses/i2c-stu300.c index 1f5b38be73bc..d2728a28a8db 100644 --- a/trunk/drivers/i2c/busses/i2c-stu300.c +++ b/trunk/drivers/i2c/busses/i2c-stu300.c @@ -16,7 +16,6 @@ #include #include #include -#include /* the name of this kernel module */ #define NAME "stu300" diff --git a/trunk/drivers/i2c/busses/i2c-tiny-usb.c b/trunk/drivers/i2c/busses/i2c-tiny-usb.c index d03b04002f0d..b5b1bbf37d3c 100644 --- a/trunk/drivers/i2c/busses/i2c-tiny-usb.c +++ b/trunk/drivers/i2c/busses/i2c-tiny-usb.c @@ -13,7 +13,6 @@ #include #include #include -#include #include /* include interfaces to usb layer */ diff --git a/trunk/drivers/i2c/busses/i2c-versatile.c b/trunk/drivers/i2c/busses/i2c-versatile.c index 5c473833d948..70de82163463 100644 --- a/trunk/drivers/i2c/busses/i2c-versatile.c +++ b/trunk/drivers/i2c/busses/i2c-versatile.c @@ -14,7 +14,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/i2c/busses/i2c-xiic.c b/trunk/drivers/i2c/busses/i2c-xiic.c index a9c419e075a5..f0ef8da6c554 100644 --- a/trunk/drivers/i2c/busses/i2c-xiic.c +++ b/trunk/drivers/i2c/busses/i2c-xiic.c @@ -39,7 +39,6 @@ #include #include #include -#include #define DRIVER_NAME "xiic-i2c" diff --git a/trunk/drivers/i2c/busses/scx200_acb.c b/trunk/drivers/i2c/busses/scx200_acb.c index 684395b6f3e2..cf994bd01d9c 100644 --- a/trunk/drivers/i2c/busses/scx200_acb.c +++ b/trunk/drivers/i2c/busses/scx200_acb.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/i2c/i2c-boardinfo.c b/trunk/drivers/i2c/i2c-boardinfo.c index 7e6a63b57165..a26a34a06641 100644 --- a/trunk/drivers/i2c/i2c-boardinfo.c +++ b/trunk/drivers/i2c/i2c-boardinfo.c @@ -18,7 +18,6 @@ #include #include -#include #include #include "i2c-core.h" diff --git a/trunk/drivers/i2c/i2c-smbus.c b/trunk/drivers/i2c/i2c-smbus.c index a24e0bfe9201..7a8201ed2181 100644 --- a/trunk/drivers/i2c/i2c-smbus.c +++ b/trunk/drivers/i2c/i2c-smbus.c @@ -26,7 +26,6 @@ #include #include #include -#include struct i2c_smbus_alert { unsigned int alert_edge_triggered:1; diff --git a/trunk/drivers/ide/hpt366.c b/trunk/drivers/ide/hpt366.c index 45163693f737..b885c1d548f5 100644 --- a/trunk/drivers/ide/hpt366.c +++ b/trunk/drivers/ide/hpt366.c @@ -128,7 +128,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ide/ide-acpi.c b/trunk/drivers/ide/ide-acpi.c index c26c11905ffe..5cb01e5c323c 100644 --- a/trunk/drivers/ide/ide-acpi.c +++ b/trunk/drivers/ide/ide-acpi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ide/ide-atapi.c b/trunk/drivers/ide/ide-atapi.c index a4046e94158d..eb2181a6a11c 100644 --- a/trunk/drivers/ide/ide-atapi.c +++ b/trunk/drivers/ide/ide-atapi.c @@ -7,7 +7,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/ide/ide-cd_ioctl.c b/trunk/drivers/ide/ide-cd_ioctl.c index 02712bf045c1..df3df0041eb6 100644 --- a/trunk/drivers/ide/ide-cd_ioctl.c +++ b/trunk/drivers/ide/ide-cd_ioctl.c @@ -8,7 +8,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/ide/ide-devsets.c b/trunk/drivers/ide/ide-devsets.c index 9e98122f646e..c6935c78757c 100644 --- a/trunk/drivers/ide/ide-devsets.c +++ b/trunk/drivers/ide/ide-devsets.c @@ -1,6 +1,5 @@ #include -#include #include DEFINE_MUTEX(ide_setting_mtx); diff --git a/trunk/drivers/ide/ide-disk_proc.c b/trunk/drivers/ide/ide-disk_proc.c index f9bbd904eae7..60b0590ccc9c 100644 --- a/trunk/drivers/ide/ide-disk_proc.c +++ b/trunk/drivers/ide/ide-disk_proc.c @@ -1,6 +1,5 @@ #include #include -#include #include #include "ide-disk.h" diff --git a/trunk/drivers/ide/ide-dma.c b/trunk/drivers/ide/ide-dma.c index 2c17e3fb43e3..ee58c88dee5a 100644 --- a/trunk/drivers/ide/ide-dma.c +++ b/trunk/drivers/ide/ide-dma.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/ide/ide-floppy.c b/trunk/drivers/ide/ide-floppy.c index 4713bdca20b6..efd907623469 100644 --- a/trunk/drivers/ide/ide-floppy.c +++ b/trunk/drivers/ide/ide-floppy.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/ide/ide-gd.c b/trunk/drivers/ide/ide-gd.c index c32d83996ae1..753241429c26 100644 --- a/trunk/drivers/ide/ide-gd.c +++ b/trunk/drivers/ide/ide-gd.c @@ -8,7 +8,6 @@ #include #include #include -#include #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) #define IDE_DISK_MINORS (1 << PARTN_BITS) diff --git a/trunk/drivers/ide/ide-ioctls.c b/trunk/drivers/ide/ide-ioctls.c index 9965ecd5078c..6e7ae2b6cfc6 100644 --- a/trunk/drivers/ide/ide-ioctls.c +++ b/trunk/drivers/ide/ide-ioctls.c @@ -4,7 +4,6 @@ #include #include -#include static const struct ide_ioctl_devset ide_ioctl_settings[] = { { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, diff --git a/trunk/drivers/ide/ide-park.c b/trunk/drivers/ide/ide-park.c index 88a380c5a470..a914023d6d03 100644 --- a/trunk/drivers/ide/ide-park.c +++ b/trunk/drivers/ide/ide-park.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/trunk/drivers/ide/ide-pm.c b/trunk/drivers/ide/ide-pm.c index 1c08311b0a0e..ad7be2669dcb 100644 --- a/trunk/drivers/ide/ide-pm.c +++ b/trunk/drivers/ide/ide-pm.c @@ -1,5 +1,4 @@ #include -#include #include int generic_ide_suspend(struct device *dev, pm_message_t mesg) diff --git a/trunk/drivers/ide/ide-proc.c b/trunk/drivers/ide/ide-proc.c index a3133d7b2a0c..017c09540c2f 100644 --- a/trunk/drivers/ide/ide-proc.c +++ b/trunk/drivers/ide/ide-proc.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/ide/ide.c b/trunk/drivers/ide/ide.c index 3cb9c4e056ff..16d056939f9f 100644 --- a/trunk/drivers/ide/ide.c +++ b/trunk/drivers/ide/ide.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/ide/it821x.c b/trunk/drivers/ide/it821x.c index 2e3169f2acda..b2709c733485 100644 --- a/trunk/drivers/ide/it821x.c +++ b/trunk/drivers/ide/it821x.c @@ -61,7 +61,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ide/pmac.c b/trunk/drivers/ide/pmac.c index 159955d16c47..850ee452e9bb 100644 --- a/trunk/drivers/ide/pmac.c +++ b/trunk/drivers/ide/pmac.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ide/rapide.c b/trunk/drivers/ide/rapide.c index 48d976aad7ab..00f54248f41f 100644 --- a/trunk/drivers/ide/rapide.c +++ b/trunk/drivers/ide/rapide.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/ide/sc1200.c b/trunk/drivers/ide/sc1200.c index 356b9b504ffd..134f1fd13866 100644 --- a/trunk/drivers/ide/sc1200.c +++ b/trunk/drivers/ide/sc1200.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/ide/via82cxxx.c b/trunk/drivers/ide/via82cxxx.c index 101f40022386..48fd4efc90ad 100644 --- a/trunk/drivers/ide/via82cxxx.c +++ b/trunk/drivers/ide/via82cxxx.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/idle/i7300_idle.c b/trunk/drivers/idle/i7300_idle.c index 15341fc1c68b..dd253002cd50 100644 --- a/trunk/drivers/idle/i7300_idle.c +++ b/trunk/drivers/idle/i7300_idle.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/ieee1394/dma.c b/trunk/drivers/ieee1394/dma.c index d178699b194a..8e7e3344c4b3 100644 --- a/trunk/drivers/ieee1394/dma.c +++ b/trunk/drivers/ieee1394/dma.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/ieee1394/sbp2.c b/trunk/drivers/ieee1394/sbp2.c index 4565cb5d3d1a..c88696a6cf8a 100644 --- a/trunk/drivers/ieee1394/sbp2.c +++ b/trunk/drivers/ieee1394/sbp2.c @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/infiniband/core/addr.c b/trunk/drivers/infiniband/core/addr.c index 0b926e45afe2..abbb06996f9e 100644 --- a/trunk/drivers/infiniband/core/addr.c +++ b/trunk/drivers/infiniband/core/addr.c @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/core/cm.c b/trunk/drivers/infiniband/core/cm.c index fc73d6ac11b6..764787ebe8d8 100644 --- a/trunk/drivers/infiniband/core/cm.c +++ b/trunk/drivers/infiniband/core/cm.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/core/cma.c b/trunk/drivers/infiniband/core/cma.c index 7794249430ca..875e34e0b235 100644 --- a/trunk/drivers/infiniband/core/cma.c +++ b/trunk/drivers/infiniband/core/cma.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/core/iwcm.c b/trunk/drivers/infiniband/core/iwcm.c index bfead5bc25f6..0f89909abce9 100644 --- a/trunk/drivers/infiniband/core/iwcm.c +++ b/trunk/drivers/infiniband/core/iwcm.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/core/mad.c b/trunk/drivers/infiniband/core/mad.c index 1df1194aeba4..e351b1548535 100644 --- a/trunk/drivers/infiniband/core/mad.c +++ b/trunk/drivers/infiniband/core/mad.c @@ -34,7 +34,6 @@ * */ #include -#include #include #include "mad_priv.h" diff --git a/trunk/drivers/infiniband/core/mad_rmpp.c b/trunk/drivers/infiniband/core/mad_rmpp.c index f37878c9c06e..4e0f2829e0e5 100644 --- a/trunk/drivers/infiniband/core/mad_rmpp.c +++ b/trunk/drivers/infiniband/core/mad_rmpp.c @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include "mad_priv.h" #include "mad_rmpp.h" diff --git a/trunk/drivers/infiniband/core/multicast.c b/trunk/drivers/infiniband/core/multicast.c index a519801dcfb7..8d82ba171353 100644 --- a/trunk/drivers/infiniband/core/multicast.c +++ b/trunk/drivers/infiniband/core/multicast.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/core/ucm.c b/trunk/drivers/infiniband/core/ucm.c index 512b1c43460c..017d6e24448f 100644 --- a/trunk/drivers/infiniband/core/ucm.c +++ b/trunk/drivers/infiniband/core/ucm.c @@ -44,7 +44,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/core/ucma.c b/trunk/drivers/infiniband/core/ucma.c index 46185084121e..b2e16c332d5b 100644 --- a/trunk/drivers/infiniband/core/ucma.c +++ b/trunk/drivers/infiniband/core/ucma.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/core/umem.c b/trunk/drivers/infiniband/core/umem.c index 415e186eee32..4f906f0614f0 100644 --- a/trunk/drivers/infiniband/core/umem.c +++ b/trunk/drivers/infiniband/core/umem.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "uverbs.h" diff --git a/trunk/drivers/infiniband/core/user_mad.c b/trunk/drivers/infiniband/core/user_mad.c index e7db054fb1c8..04b585e86cb2 100644 --- a/trunk/drivers/infiniband/core/user_mad.c +++ b/trunk/drivers/infiniband/core/user_mad.c @@ -46,7 +46,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/core/uverbs_cmd.c b/trunk/drivers/infiniband/core/uverbs_cmd.c index 6fcfbeb24a23..f71cf138d674 100644 --- a/trunk/drivers/infiniband/core/uverbs_cmd.c +++ b/trunk/drivers/infiniband/core/uverbs_cmd.c @@ -35,7 +35,6 @@ #include #include -#include #include diff --git a/trunk/drivers/infiniband/core/uverbs_main.c b/trunk/drivers/infiniband/core/uverbs_main.c index fb3526254426..d805cf365c8d 100644 --- a/trunk/drivers/infiniband/core/uverbs_main.c +++ b/trunk/drivers/infiniband/core/uverbs_main.c @@ -44,7 +44,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/hw/amso1100/c2.c b/trunk/drivers/infiniband/hw/amso1100/c2.c index dc85d777578e..c61fd2b4a556 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_alloc.c b/trunk/drivers/infiniband/hw/amso1100/c2_alloc.c index d4f5f5d42e90..e9110163aeff 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_alloc.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_alloc.c @@ -32,6 +32,7 @@ */ #include +#include #include #include "c2.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_cm.c b/trunk/drivers/infiniband/hw/amso1100/c2_cm.c index 95f58ab1e0b8..75b93e9b8810 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_cm.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_cm.c @@ -31,8 +31,6 @@ * SOFTWARE. * */ -#include - #include "c2.h" #include "c2_wr.h" #include "c2_vq.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_cq.c b/trunk/drivers/infiniband/hw/amso1100/c2_cq.c index f7b0fc23f413..f5c45b194f53 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_cq.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_cq.c @@ -35,8 +35,6 @@ * SOFTWARE. * */ -#include - #include "c2.h" #include "c2_vq.h" #include "c2_status.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_mm.c b/trunk/drivers/infiniband/hw/amso1100/c2_mm.c index 119c4f3d9791..b506fe22b4d4 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_mm.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_mm.c @@ -30,8 +30,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include - #include "c2.h" #include "c2_vq.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_pd.c b/trunk/drivers/infiniband/hw/amso1100/c2_pd.c index 161f2a285351..00c709926c8d 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_pd.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_pd.c @@ -34,7 +34,6 @@ */ #include -#include #include #include "c2.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_provider.c b/trunk/drivers/infiniband/hw/amso1100/c2_provider.c index c47f618d12e8..ad723bd8bf49 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_provider.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_qp.c b/trunk/drivers/infiniband/hw/amso1100/c2_qp.c index d8f4bb8bf42e..ad518868df77 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_qp.c @@ -36,7 +36,6 @@ */ #include -#include #include "c2.h" #include "c2_vq.h" diff --git a/trunk/drivers/infiniband/hw/amso1100/c2_rnic.c b/trunk/drivers/infiniband/hw/amso1100/c2_rnic.c index 78c4bcc6ef60..dd05c4835642 100644 --- a/trunk/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/trunk/drivers/infiniband/hw/amso1100/c2_rnic.c @@ -51,7 +51,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/hw/cxgb3/cxio_dbg.c b/trunk/drivers/infiniband/hw/cxgb3/cxio_dbg.c index 8bca6b4ec9af..a8d24d53f307 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/cxio_dbg.c +++ b/trunk/drivers/infiniband/hw/cxgb3/cxio_dbg.c @@ -31,7 +31,6 @@ */ #ifdef DEBUG #include -#include #include "common.h" #include "cxgb3_ioctl.h" #include "cxio_hal.h" diff --git a/trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c b/trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c index 35f286f1ad1e..a28e862f2d68 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c +++ b/trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "cxio_resource.h" diff --git a/trunk/drivers/infiniband/hw/cxgb3/iwch_cm.c b/trunk/drivers/infiniband/hw/cxgb3/iwch_cm.c index 4fef03296276..d94388b81a40 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/trunk/drivers/infiniband/hw/cxgb3/iwch_cm.c @@ -31,7 +31,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/cxgb3/iwch_ev.c b/trunk/drivers/infiniband/hw/cxgb3/iwch_ev.c index 6afc89e7572c..743c5d8b8806 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/iwch_ev.c +++ b/trunk/drivers/infiniband/hw/cxgb3/iwch_ev.c @@ -29,7 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include +#include #include #include #include "iwch_provider.h" diff --git a/trunk/drivers/infiniband/hw/cxgb3/iwch_mem.c b/trunk/drivers/infiniband/hw/cxgb3/iwch_mem.c index 5c36ee2809ac..e1ec65ebb016 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/iwch_mem.c +++ b/trunk/drivers/infiniband/hw/cxgb3/iwch_mem.c @@ -29,7 +29,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include #include #include diff --git a/trunk/drivers/infiniband/hw/cxgb3/iwch_provider.c b/trunk/drivers/infiniband/hw/cxgb3/iwch_provider.c index 19b1c4a62a23..47b35c6608d2 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/trunk/drivers/infiniband/hw/cxgb3/iwch_provider.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/cxgb3/iwch_qp.c b/trunk/drivers/infiniband/hw/cxgb3/iwch_qp.c index ae47bfd22bd5..b4d893de3650 100644 --- a/trunk/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/trunk/drivers/infiniband/hw/cxgb3/iwch_qp.c @@ -30,7 +30,6 @@ * SOFTWARE. */ #include -#include #include "iwch_provider.h" #include "iwch.h" #include "iwch_cm.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_av.c b/trunk/drivers/infiniband/hw/ehca/ehca_av.c index 465926319f3d..56735ea2fc57 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_av.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_av.c @@ -41,8 +41,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_tools.h" #include "ehca_iverbs.h" #include "hcp_if.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_cq.c b/trunk/drivers/infiniband/hw/ehca/ehca_cq.c index d9b0ebcb67d7..97e4b231cdc4 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_cq.c @@ -43,8 +43,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_iverbs.h" #include "ehca_classes.h" #include "ehca_irq.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_hca.c b/trunk/drivers/infiniband/hw/ehca/ehca_hca.c index 73edc3668663..8b92f85d4dd0 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_hca.c @@ -39,8 +39,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_tools.h" #include "ehca_iverbs.h" #include "hcp_if.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_irq.c b/trunk/drivers/infiniband/hw/ehca/ehca_irq.c index 07cae552cafb..b2b6fea2b141 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_irq.c @@ -41,8 +41,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_classes.h" #include "ehca_irq.h" #include "ehca_iverbs.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_mrmw.c b/trunk/drivers/infiniband/hw/ehca/ehca_mrmw.c index 31a68b9c52d0..7550a534005c 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_mrmw.c @@ -40,7 +40,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include "ehca_iverbs.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_pd.c b/trunk/drivers/infiniband/hw/ehca/ehca_pd.c index 351577a6670a..2fe554855fa5 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_pd.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_pd.c @@ -38,8 +38,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_tools.h" #include "ehca_iverbs.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c index 47d388ec1cde..b105f664d3ef 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c @@ -43,8 +43,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_classes.h" #include "ehca_tools.h" #include "ehca_qes.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_uverbs.c b/trunk/drivers/infiniband/hw/ehca/ehca_uverbs.c index 45ee89b65c23..f1565cae8ec6 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_uverbs.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_uverbs.c @@ -40,8 +40,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_classes.h" #include "ehca_iverbs.h" #include "ehca_mrmw.h" diff --git a/trunk/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/trunk/drivers/infiniband/hw/ehca/ipz_pt_fn.c index 1596e3085344..1227c593627a 100644 --- a/trunk/drivers/infiniband/hw/ehca/ipz_pt_fn.c +++ b/trunk/drivers/infiniband/hw/ehca/ipz_pt_fn.c @@ -38,8 +38,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - #include "ehca_tools.h" #include "ipz_pt_fn.h" #include "ehca_classes.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_cq.c b/trunk/drivers/infiniband/hw/ipath/ipath_cq.c index 0416c6c0e126..d385e4168c97 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_cq.c @@ -32,7 +32,6 @@ */ #include -#include #include #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_dma.c b/trunk/drivers/infiniband/hw/ipath/ipath_dma.c index 644c2c74e054..e90a0ea538a0 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_dma.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_dma.c @@ -31,7 +31,6 @@ */ #include -#include #include #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_driver.c b/trunk/drivers/infiniband/hw/ipath/ipath_driver.c index 6302626d17f0..d2787fe80304 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_driver.c @@ -40,7 +40,6 @@ #include #include #include -#include #include "ipath_kernel.h" #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_file_ops.c b/trunk/drivers/infiniband/hw/ipath/ipath_file_ops.c index 9c5c66d16a23..73933a41ce84 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_fs.c b/trunk/drivers/infiniband/hw/ipath/ipath_fs.c index 2fca70836dae..100da8542bba 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_fs.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "ipath_kernel.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_init_chip.c b/trunk/drivers/infiniband/hw/ipath/ipath_init_chip.c index 776938299e4c..077879c0bdb5 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_init_chip.c @@ -33,7 +33,6 @@ #include #include -#include #include #include "ipath_kernel.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_mmap.c b/trunk/drivers/infiniband/hw/ipath/ipath_mmap.c index e73274229404..b28865faf435 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_mmap.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_mmap.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_mr.c b/trunk/drivers/infiniband/hw/ipath/ipath_mr.c index e346d3890a0e..9d343b7c2f3b 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_mr.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_mr.c @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include #include #include diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_qp.c b/trunk/drivers/infiniband/hw/ipath/ipath_qp.c index 0857a9c3cd3d..cb2d3ef2ae12 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_qp.c @@ -33,7 +33,6 @@ #include #include -#include #include #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_sdma.c b/trunk/drivers/infiniband/hw/ipath/ipath_sdma.c index 98ac18ec977e..4b0698590850 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_sdma.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_sdma.c @@ -31,7 +31,6 @@ */ #include -#include #include "ipath_kernel.h" #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_srq.c b/trunk/drivers/infiniband/hw/ipath/ipath_srq.c index 386e2c717c53..e3d80ca84c1a 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_srq.c @@ -32,7 +32,6 @@ */ #include -#include #include #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_user_pages.c b/trunk/drivers/infiniband/hw/ipath/ipath_user_pages.c index 5e86d73eba2a..eb7d59abd12d 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_user_pages.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_user_pages.c @@ -33,7 +33,6 @@ #include #include -#include #include #include "ipath_kernel.h" diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c b/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c index 559f39be0dcc..9289ab4b0ae8 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/trunk/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c index 6216ea923853..6923e1d986da 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c @@ -33,7 +33,6 @@ #include #include -#include #include "ipath_verbs.h" diff --git a/trunk/drivers/infiniband/hw/mlx4/ah.c b/trunk/drivers/infiniband/hw/mlx4/ah.c index 11a236f8d884..c75ac9463e20 100644 --- a/trunk/drivers/infiniband/hw/mlx4/ah.c +++ b/trunk/drivers/infiniband/hw/mlx4/ah.c @@ -30,8 +30,6 @@ * SOFTWARE. */ -#include - #include "mlx4_ib.h" struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) diff --git a/trunk/drivers/infiniband/hw/mlx4/cq.c b/trunk/drivers/infiniband/hw/mlx4/cq.c index cc2ddd29ac57..de5263beab4a 100644 --- a/trunk/drivers/infiniband/hw/mlx4/cq.c +++ b/trunk/drivers/infiniband/hw/mlx4/cq.c @@ -33,7 +33,6 @@ #include #include -#include #include "mlx4_ib.h" #include "user.h" diff --git a/trunk/drivers/infiniband/hw/mlx4/mad.c b/trunk/drivers/infiniband/hw/mlx4/mad.c index f38d5b118927..19e68ab66168 100644 --- a/trunk/drivers/infiniband/hw/mlx4/mad.c +++ b/trunk/drivers/infiniband/hw/mlx4/mad.c @@ -34,7 +34,6 @@ #include #include -#include #include "mlx4_ib.h" diff --git a/trunk/drivers/infiniband/hw/mlx4/main.c b/trunk/drivers/infiniband/hw/mlx4/main.c index 01f2a3f93355..e596537ff353 100644 --- a/trunk/drivers/infiniband/hw/mlx4/main.c +++ b/trunk/drivers/infiniband/hw/mlx4/main.c @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/mlx4/mr.c b/trunk/drivers/infiniband/hw/mlx4/mr.c index 56147b28a23a..8f3666b20ea4 100644 --- a/trunk/drivers/infiniband/hw/mlx4/mr.c +++ b/trunk/drivers/infiniband/hw/mlx4/mr.c @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include "mlx4_ib.h" static u32 convert_access(int acc) diff --git a/trunk/drivers/infiniband/hw/mlx4/qp.c b/trunk/drivers/infiniband/hw/mlx4/qp.c index 5643f4a8ffef..ae75389937d6 100644 --- a/trunk/drivers/infiniband/hw/mlx4/qp.c +++ b/trunk/drivers/infiniband/hw/mlx4/qp.c @@ -32,7 +32,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/mlx4/srq.c b/trunk/drivers/infiniband/hw/mlx4/srq.c index 818b7ecace5e..cf8085bcbd6d 100644 --- a/trunk/drivers/infiniband/hw/mlx4/srq.c +++ b/trunk/drivers/infiniband/hw/mlx4/srq.c @@ -33,7 +33,6 @@ #include #include -#include #include "mlx4_ib.h" #include "user.h" diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_cmd.c b/trunk/drivers/infiniband/hw/mthca/mthca_cmd.c index 3603ae89b606..8c2ed994d540 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_cq.c b/trunk/drivers/infiniband/hw/mthca/mthca_cq.c index 18ee3fa4b88c..d9f4735c2b37 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_cq.c @@ -34,7 +34,6 @@ * SOFTWARE. */ -#include #include #include diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_eq.c b/trunk/drivers/infiniband/hw/mthca/mthca_eq.c index 9388164b6053..8c31fa36e95e 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_eq.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "mthca_dev.h" #include "mthca_cmd.h" diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_main.c b/trunk/drivers/infiniband/hw/mthca/mthca_main.c index 5eee6665919a..b01b28987874 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_main.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_main.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "mthca_dev.h" #include "mthca_config_reg.h" diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_mcg.c b/trunk/drivers/infiniband/hw/mthca/mthca_mcg.c index 515790a606e6..d4c81053e439 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_mcg.c @@ -31,7 +31,7 @@ */ #include -#include +#include #include "mthca_dev.h" #include "mthca_cmd.h" diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_memfree.c b/trunk/drivers/infiniband/hw/mthca/mthca_memfree.c index 8c2a83732b5d..1f7d1a29d2a8 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -35,7 +35,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_provider.c b/trunk/drivers/infiniband/hw/mthca/mthca_provider.c index f080a784bc79..bcf7a4014820 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_provider.c @@ -39,7 +39,6 @@ #include #include -#include #include #include "mthca_dev.h" diff --git a/trunk/drivers/infiniband/hw/nes/nes.c b/trunk/drivers/infiniband/hw/nes/nes.c index de7b9d7166f3..4272c52e38a4 100644 --- a/trunk/drivers/infiniband/hw/nes/nes.c +++ b/trunk/drivers/infiniband/hw/nes/nes.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/nes/nes_cm.c b/trunk/drivers/infiniband/hw/nes/nes_cm.c index 986d6f32dded..2a49ee40b520 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_cm.c +++ b/trunk/drivers/infiniband/hw/nes/nes_cm.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/nes/nes_hw.c b/trunk/drivers/infiniband/hw/nes/nes_hw.c index c36a3f514929..925075557dc2 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_hw.c +++ b/trunk/drivers/infiniband/hw/nes/nes_hw.c @@ -39,7 +39,6 @@ #include #include #include -#include #include "nes.h" diff --git a/trunk/drivers/infiniband/hw/nes/nes_nic.c b/trunk/drivers/infiniband/hw/nes/nes_nic.c index b7c813f4be43..91fdde382e82 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_nic.c +++ b/trunk/drivers/infiniband/hw/nes/nes_nic.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/hw/nes/nes_utils.c b/trunk/drivers/infiniband/hw/nes/nes_utils.c index 186623d86959..729d525c5b70 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_utils.c +++ b/trunk/drivers/infiniband/hw/nes/nes_utils.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/infiniband/hw/nes/nes_verbs.c b/trunk/drivers/infiniband/hw/nes/nes_verbs.c index 5a076e8f116a..69928296d74b 100644 --- a/trunk/drivers/infiniband/hw/nes/nes_verbs.c +++ b/trunk/drivers/infiniband/hw/nes/nes_verbs.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c index bb1004114dec..bc658373ad55 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include "ipoib.h" diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_fs.c index 86eae229dc49..961c585da216 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_fs.c @@ -32,7 +32,6 @@ #include #include -#include struct file_operations; diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c index ec6b4fbe25e4..5df40b128f81 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index b166bb75753d..d41ea27be5e1 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -40,7 +40,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 049a997caff3..68325119f740 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_verbs.c @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include "ipoib.h" int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid, int set_qkey) diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index d7e9740c7248..e3bf00d8cd25 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c @@ -33,6 +33,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/infiniband/ulp/iser/iscsi_iser.c b/trunk/drivers/infiniband/ulp/iser/iscsi_iser.c index 93399dff0c6f..e78af36d3a0e 100644 --- a/trunk/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/trunk/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -56,7 +56,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/infiniband/ulp/iser/iser_verbs.c b/trunk/drivers/infiniband/ulp/iser/iser_verbs.c index b89d76b39a13..308d17bb5146 100644 --- a/trunk/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/trunk/drivers/infiniband/ulp/iser/iser_verbs.c @@ -32,7 +32,6 @@ */ #include #include -#include #include #include "iscsi_iser.h" diff --git a/trunk/drivers/input/ff-core.c b/trunk/drivers/input/ff-core.c index 03078c08309a..b2f07aa1604b 100644 --- a/trunk/drivers/input/ff-core.c +++ b/trunk/drivers/input/ff-core.c @@ -29,7 +29,6 @@ #include #include #include -#include /* * Check that the effect_id is a valid effect and whether the user diff --git a/trunk/drivers/input/ff-memless.c b/trunk/drivers/input/ff-memless.c index 1d881c96ba8f..f967008f332e 100644 --- a/trunk/drivers/input/ff-memless.c +++ b/trunk/drivers/input/ff-memless.c @@ -25,7 +25,6 @@ #define debug(format, arg...) pr_debug("ff-memless: " format "\n", ## arg) -#include #include #include #include diff --git a/trunk/drivers/input/gameport/lightning.c b/trunk/drivers/input/gameport/lightning.c index 85d6ee09f11f..06ad36ed3483 100644 --- a/trunk/drivers/input/gameport/lightning.c +++ b/trunk/drivers/input/gameport/lightning.c @@ -34,6 +34,7 @@ #include #include #include +#include #define L4_PORT 0x201 #define L4_SELECT_ANALOG 0xa4 diff --git a/trunk/drivers/input/input-polldev.c b/trunk/drivers/input/input-polldev.c index 10c9b0a845f0..291d9393d359 100644 --- a/trunk/drivers/input/input-polldev.c +++ b/trunk/drivers/input/input-polldev.c @@ -9,7 +9,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/input/input.c b/trunk/drivers/input/input.c index afd4e2b7658c..e2aad0a51826 100644 --- a/trunk/drivers/input/input.c +++ b/trunk/drivers/input/input.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/joystick/db9.c b/trunk/drivers/input/joystick/db9.c index 8e7de5c7754f..523959484753 100644 --- a/trunk/drivers/input/joystick/db9.c +++ b/trunk/drivers/input/joystick/db9.c @@ -36,7 +36,6 @@ #include #include #include -#include MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("Atari, Amstrad, Commodore, Amiga, Sega, etc. joystick driver"); diff --git a/trunk/drivers/input/joystick/gamecon.c b/trunk/drivers/input/joystick/gamecon.c index fbd62abb66f9..7a55714a1486 100644 --- a/trunk/drivers/input/joystick/gamecon.c +++ b/trunk/drivers/input/joystick/gamecon.c @@ -39,7 +39,6 @@ #include #include #include -#include MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("NES, SNES, N64, MultiSystem, PSX gamepad driver"); diff --git a/trunk/drivers/input/joystick/turbografx.c b/trunk/drivers/input/joystick/turbografx.c index d53b9e900234..b6f859869540 100644 --- a/trunk/drivers/input/joystick/turbografx.c +++ b/trunk/drivers/input/joystick/turbografx.c @@ -35,7 +35,6 @@ #include #include #include -#include MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("TurboGraFX parallel port interface driver"); diff --git a/trunk/drivers/input/keyboard/adp5520-keys.c b/trunk/drivers/input/keyboard/adp5520-keys.c index 3db8006dac3a..a7ba27fb4109 100644 --- a/trunk/drivers/input/keyboard/adp5520-keys.c +++ b/trunk/drivers/input/keyboard/adp5520-keys.c @@ -12,7 +12,6 @@ #include #include #include -#include struct adp5520_keys { struct input_dev *input; diff --git a/trunk/drivers/input/keyboard/adp5588-keys.c b/trunk/drivers/input/keyboard/adp5588-keys.c index 4771ab172b59..b5142d2d5112 100644 --- a/trunk/drivers/input/keyboard/adp5588-keys.c +++ b/trunk/drivers/input/keyboard/adp5588-keys.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/keyboard/bf54x-keys.c b/trunk/drivers/input/keyboard/bf54x-keys.c index 7d989603f875..593c052416b9 100644 --- a/trunk/drivers/input/keyboard/bf54x-keys.c +++ b/trunk/drivers/input/keyboard/bf54x-keys.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/keyboard/davinci_keyscan.c b/trunk/drivers/input/keyboard/davinci_keyscan.c index a91ee941b5c1..d410d7a52f1d 100644 --- a/trunk/drivers/input/keyboard/davinci_keyscan.c +++ b/trunk/drivers/input/keyboard/davinci_keyscan.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/keyboard/ep93xx_keypad.c b/trunk/drivers/input/keyboard/ep93xx_keypad.c index c8242dd190d0..bd25a3af1664 100644 --- a/trunk/drivers/input/keyboard/ep93xx_keypad.c +++ b/trunk/drivers/input/keyboard/ep93xx_keypad.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/keyboard/gpio_keys.c b/trunk/drivers/input/keyboard/gpio_keys.c index b8213fd13c3f..2b708aa85553 100644 --- a/trunk/drivers/input/keyboard/gpio_keys.c +++ b/trunk/drivers/input/keyboard/gpio_keys.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/keyboard/imx_keypad.c b/trunk/drivers/input/keyboard/imx_keypad.c index d92c15c39e68..2ee5b798024d 100644 --- a/trunk/drivers/input/keyboard/imx_keypad.c +++ b/trunk/drivers/input/keyboard/imx_keypad.c @@ -21,7 +21,6 @@ #include #include #include -#include #include /* diff --git a/trunk/drivers/input/keyboard/jornada680_kbd.c b/trunk/drivers/input/keyboard/jornada680_kbd.c index 5fc976dbce0b..781fc6102860 100644 --- a/trunk/drivers/input/keyboard/jornada680_kbd.c +++ b/trunk/drivers/input/keyboard/jornada680_kbd.c @@ -24,7 +24,6 @@ #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 2cd3e1d56ea4..4e016d823069 100644 --- a/trunk/drivers/input/keyboard/jornada720_kbd.c +++ b/trunk/drivers/input/keyboard/jornada720_kbd.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/keyboard/lm8323.c b/trunk/drivers/input/keyboard/lm8323.c index 60ac4684f875..574eda2a4957 100644 --- a/trunk/drivers/input/keyboard/lm8323.c +++ b/trunk/drivers/input/keyboard/lm8323.c @@ -31,7 +31,6 @@ #include #include #include -#include /* Commands to send to the chip. */ #define LM8323_CMD_READ_ID 0x80 /* Read chip ID. */ diff --git a/trunk/drivers/input/keyboard/matrix_keypad.c b/trunk/drivers/input/keyboard/matrix_keypad.c index ffc25cfcef7a..d3c8b61a941d 100644 --- a/trunk/drivers/input/keyboard/matrix_keypad.c +++ b/trunk/drivers/input/keyboard/matrix_keypad.c @@ -22,7 +22,6 @@ #include #include #include -#include struct matrix_keypad { const struct matrix_keypad_platform_data *pdata; diff --git a/trunk/drivers/input/keyboard/max7359_keypad.c b/trunk/drivers/input/keyboard/max7359_keypad.c index 7fc8185e5c1b..3b5b948eba39 100644 --- a/trunk/drivers/input/keyboard/max7359_keypad.c +++ b/trunk/drivers/input/keyboard/max7359_keypad.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/input/keyboard/omap-keypad.c b/trunk/drivers/input/keyboard/omap-keypad.c index a72e61ddca91..1a494d505431 100644 --- a/trunk/drivers/input/keyboard/omap-keypad.c +++ b/trunk/drivers/input/keyboard/omap-keypad.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/keyboard/opencores-kbd.c b/trunk/drivers/input/keyboard/opencores-kbd.c index 1f1a5563f60a..78cccddbf551 100644 --- a/trunk/drivers/input/keyboard/opencores-kbd.c +++ b/trunk/drivers/input/keyboard/opencores-kbd.c @@ -14,7 +14,6 @@ #include #include #include -#include struct opencores_kbd { struct input_dev *input; diff --git a/trunk/drivers/input/keyboard/pxa27x_keypad.c b/trunk/drivers/input/keyboard/pxa27x_keypad.c index 0e53b3bc39af..79cd3e9fdf2e 100644 --- a/trunk/drivers/input/keyboard/pxa27x_keypad.c +++ b/trunk/drivers/input/keyboard/pxa27x_keypad.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/keyboard/pxa930_rotary.c b/trunk/drivers/input/keyboard/pxa930_rotary.c index b7123a44b6ec..95fbba470e65 100644 --- a/trunk/drivers/input/keyboard/pxa930_rotary.c +++ b/trunk/drivers/input/keyboard/pxa930_rotary.c @@ -13,7 +13,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/keyboard/sh_keysc.c b/trunk/drivers/input/keyboard/sh_keysc.c index d7dafd9425b6..854e2035cd6e 100644 --- a/trunk/drivers/input/keyboard/sh_keysc.c +++ b/trunk/drivers/input/keyboard/sh_keysc.c @@ -22,7 +22,6 @@ #include #include #include -#include static const struct { unsigned char kymd, keyout, keyin; diff --git a/trunk/drivers/input/keyboard/tosakbd.c b/trunk/drivers/input/keyboard/tosakbd.c index 3910f269cfc8..42cb3faf7336 100644 --- a/trunk/drivers/input/keyboard/tosakbd.c +++ b/trunk/drivers/input/keyboard/tosakbd.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/keyboard/twl4030_keypad.c b/trunk/drivers/input/keyboard/twl4030_keypad.c index 7aa59e07b689..21d6184efa96 100644 --- a/trunk/drivers/input/keyboard/twl4030_keypad.c +++ b/trunk/drivers/input/keyboard/twl4030_keypad.c @@ -32,7 +32,6 @@ #include #include #include -#include /* diff --git a/trunk/drivers/input/keyboard/w90p910_keypad.c b/trunk/drivers/input/keyboard/w90p910_keypad.c index 4ef764cc493c..6032def03707 100644 --- a/trunk/drivers/input/keyboard/w90p910_keypad.c +++ b/trunk/drivers/input/keyboard/w90p910_keypad.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/misc/88pm860x_onkey.c b/trunk/drivers/input/misc/88pm860x_onkey.c index 40dabd8487b5..69a48e8701b9 100644 --- a/trunk/drivers/input/misc/88pm860x_onkey.c +++ b/trunk/drivers/input/misc/88pm860x_onkey.c @@ -25,7 +25,6 @@ #include #include #include -#include #define PM8607_WAKEUP 0x0b diff --git a/trunk/drivers/input/misc/ati_remote2.c b/trunk/drivers/input/misc/ati_remote2.c index 2124b99378bb..15be5430bc6d 100644 --- a/trunk/drivers/input/misc/ati_remote2.c +++ b/trunk/drivers/input/misc/ati_remote2.c @@ -10,7 +10,6 @@ */ #include -#include #define DRIVER_DESC "ATI/Philips USB RF remote driver" #define DRIVER_VERSION "0.3" diff --git a/trunk/drivers/input/misc/bfin_rotary.c b/trunk/drivers/input/misc/bfin_rotary.c index 4f72bdd69410..61d10177fa83 100644 --- a/trunk/drivers/input/misc/bfin_rotary.c +++ b/trunk/drivers/input/misc/bfin_rotary.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/misc/cobalt_btns.c b/trunk/drivers/input/misc/cobalt_btns.c index fd8407a29631..ee73d7219c92 100644 --- a/trunk/drivers/input/misc/cobalt_btns.c +++ b/trunk/drivers/input/misc/cobalt_btns.c @@ -22,7 +22,6 @@ #include #include #include -#include #define BUTTONS_POLL_INTERVAL 30 /* msec */ #define BUTTONS_COUNT_THRESHOLD 3 diff --git a/trunk/drivers/input/misc/dm355evm_keys.c b/trunk/drivers/input/misc/dm355evm_keys.c index 19af682c24fb..766c06911f41 100644 --- a/trunk/drivers/input/misc/dm355evm_keys.c +++ b/trunk/drivers/input/misc/dm355evm_keys.c @@ -10,7 +10,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/input/misc/pcap_keys.c b/trunk/drivers/input/misc/pcap_keys.c index 99335c286250..7ea969347ca9 100644 --- a/trunk/drivers/input/misc/pcap_keys.c +++ b/trunk/drivers/input/misc/pcap_keys.c @@ -17,7 +17,6 @@ #include #include #include -#include struct pcap_keys { struct pcap_chip *pcap; diff --git a/trunk/drivers/input/misc/pcf50633-input.c b/trunk/drivers/input/misc/pcf50633-input.c index 95562735728d..008de0c5834b 100644 --- a/trunk/drivers/input/misc/pcf50633-input.c +++ b/trunk/drivers/input/misc/pcf50633-input.c @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/misc/rotary_encoder.c b/trunk/drivers/input/misc/rotary_encoder.c index 1f8e0108962e..4ae07935985e 100644 --- a/trunk/drivers/input/misc/rotary_encoder.c +++ b/trunk/drivers/input/misc/rotary_encoder.c @@ -22,7 +22,6 @@ #include #include #include -#include #define DRV_NAME "rotary-encoder" diff --git a/trunk/drivers/input/misc/sgi_btns.c b/trunk/drivers/input/misc/sgi_btns.c index 1a80c0dab83b..be3a15f5b25d 100644 --- a/trunk/drivers/input/misc/sgi_btns.c +++ b/trunk/drivers/input/misc/sgi_btns.c @@ -22,7 +22,6 @@ #include #include #include -#include #ifdef CONFIG_SGI_IP22 #include diff --git a/trunk/drivers/input/misc/sparcspkr.c b/trunk/drivers/input/misc/sparcspkr.c index 0d45422f8095..b064419b90a2 100644 --- a/trunk/drivers/input/misc/sparcspkr.c +++ b/trunk/drivers/input/misc/sparcspkr.c @@ -9,7 +9,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/misc/twl4030-vibra.c b/trunk/drivers/input/misc/twl4030-vibra.c index fee9eac8e04a..2fb79e064da3 100644 --- a/trunk/drivers/input/misc/twl4030-vibra.c +++ b/trunk/drivers/input/misc/twl4030-vibra.c @@ -30,7 +30,6 @@ #include #include #include -#include /* MODULE ID2 */ #define LEDEN 0x00 diff --git a/trunk/drivers/input/misc/winbond-cir.c b/trunk/drivers/input/misc/winbond-cir.c index 64f1de7960c6..9c155a43abc2 100644 --- a/trunk/drivers/input/misc/winbond-cir.c +++ b/trunk/drivers/input/misc/winbond-cir.c @@ -56,7 +56,6 @@ #include #include #include -#include #define DRVNAME "winbond-cir" diff --git a/trunk/drivers/input/misc/wistron_btns.c b/trunk/drivers/input/misc/wistron_btns.c index 04d5a4a3181f..c0afb71a3a6d 100644 --- a/trunk/drivers/input/misc/wistron_btns.c +++ b/trunk/drivers/input/misc/wistron_btns.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/misc/wm831x-on.c b/trunk/drivers/input/misc/wm831x-on.c index c3d7ba5f5b47..1e54bce72db5 100644 --- a/trunk/drivers/input/misc/wm831x-on.c +++ b/trunk/drivers/input/misc/wm831x-on.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/input/mouse/alps.c b/trunk/drivers/input/mouse/alps.c index 99d58764ef03..7490f1da4a53 100644 --- a/trunk/drivers/input/mouse/alps.c +++ b/trunk/drivers/input/mouse/alps.c @@ -15,7 +15,6 @@ * the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/drivers/input/mouse/elantech.c b/trunk/drivers/input/mouse/elantech.c index a138b5da79f9..b27684f267bf 100644 --- a/trunk/drivers/input/mouse/elantech.c +++ b/trunk/drivers/input/mouse/elantech.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/input/mouse/hgpk.c b/trunk/drivers/input/mouse/hgpk.c index 08d66d820d2b..9169d1591c1f 100644 --- a/trunk/drivers/input/mouse/hgpk.c +++ b/trunk/drivers/input/mouse/hgpk.c @@ -30,7 +30,6 @@ */ #define DEBUG -#include #include #include #include diff --git a/trunk/drivers/input/mouse/lifebook.c b/trunk/drivers/input/mouse/lifebook.c index c31ad11df6bb..7c1d7d420ae3 100644 --- a/trunk/drivers/input/mouse/lifebook.c +++ b/trunk/drivers/input/mouse/lifebook.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "psmouse.h" #include "lifebook.h" diff --git a/trunk/drivers/input/mouse/pxa930_trkball.c b/trunk/drivers/input/mouse/pxa930_trkball.c index 943cfec15665..1e827ad0afbe 100644 --- a/trunk/drivers/input/mouse/pxa930_trkball.c +++ b/trunk/drivers/input/mouse/pxa930_trkball.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/mouse/sentelic.c b/trunk/drivers/input/mouse/sentelic.c index 1242775fee19..81a6b81cb2fe 100644 --- a/trunk/drivers/input/mouse/sentelic.c +++ b/trunk/drivers/input/mouse/sentelic.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "psmouse.h" #include "sentelic.h" diff --git a/trunk/drivers/input/mouse/synaptics.c b/trunk/drivers/input/mouse/synaptics.c index 026df6010161..d3f5243fa093 100644 --- a/trunk/drivers/input/mouse/synaptics.c +++ b/trunk/drivers/input/mouse/synaptics.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "psmouse.h" #include "synaptics.h" diff --git a/trunk/drivers/input/mouse/synaptics_i2c.c b/trunk/drivers/input/mouse/synaptics_i2c.c index 8291e7399ffa..9867dfe2a638 100644 --- a/trunk/drivers/input/mouse/synaptics_i2c.c +++ b/trunk/drivers/input/mouse/synaptics_i2c.c @@ -17,7 +17,6 @@ #include #include #include -#include #define DRIVER_NAME "synaptics_i2c" /* maximum product id is 15 characters */ diff --git a/trunk/drivers/input/mouse/touchkit_ps2.c b/trunk/drivers/input/mouse/touchkit_ps2.c index 88121c59c3cc..909431c31ab4 100644 --- a/trunk/drivers/input/mouse/touchkit_ps2.c +++ b/trunk/drivers/input/mouse/touchkit_ps2.c @@ -26,6 +26,7 @@ */ #include +#include #include #include diff --git a/trunk/drivers/input/mouse/trackpoint.c b/trunk/drivers/input/mouse/trackpoint.c index 0643e49ca603..63d4a67830f2 100644 --- a/trunk/drivers/input/mouse/trackpoint.c +++ b/trunk/drivers/input/mouse/trackpoint.c @@ -8,7 +8,6 @@ * Trademarks are the property of their respective owners. */ -#include #include #include #include diff --git a/trunk/drivers/input/serio/altera_ps2.c b/trunk/drivers/input/serio/altera_ps2.c index 7998560a1904..320b7ca48bf8 100644 --- a/trunk/drivers/input/serio/altera_ps2.c +++ b/trunk/drivers/input/serio/altera_ps2.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DRV_NAME "altera_ps2" diff --git a/trunk/drivers/input/serio/at32psif.c b/trunk/drivers/input/serio/at32psif.c index 6ee8f0ddad51..b54452a8c771 100644 --- a/trunk/drivers/input/serio/at32psif.c +++ b/trunk/drivers/input/serio/at32psif.c @@ -18,7 +18,6 @@ #include #include #include -#include /* PSIF register offsets */ #define PSIF_CR 0x00 diff --git a/trunk/drivers/input/serio/ct82c710.c b/trunk/drivers/input/serio/ct82c710.c index 4a3084695c00..d1380fc72cc6 100644 --- a/trunk/drivers/input/serio/ct82c710.c +++ b/trunk/drivers/input/serio/ct82c710.c @@ -35,7 +35,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/serio/gscps2.c b/trunk/drivers/input/serio/gscps2.c index 3c287dd879d3..06addfa7cc47 100644 --- a/trunk/drivers/input/serio/gscps2.c +++ b/trunk/drivers/input/serio/gscps2.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/input/serio/hil_mlc.c b/trunk/drivers/input/serio/hil_mlc.c index c92f4edfee7b..6cd03ebaf5fb 100644 --- a/trunk/drivers/input/serio/hil_mlc.c +++ b/trunk/drivers/input/serio/hil_mlc.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/serio/i8042.c b/trunk/drivers/input/serio/i8042.c index 577688b5b951..9302ba0e48f8 100644 --- a/trunk/drivers/input/serio/i8042.c +++ b/trunk/drivers/input/serio/i8042.c @@ -21,7 +21,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/input/serio/libps2.c b/trunk/drivers/input/serio/libps2.c index 980af94ba9c8..f3876acc3e83 100644 --- a/trunk/drivers/input/serio/libps2.c +++ b/trunk/drivers/input/serio/libps2.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/input/serio/parkbd.c b/trunk/drivers/input/serio/parkbd.c index 26b45936f9fd..b089977e0ef9 100644 --- a/trunk/drivers/input/serio/parkbd.c +++ b/trunk/drivers/input/serio/parkbd.c @@ -46,7 +46,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/input/serio/pcips2.c b/trunk/drivers/input/serio/pcips2.c index 43494742541c..797314be7af2 100644 --- a/trunk/drivers/input/serio/pcips2.c +++ b/trunk/drivers/input/serio/pcips2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/serio/q40kbd.c b/trunk/drivers/input/serio/q40kbd.c index 5eb84b3b67fb..e36a0901646c 100644 --- a/trunk/drivers/input/serio/q40kbd.c +++ b/trunk/drivers/input/serio/q40kbd.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/serio/rpckbd.c b/trunk/drivers/input/serio/rpckbd.c index 9da6fbcaaa7e..ed045c99f84b 100644 --- a/trunk/drivers/input/serio/rpckbd.c +++ b/trunk/drivers/input/serio/rpckbd.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/serio/xilinx_ps2.c b/trunk/drivers/input/serio/xilinx_ps2.c index f84f8e32e3f1..8298e1f68234 100644 --- a/trunk/drivers/input/serio/xilinx_ps2.c +++ b/trunk/drivers/input/serio/xilinx_ps2.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/sparse-keymap.c b/trunk/drivers/input/sparse-keymap.c index 82ae18d29685..e6bde55e5203 100644 --- a/trunk/drivers/input/sparse-keymap.c +++ b/trunk/drivers/input/sparse-keymap.c @@ -15,7 +15,6 @@ #include #include -#include MODULE_AUTHOR("Dmitry Torokhov "); MODULE_DESCRIPTION("Generic support for sparse keymaps"); diff --git a/trunk/drivers/input/touchscreen/88pm860x-ts.c b/trunk/drivers/input/touchscreen/88pm860x-ts.c index b3aebc2166ba..286bb490a9f2 100644 --- a/trunk/drivers/input/touchscreen/88pm860x-ts.c +++ b/trunk/drivers/input/touchscreen/88pm860x-ts.c @@ -14,7 +14,6 @@ #include #include #include -#include #define MEAS_LEN (8) #define ACCURATE_BIT (12) diff --git a/trunk/drivers/input/touchscreen/atmel-wm97xx.c b/trunk/drivers/input/touchscreen/atmel-wm97xx.c index fa8e56bd9094..a12242f77e23 100644 --- a/trunk/drivers/input/touchscreen/atmel-wm97xx.c +++ b/trunk/drivers/input/touchscreen/atmel-wm97xx.c @@ -19,7 +19,6 @@ #include #include #include -#include #define AC97C_ICA 0x10 #define AC97C_CBRHR 0x30 diff --git a/trunk/drivers/input/touchscreen/da9034-ts.c b/trunk/drivers/input/touchscreen/da9034-ts.c index 2b72a5923c16..3ffd4c4b170c 100644 --- a/trunk/drivers/input/touchscreen/da9034-ts.c +++ b/trunk/drivers/input/touchscreen/da9034-ts.c @@ -19,7 +19,6 @@ #include #include #include -#include #define DA9034_MANUAL_CTRL 0x50 #define DA9034_LDO_ADC_EN (1 << 4) diff --git a/trunk/drivers/input/touchscreen/eeti_ts.c b/trunk/drivers/input/touchscreen/eeti_ts.c index 204b8a1a601c..9029bd3f34e5 100644 --- a/trunk/drivers/input/touchscreen/eeti_ts.c +++ b/trunk/drivers/input/touchscreen/eeti_ts.c @@ -33,7 +33,6 @@ #include #include #include -#include static int flip_x; module_param(flip_x, bool, 0644); diff --git a/trunk/drivers/input/touchscreen/jornada720_ts.c b/trunk/drivers/input/touchscreen/jornada720_ts.c index 4b0a061811ff..c8b7e8a45c4d 100644 --- a/trunk/drivers/input/touchscreen/jornada720_ts.c +++ b/trunk/drivers/input/touchscreen/jornada720_ts.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/input/touchscreen/mc13783_ts.c b/trunk/drivers/input/touchscreen/mc13783_ts.c index c5bc62d85bb6..be54fd639aca 100644 --- a/trunk/drivers/input/touchscreen/mc13783_ts.c +++ b/trunk/drivers/input/touchscreen/mc13783_ts.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #define MC13783_TS_NAME "mc13783-ts" diff --git a/trunk/drivers/input/touchscreen/mcs5000_ts.c b/trunk/drivers/input/touchscreen/mcs5000_ts.c index ce8ab0269f6f..4c28b89757f9 100644 --- a/trunk/drivers/input/touchscreen/mcs5000_ts.c +++ b/trunk/drivers/input/touchscreen/mcs5000_ts.c @@ -20,7 +20,6 @@ #include #include #include -#include /* Registers */ #define MCS5000_TS_STATUS 0x00 diff --git a/trunk/drivers/input/touchscreen/migor_ts.c b/trunk/drivers/input/touchscreen/migor_ts.c index defe5dd3627c..141dd584330e 100644 --- a/trunk/drivers/input/touchscreen/migor_ts.c +++ b/trunk/drivers/input/touchscreen/migor_ts.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/touchscreen/pcap_ts.c b/trunk/drivers/input/touchscreen/pcap_ts.c index ea6ef16e59b4..b79097e3028a 100644 --- a/trunk/drivers/input/touchscreen/pcap_ts.c +++ b/trunk/drivers/input/touchscreen/pcap_ts.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/input/touchscreen/s3c2410_ts.c b/trunk/drivers/input/touchscreen/s3c2410_ts.c index 98a7d1279486..3755a47d053c 100644 --- a/trunk/drivers/input/touchscreen/s3c2410_ts.c +++ b/trunk/drivers/input/touchscreen/s3c2410_ts.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/input/touchscreen/ucb1400_ts.c b/trunk/drivers/input/touchscreen/ucb1400_ts.c index 028a5363eea1..89dcbe7b4b02 100644 --- a/trunk/drivers/input/touchscreen/ucb1400_ts.c +++ b/trunk/drivers/input/touchscreen/ucb1400_ts.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/input/touchscreen/w90p910_ts.c b/trunk/drivers/input/touchscreen/w90p910_ts.c index cc18265be1a8..6ccbdbbf33fe 100644 --- a/trunk/drivers/input/touchscreen/w90p910_ts.c +++ b/trunk/drivers/input/touchscreen/w90p910_ts.c @@ -16,7 +16,6 @@ #include #include #include -#include /* ADC controller bit defines */ #define ADC_DELAY 0xf00 diff --git a/trunk/drivers/input/touchscreen/wm97xx-core.c b/trunk/drivers/input/touchscreen/wm97xx-core.c index 5109bf3dd858..f944918466e5 100644 --- a/trunk/drivers/input/touchscreen/wm97xx-core.c +++ b/trunk/drivers/input/touchscreen/wm97xx-core.c @@ -48,7 +48,6 @@ #include #include #include -#include #define TS_NAME "wm97xx" #define WM_CORE_VERSION "1.00" diff --git a/trunk/drivers/input/xen-kbdfront.c b/trunk/drivers/input/xen-kbdfront.c index e14081675bb2..d30436fee476 100644 --- a/trunk/drivers/input/xen-kbdfront.c +++ b/trunk/drivers/input/xen-kbdfront.c @@ -21,7 +21,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/isdn/act2000/module.c b/trunk/drivers/isdn/act2000/module.c index 05ed72c4cf59..f774e12bb64d 100644 --- a/trunk/drivers/isdn/act2000/module.c +++ b/trunk/drivers/isdn/act2000/module.c @@ -16,7 +16,6 @@ #include "act2000_isa.h" #include "capi.h" #include -#include #include static unsigned short act2000_isa_ports[] = diff --git a/trunk/drivers/isdn/capi/capifs.c b/trunk/drivers/isdn/capi/capifs.c index 2b83850997c3..8596bd1a4d26 100644 --- a/trunk/drivers/isdn/capi/capifs.c +++ b/trunk/drivers/isdn/capi/capifs.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/capi/capilib.c b/trunk/drivers/isdn/capi/capilib.c index 0b041df2108c..fcaa1241ee77 100644 --- a/trunk/drivers/isdn/capi/capilib.c +++ b/trunk/drivers/isdn/capi/capilib.c @@ -1,5 +1,4 @@ -#include #include #include #include diff --git a/trunk/drivers/isdn/capi/capiutil.c b/trunk/drivers/isdn/capi/capiutil.c index 03c469e4451f..26626eead828 100644 --- a/trunk/drivers/isdn/capi/capiutil.c +++ b/trunk/drivers/isdn/capi/capiutil.c @@ -18,7 +18,6 @@ #include #include #include -#include /* from CAPI2.0 DDK AVM Berlin GmbH */ diff --git a/trunk/drivers/isdn/capi/kcapi.c b/trunk/drivers/isdn/capi/kcapi.c index bd00dceacaf0..ce9b05b9e93a 100644 --- a/trunk/drivers/isdn/capi/kcapi.c +++ b/trunk/drivers/isdn/capi/kcapi.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/divert/divert_procfs.c b/trunk/drivers/isdn/divert/divert_procfs.c index 9f49d9065791..3697c409bec6 100644 --- a/trunk/drivers/isdn/divert/divert_procfs.c +++ b/trunk/drivers/isdn/divert/divert_procfs.c @@ -11,7 +11,6 @@ #include #include -#include #ifdef CONFIG_PROC_FS #include #else diff --git a/trunk/drivers/isdn/divert/isdn_divert.c b/trunk/drivers/isdn/divert/isdn_divert.c index 70cf6bac7a5a..77e9fdda0597 100644 --- a/trunk/drivers/isdn/divert/isdn_divert.c +++ b/trunk/drivers/isdn/divert/isdn_divert.c @@ -10,7 +10,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/isdn/gigaset/capi.c b/trunk/drivers/isdn/gigaset/capi.c index eb7e27105a82..0220c19351d9 100644 --- a/trunk/drivers/isdn/gigaset/capi.c +++ b/trunk/drivers/isdn/gigaset/capi.c @@ -12,7 +12,6 @@ */ #include "gigaset.h" -#include #include #include #include diff --git a/trunk/drivers/isdn/gigaset/common.c b/trunk/drivers/isdn/gigaset/common.c index 0b39b387c125..bdc01cb9f0ab 100644 --- a/trunk/drivers/isdn/gigaset/common.c +++ b/trunk/drivers/isdn/gigaset/common.c @@ -17,7 +17,6 @@ #include #include #include -#include /* Version Information */ #define DRIVER_AUTHOR "Hansjoerg Lipp , Tilman Schmidt , Stefan Eilers" diff --git a/trunk/drivers/isdn/gigaset/gigaset.h b/trunk/drivers/isdn/gigaset/gigaset.h index 9ef5b0463fd5..cdd144ecdc5f 100644 --- a/trunk/drivers/isdn/gigaset/gigaset.h +++ b/trunk/drivers/isdn/gigaset/gigaset.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/gigaset/i4l.c b/trunk/drivers/isdn/gigaset/i4l.c index c99fb9790a13..c22e5ace8276 100644 --- a/trunk/drivers/isdn/gigaset/i4l.c +++ b/trunk/drivers/isdn/gigaset/i4l.c @@ -15,7 +15,6 @@ #include "gigaset.h" #include -#include #define HW_HDR_LEN 2 /* Header size used to store ack info */ diff --git a/trunk/drivers/isdn/gigaset/ser-gigaset.c b/trunk/drivers/isdn/gigaset/ser-gigaset.c index 8b0afd203a07..168d585d64d8 100644 --- a/trunk/drivers/isdn/gigaset/ser-gigaset.c +++ b/trunk/drivers/isdn/gigaset/ser-gigaset.c @@ -17,7 +17,6 @@ #include #include #include -#include /* Version Information */ #define DRIVER_AUTHOR "Tilman Schmidt" diff --git a/trunk/drivers/isdn/hardware/avm/b1.c b/trunk/drivers/isdn/hardware/avm/b1.c index 2a57da590d79..c38fa0f4c729 100644 --- a/trunk/drivers/isdn/hardware/avm/b1.c +++ b/trunk/drivers/isdn/hardware/avm/b1.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/avm/b1dma.c b/trunk/drivers/isdn/hardware/avm/b1dma.c index 9c8d7aa053c5..124550d0dbf3 100644 --- a/trunk/drivers/isdn/hardware/avm/b1dma.c +++ b/trunk/drivers/isdn/hardware/avm/b1dma.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/avm/c4.c b/trunk/drivers/isdn/hardware/avm/c4.c index 7715d3242ec8..de6e6b311819 100644 --- a/trunk/drivers/isdn/hardware/avm/c4.c +++ b/trunk/drivers/isdn/hardware/avm/c4.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/avm/t1isa.c b/trunk/drivers/isdn/hardware/avm/t1isa.c index 08216b14be13..baeeb3c2a3ee 100644 --- a/trunk/drivers/isdn/hardware/avm/t1isa.c +++ b/trunk/drivers/isdn/hardware/avm/t1isa.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/eicon/capimain.c b/trunk/drivers/isdn/hardware/eicon/capimain.c index 97a20964cfc7..0f073cd73763 100644 --- a/trunk/drivers/isdn/hardware/eicon/capimain.c +++ b/trunk/drivers/isdn/hardware/eicon/capimain.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/mISDN/avmfritz.c b/trunk/drivers/isdn/hardware/mISDN/avmfritz.c index d4215369bb59..81ac541d40d9 100644 --- a/trunk/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/trunk/drivers/isdn/hardware/mISDN/avmfritz.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include "ipac.h" diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c index 75e71b5d9215..8affba3e569d 100644 --- a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -153,7 +153,6 @@ #define HFC_MULTI_VERSION "2.03" #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c index 5940a2c12074..70e6b0e01121 100644 --- a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c @@ -48,7 +48,6 @@ #include #include #include -#include #include "hfc_pci.h" diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcsusb.c b/trunk/drivers/isdn/hardware/mISDN/hfcsusb.c index b3b7e2879bac..a64bb6c67ba7 100644 --- a/trunk/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/trunk/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "hfcsusb.h" static const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05"; diff --git a/trunk/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/trunk/drivers/isdn/hardware/mISDN/mISDNinfineon.c index f5b3d2b26a08..36c6c616a655 100644 --- a/trunk/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/trunk/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -42,7 +42,6 @@ #include #include #include -#include #include "ipac.h" #define INFINEON_REV "1.0" diff --git a/trunk/drivers/isdn/hardware/mISDN/mISDNipac.c b/trunk/drivers/isdn/hardware/mISDN/mISDNipac.c index 64ecc6f5ffaf..613ba0435372 100644 --- a/trunk/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/trunk/drivers/isdn/hardware/mISDN/mISDNipac.c @@ -20,7 +20,6 @@ * */ -#include #include #include #include "ipac.h" diff --git a/trunk/drivers/isdn/hardware/mISDN/mISDNisar.c b/trunk/drivers/isdn/hardware/mISDN/mISDNisar.c index 38eb31439a73..f0bc6fa95809 100644 --- a/trunk/drivers/isdn/hardware/mISDN/mISDNisar.c +++ b/trunk/drivers/isdn/hardware/mISDN/mISDNisar.c @@ -25,7 +25,6 @@ */ /* #define DEBUG */ -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/mISDN/netjet.c b/trunk/drivers/isdn/hardware/mISDN/netjet.c index 0a3553df065f..6c1b164937a9 100644 --- a/trunk/drivers/isdn/hardware/mISDN/netjet.c +++ b/trunk/drivers/isdn/hardware/mISDN/netjet.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "ipac.h" #include "iohelper.h" #include "netjet.h" diff --git a/trunk/drivers/isdn/hardware/mISDN/speedfax.c b/trunk/drivers/isdn/hardware/mISDN/speedfax.c index d097a4e40e2b..7726afdbb40b 100644 --- a/trunk/drivers/isdn/hardware/mISDN/speedfax.c +++ b/trunk/drivers/isdn/hardware/mISDN/speedfax.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hardware/mISDN/w6692.c b/trunk/drivers/isdn/hardware/mISDN/w6692.c index 31f9d71fb22f..2952a58c7a61 100644 --- a/trunk/drivers/isdn/hardware/mISDN/w6692.c +++ b/trunk/drivers/isdn/hardware/mISDN/w6692.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "w6692.h" #define W6692_REV "2.0" diff --git a/trunk/drivers/isdn/hisax/amd7930_fn.c b/trunk/drivers/isdn/hisax/amd7930_fn.c index 5d7278397878..d6fdf1f66754 100644 --- a/trunk/drivers/isdn/hisax/amd7930_fn.c +++ b/trunk/drivers/isdn/hisax/amd7930_fn.c @@ -59,7 +59,6 @@ #include "amd7930_fn.h" #include #include -#include static void Amd7930_new_ph(struct IsdnCardState *cs); diff --git a/trunk/drivers/isdn/hisax/avm_pci.c b/trunk/drivers/isdn/hisax/avm_pci.c index fcf4ed1cb4b9..14295a155e71 100644 --- a/trunk/drivers/isdn/hisax/avm_pci.c +++ b/trunk/drivers/isdn/hisax/avm_pci.c @@ -17,7 +17,6 @@ #include "isac.h" #include "isdnl1.h" #include -#include #include #include diff --git a/trunk/drivers/isdn/hisax/callc.c b/trunk/drivers/isdn/hisax/callc.c index f58ded8f403f..475b1a020003 100644 --- a/trunk/drivers/isdn/hisax/callc.c +++ b/trunk/drivers/isdn/hisax/callc.c @@ -17,7 +17,6 @@ */ #include -#include #include #include "hisax.h" #include diff --git a/trunk/drivers/isdn/hisax/config.c b/trunk/drivers/isdn/hisax/config.c index 544cf4b1cce3..4fab18d4d02f 100644 --- a/trunk/drivers/isdn/hisax/config.c +++ b/trunk/drivers/isdn/hisax/config.c @@ -23,7 +23,6 @@ #include #include #include -#include #define HISAX_STATUS_BUFSIZE 4096 /* diff --git a/trunk/drivers/isdn/hisax/elsa.c b/trunk/drivers/isdn/hisax/elsa.c index 5d9d338814aa..23c41fcd864e 100644 --- a/trunk/drivers/isdn/hisax/elsa.c +++ b/trunk/drivers/isdn/hisax/elsa.c @@ -19,7 +19,6 @@ */ #include -#include #include "hisax.h" #include "arcofi.h" #include "isac.h" diff --git a/trunk/drivers/isdn/hisax/elsa_ser.c b/trunk/drivers/isdn/hisax/elsa_ser.c index cbda3790a10d..1657bba7879e 100644 --- a/trunk/drivers/isdn/hisax/elsa_ser.c +++ b/trunk/drivers/isdn/hisax/elsa_ser.c @@ -9,7 +9,6 @@ #include #include -#include #define MAX_MODEM_BUF 256 #define WAKEUP_CHARS (MAX_MODEM_BUF/2) diff --git a/trunk/drivers/isdn/hisax/fsm.c b/trunk/drivers/isdn/hisax/fsm.c index 732ea633758c..34fade96a581 100644 --- a/trunk/drivers/isdn/hisax/fsm.c +++ b/trunk/drivers/isdn/hisax/fsm.c @@ -15,7 +15,6 @@ */ #include -#include #include #include "hisax.h" diff --git a/trunk/drivers/isdn/hisax/hfc4s8s_l1.c b/trunk/drivers/isdn/hisax/hfc4s8s_l1.c index 051b44e2556c..ab98e135bcbb 100644 --- a/trunk/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/trunk/drivers/isdn/hisax/hfc4s8s_l1.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/hisax/hfc_2bds0.c b/trunk/drivers/isdn/hisax/hfc_2bds0.c index 7250f56a5246..8d22f50760eb 100644 --- a/trunk/drivers/isdn/hisax/hfc_2bds0.c +++ b/trunk/drivers/isdn/hisax/hfc_2bds0.c @@ -12,7 +12,6 @@ #include #include -#include #include "hisax.h" #include "hfc_2bds0.h" #include "isdnl1.h" diff --git a/trunk/drivers/isdn/hisax/hfc_2bs0.c b/trunk/drivers/isdn/hisax/hfc_2bs0.c index b1f6481e1193..d0520ad30677 100644 --- a/trunk/drivers/isdn/hisax/hfc_2bs0.c +++ b/trunk/drivers/isdn/hisax/hfc_2bs0.c @@ -16,7 +16,6 @@ #include "isac.h" #include "isdnl1.h" #include -#include static inline int WaitForBusy(struct IsdnCardState *cs) diff --git a/trunk/drivers/isdn/hisax/hfc_sx.c b/trunk/drivers/isdn/hisax/hfc_sx.c index be5faf4aa868..419f87cad8cb 100644 --- a/trunk/drivers/isdn/hisax/hfc_sx.c +++ b/trunk/drivers/isdn/hisax/hfc_sx.c @@ -17,7 +17,6 @@ #include "isdnl1.h" #include #include -#include static const char *hfcsx_revision = "$Revision: 1.12.2.5 $"; diff --git a/trunk/drivers/isdn/hisax/hfc_usb.c b/trunk/drivers/isdn/hisax/hfc_usb.c index ed9527aa5f2c..aaaeaafd86f4 100644 --- a/trunk/drivers/isdn/hisax/hfc_usb.c +++ b/trunk/drivers/isdn/hisax/hfc_usb.c @@ -39,7 +39,6 @@ #include #include #include -#include #include "hisax.h" #include "hisax_if.h" #include "hfc_usb.h" diff --git a/trunk/drivers/isdn/hisax/hisax_isac.c b/trunk/drivers/isdn/hisax/hisax_isac.c index a8447fa2f470..d0fefcf999cb 100644 --- a/trunk/drivers/isdn/hisax/hisax_isac.c +++ b/trunk/drivers/isdn/hisax/hisax_isac.c @@ -21,7 +21,6 @@ */ #include -#include #include #include #include "hisax_isac.h" diff --git a/trunk/drivers/isdn/hisax/hscx.c b/trunk/drivers/isdn/hisax/hscx.c index 904b9100df95..c8f9951f7914 100644 --- a/trunk/drivers/isdn/hisax/hscx.c +++ b/trunk/drivers/isdn/hisax/hscx.c @@ -16,7 +16,6 @@ #include "isac.h" #include "isdnl1.h" #include -#include static char *HSCXVer[] = {"A1", "?1", "A2", "?3", "A3", "V2.1", "?6", "?7", diff --git a/trunk/drivers/isdn/hisax/icc.c b/trunk/drivers/isdn/hisax/icc.c index 63057268cc3d..c80cbb8a2ef9 100644 --- a/trunk/drivers/isdn/hisax/icc.c +++ b/trunk/drivers/isdn/hisax/icc.c @@ -20,7 +20,6 @@ // #include "arcofi.h" #include "isdnl1.h" #include -#include #define DBUSY_TIMER_VALUE 80 #define ARCOFI_USE 0 diff --git a/trunk/drivers/isdn/hisax/ipacx.c b/trunk/drivers/isdn/hisax/ipacx.c index 751b25f2ff58..00afd5538909 100644 --- a/trunk/drivers/isdn/hisax/ipacx.c +++ b/trunk/drivers/isdn/hisax/ipacx.c @@ -10,7 +10,6 @@ * */ #include -#include #include #include "hisax_if.h" #include "hisax.h" diff --git a/trunk/drivers/isdn/hisax/isac.c b/trunk/drivers/isdn/hisax/isac.c index 2b66728136d5..a19354d94343 100644 --- a/trunk/drivers/isdn/hisax/isac.c +++ b/trunk/drivers/isdn/hisax/isac.c @@ -18,7 +18,6 @@ #include "arcofi.h" #include "isdnl1.h" #include -#include #include #define DBUSY_TIMER_VALUE 80 diff --git a/trunk/drivers/isdn/hisax/isar.c b/trunk/drivers/isdn/hisax/isar.c index 40b914bded8c..6bde16c00fb5 100644 --- a/trunk/drivers/isdn/hisax/isar.c +++ b/trunk/drivers/isdn/hisax/isar.c @@ -13,7 +13,6 @@ #include "isar.h" #include "isdnl1.h" #include -#include #define DBG_LOADFIRM 0 #define DUMP_MBOXFRAME 2 diff --git a/trunk/drivers/isdn/hisax/isdnl1.c b/trunk/drivers/isdn/hisax/isdnl1.c index d5eeacf565d6..9ce6abe05b1a 100644 --- a/trunk/drivers/isdn/hisax/isdnl1.c +++ b/trunk/drivers/isdn/hisax/isdnl1.c @@ -19,7 +19,6 @@ */ #include -#include #include "hisax.h" #include "isdnl1.h" diff --git a/trunk/drivers/isdn/hisax/isdnl2.c b/trunk/drivers/isdn/hisax/isdnl2.c index 0858791978d8..7b9496a63b5f 100644 --- a/trunk/drivers/isdn/hisax/isdnl2.c +++ b/trunk/drivers/isdn/hisax/isdnl2.c @@ -16,7 +16,6 @@ */ #include -#include #include "hisax.h" #include "isdnl2.h" diff --git a/trunk/drivers/isdn/hisax/isdnl3.c b/trunk/drivers/isdn/hisax/isdnl3.c index fd0b643ab740..06766022d3ae 100644 --- a/trunk/drivers/isdn/hisax/isdnl3.c +++ b/trunk/drivers/isdn/hisax/isdnl3.c @@ -16,7 +16,6 @@ */ #include -#include #include "hisax.h" #include "isdnl3.h" diff --git a/trunk/drivers/isdn/hisax/jade.c b/trunk/drivers/isdn/hisax/jade.c index ea8f840871d0..70840a710acf 100644 --- a/trunk/drivers/isdn/hisax/jade.c +++ b/trunk/drivers/isdn/hisax/jade.c @@ -17,7 +17,6 @@ #include "jade.h" #include "isdnl1.h" #include -#include int diff --git a/trunk/drivers/isdn/hisax/l3dss1.c b/trunk/drivers/isdn/hisax/l3dss1.c index cc6ee2d39880..a12fa4d34903 100644 --- a/trunk/drivers/isdn/hisax/l3dss1.c +++ b/trunk/drivers/isdn/hisax/l3dss1.c @@ -23,7 +23,6 @@ #include "isdnl3.h" #include "l3dss1.h" #include -#include extern char *HiSax_getrev(const char *revision); static const char *dss1_revision = "$Revision: 2.32.2.3 $"; diff --git a/trunk/drivers/isdn/hisax/l3ni1.c b/trunk/drivers/isdn/hisax/l3ni1.c index f9584491fe8e..4622d43c7e10 100644 --- a/trunk/drivers/isdn/hisax/l3ni1.c +++ b/trunk/drivers/isdn/hisax/l3ni1.c @@ -22,7 +22,6 @@ #include "isdnl3.h" #include "l3ni1.h" #include -#include extern char *HiSax_getrev(const char *revision); static const char *ni1_revision = "$Revision: 2.8.2.3 $"; diff --git a/trunk/drivers/isdn/hisax/netjet.c b/trunk/drivers/isdn/hisax/netjet.c index 5d7f0f2ff9b9..02c6fbaeccf8 100644 --- a/trunk/drivers/isdn/hisax/netjet.c +++ b/trunk/drivers/isdn/hisax/netjet.c @@ -21,7 +21,6 @@ #include "isdnl1.h" #include #include -#include #include #include "netjet.h" diff --git a/trunk/drivers/isdn/hisax/st5481_b.c b/trunk/drivers/isdn/hisax/st5481_b.c index e56e5af889b6..95b1cdd97958 100644 --- a/trunk/drivers/isdn/hisax/st5481_b.c +++ b/trunk/drivers/isdn/hisax/st5481_b.c @@ -11,8 +11,8 @@ */ #include -#include #include +#include #include #include #include "st5481.h" diff --git a/trunk/drivers/isdn/hisax/st5481_d.c b/trunk/drivers/isdn/hisax/st5481_d.c index b7876b19fe73..39e8e49cfd2d 100644 --- a/trunk/drivers/isdn/hisax/st5481_d.c +++ b/trunk/drivers/isdn/hisax/st5481_d.c @@ -11,8 +11,8 @@ */ #include -#include #include +#include #include #include "st5481.h" diff --git a/trunk/drivers/isdn/hisax/tei.c b/trunk/drivers/isdn/hisax/tei.c index f4cb178b0666..6e65424f1f04 100644 --- a/trunk/drivers/isdn/hisax/tei.c +++ b/trunk/drivers/isdn/hisax/tei.c @@ -17,7 +17,6 @@ #include "hisax.h" #include "isdnl2.h" -#include #include #include diff --git a/trunk/drivers/isdn/hisax/w6692.c b/trunk/drivers/isdn/hisax/w6692.c index e2cfb6f5aa42..9d6e864023fe 100644 --- a/trunk/drivers/isdn/hisax/w6692.c +++ b/trunk/drivers/isdn/hisax/w6692.c @@ -16,7 +16,6 @@ #include "isdnl1.h" #include #include -#include /* table entry in the PCI devices list */ typedef struct { diff --git a/trunk/drivers/isdn/hysdn/hycapi.c b/trunk/drivers/isdn/hysdn/hycapi.c index 6299b06ae009..fe874afa4f81 100644 --- a/trunk/drivers/isdn/hysdn/hycapi.c +++ b/trunk/drivers/isdn/hysdn/hycapi.c @@ -17,7 +17,6 @@ #include #include #include -#include #define VER_DRIVER 0 #define VER_CARDTYPE 1 diff --git a/trunk/drivers/isdn/hysdn/hysdn_procconf.c b/trunk/drivers/isdn/hysdn/hysdn_procconf.c index 80966462d6dc..90b35e1a4b7e 100644 --- a/trunk/drivers/isdn/hysdn/hysdn_procconf.c +++ b/trunk/drivers/isdn/hysdn/hysdn_procconf.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/isdn/hysdn/hysdn_proclog.c b/trunk/drivers/isdn/hysdn/hysdn_proclog.c index e83f6fda32fe..8bcae28c4409 100644 --- a/trunk/drivers/isdn/hysdn/hysdn_proclog.c +++ b/trunk/drivers/isdn/hysdn/hysdn_proclog.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "hysdn_defs.h" diff --git a/trunk/drivers/isdn/i4l/isdn_audio.c b/trunk/drivers/isdn/i4l/isdn_audio.c index 861bdf3421f2..fb350c567c6b 100644 --- a/trunk/drivers/isdn/i4l/isdn_audio.c +++ b/trunk/drivers/isdn/i4l/isdn_audio.c @@ -12,7 +12,6 @@ */ #include -#include #include "isdn_audio.h" #include "isdn_common.h" diff --git a/trunk/drivers/isdn/i4l/isdn_common.c b/trunk/drivers/isdn/i4l/isdn_common.c index 70044ee4b228..00c60e2e0ff7 100644 --- a/trunk/drivers/isdn/i4l/isdn_common.c +++ b/trunk/drivers/isdn/i4l/isdn_common.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/i4l/isdn_net.c b/trunk/drivers/isdn/i4l/isdn_net.c index 8c85d1e88cc6..507e13d9a57c 100644 --- a/trunk/drivers/isdn/i4l/isdn_net.c +++ b/trunk/drivers/isdn/i4l/isdn_net.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/isdn/i4l/isdn_ppp.c b/trunk/drivers/isdn/i4l/isdn_ppp.c index f37b8f68d0aa..45df6675e8ed 100644 --- a/trunk/drivers/isdn/i4l/isdn_ppp.c +++ b/trunk/drivers/isdn/i4l/isdn_ppp.c @@ -12,7 +12,6 @@ #include #include #include -#include #ifdef CONFIG_IPPP_FILTER #include #endif diff --git a/trunk/drivers/isdn/i4l/isdn_tty.c b/trunk/drivers/isdn/i4l/isdn_tty.c index fc8454d2eea5..2881a66c1aa9 100644 --- a/trunk/drivers/isdn/i4l/isdn_tty.c +++ b/trunk/drivers/isdn/i4l/isdn_tty.c @@ -12,7 +12,6 @@ #undef ISDN_TTY_STAT_DEBUG #include -#include #include #include #include "isdn_common.h" diff --git a/trunk/drivers/isdn/i4l/isdn_x25iface.c b/trunk/drivers/isdn/i4l/isdn_x25iface.c index efcf1f9327e5..8b3efc243161 100644 --- a/trunk/drivers/isdn/i4l/isdn_x25iface.c +++ b/trunk/drivers/isdn/i4l/isdn_x25iface.c @@ -20,7 +20,6 @@ /* #include */ #include #include -#include #include #include #include "isdn_x25iface.h" diff --git a/trunk/drivers/isdn/icn/icn.c b/trunk/drivers/isdn/icn/icn.c index 2e847a90bad0..bf7997abc4ac 100644 --- a/trunk/drivers/isdn/icn/icn.c +++ b/trunk/drivers/isdn/icn/icn.c @@ -12,7 +12,6 @@ #include "icn.h" #include #include -#include #include static int portbase = ICN_BASEADDR; diff --git a/trunk/drivers/isdn/isdnloop/isdnloop.c b/trunk/drivers/isdn/isdnloop/isdnloop.c index b8a1098b66ed..a335c85a736e 100644 --- a/trunk/drivers/isdn/isdnloop/isdnloop.c +++ b/trunk/drivers/isdn/isdnloop/isdnloop.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include "isdnloop.h" diff --git a/trunk/drivers/isdn/mISDN/clock.c b/trunk/drivers/isdn/mISDN/clock.c index 1fa629b3b940..f1bbc88763b2 100644 --- a/trunk/drivers/isdn/mISDN/clock.c +++ b/trunk/drivers/isdn/mISDN/clock.c @@ -33,7 +33,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/core.c b/trunk/drivers/isdn/mISDN/core.c index afeebb00fe0b..21d34be5af6a 100644 --- a/trunk/drivers/isdn/mISDN/core.c +++ b/trunk/drivers/isdn/mISDN/core.c @@ -12,7 +12,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/dsp_cmx.c b/trunk/drivers/isdn/mISDN/dsp_cmx.c index 713ef2b805a2..9c7c0d1ba55f 100644 --- a/trunk/drivers/isdn/mISDN/dsp_cmx.c +++ b/trunk/drivers/isdn/mISDN/dsp_cmx.c @@ -124,7 +124,6 @@ /* delay.h is required for hw_lock.h */ -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/dsp_core.c b/trunk/drivers/isdn/mISDN/dsp_core.c index 6f5b54864283..6eac588e0a37 100644 --- a/trunk/drivers/isdn/mISDN/dsp_core.c +++ b/trunk/drivers/isdn/mISDN/dsp_core.c @@ -154,7 +154,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/dsp_pipeline.c b/trunk/drivers/isdn/mISDN/dsp_pipeline.c index 621f31007095..e9941678edfa 100644 --- a/trunk/drivers/isdn/mISDN/dsp_pipeline.c +++ b/trunk/drivers/isdn/mISDN/dsp_pipeline.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/dsp_tones.c b/trunk/drivers/isdn/mISDN/dsp_tones.c index 7dbe54ed1deb..1debf53670de 100644 --- a/trunk/drivers/isdn/mISDN/dsp_tones.c +++ b/trunk/drivers/isdn/mISDN/dsp_tones.c @@ -8,7 +8,6 @@ * */ -#include #include #include #include "core.h" diff --git a/trunk/drivers/isdn/mISDN/hwchannel.c b/trunk/drivers/isdn/mISDN/hwchannel.c index 307bd6e8988b..e8049be552aa 100644 --- a/trunk/drivers/isdn/mISDN/hwchannel.c +++ b/trunk/drivers/isdn/mISDN/hwchannel.c @@ -15,7 +15,6 @@ * */ -#include #include #include diff --git a/trunk/drivers/isdn/mISDN/l1oip_core.c b/trunk/drivers/isdn/mISDN/l1oip_core.c index 22f38e48ac4e..325b1ad7d4b8 100644 --- a/trunk/drivers/isdn/mISDN/l1oip_core.c +++ b/trunk/drivers/isdn/mISDN/l1oip_core.c @@ -233,7 +233,6 @@ socket process and create a new one. #include #include #include -#include #include #include "core.h" #include "l1oip.h" diff --git a/trunk/drivers/isdn/mISDN/layer1.c b/trunk/drivers/isdn/mISDN/layer1.c index ac4aa18c632b..e826eeb1ecec 100644 --- a/trunk/drivers/isdn/mISDN/layer1.c +++ b/trunk/drivers/isdn/mISDN/layer1.c @@ -16,7 +16,6 @@ */ -#include #include #include #include "core.h" diff --git a/trunk/drivers/isdn/mISDN/layer2.c b/trunk/drivers/isdn/mISDN/layer2.c index c97371788764..e17f0044e0b6 100644 --- a/trunk/drivers/isdn/mISDN/layer2.c +++ b/trunk/drivers/isdn/mISDN/layer2.c @@ -16,7 +16,6 @@ */ #include -#include #include "core.h" #include "fsm.h" #include "layer2.h" diff --git a/trunk/drivers/isdn/mISDN/socket.c b/trunk/drivers/isdn/mISDN/socket.c index 3232206406b1..fcfe17a19a61 100644 --- a/trunk/drivers/isdn/mISDN/socket.c +++ b/trunk/drivers/isdn/mISDN/socket.c @@ -16,7 +16,6 @@ */ #include -#include #include "core.h" static u_int *debug; diff --git a/trunk/drivers/isdn/mISDN/stack.c b/trunk/drivers/isdn/mISDN/stack.c index b159bd59e64e..0d05ec43012c 100644 --- a/trunk/drivers/isdn/mISDN/stack.c +++ b/trunk/drivers/isdn/mISDN/stack.c @@ -15,7 +15,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/isdn/mISDN/tei.c b/trunk/drivers/isdn/mISDN/tei.c index 34e898fe2f4f..6d4da6095885 100644 --- a/trunk/drivers/isdn/mISDN/tei.c +++ b/trunk/drivers/isdn/mISDN/tei.c @@ -16,7 +16,6 @@ */ #include "layer2.h" #include -#include #include "core.h" #define ID_REQUEST 1 diff --git a/trunk/drivers/isdn/mISDN/timerdev.c b/trunk/drivers/isdn/mISDN/timerdev.c index 8785004e85e0..5b7e9bf514f1 100644 --- a/trunk/drivers/isdn/mISDN/timerdev.c +++ b/trunk/drivers/isdn/mISDN/timerdev.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/isdn/pcbit/callbacks.c b/trunk/drivers/isdn/pcbit/callbacks.c index 976143b2346d..43ecd0f54235 100644 --- a/trunk/drivers/isdn/pcbit/callbacks.c +++ b/trunk/drivers/isdn/pcbit/callbacks.c @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/isdn/pcbit/edss1.c b/trunk/drivers/isdn/pcbit/edss1.c index d5920ae22d73..37e9626cebf6 100644 --- a/trunk/drivers/isdn/pcbit/edss1.c +++ b/trunk/drivers/isdn/pcbit/edss1.c @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/isdn/sc/init.c b/trunk/drivers/isdn/sc/init.c index ca710ab278ec..5a0774880d56 100644 --- a/trunk/drivers/isdn/sc/init.c +++ b/trunk/drivers/isdn/sc/init.c @@ -9,7 +9,6 @@ #include #include #include -#include #include "includes.h" #include "hardware.h" #include "card.h" diff --git a/trunk/drivers/leds/dell-led.c b/trunk/drivers/leds/dell-led.c index 52590296af33..ee310891fff8 100644 --- a/trunk/drivers/leds/dell-led.c +++ b/trunk/drivers/leds/dell-led.c @@ -13,7 +13,6 @@ #include #include -#include MODULE_AUTHOR("Louis Davis/Jim Dailey"); MODULE_DESCRIPTION("Dell LED Control Driver"); diff --git a/trunk/drivers/leds/led-triggers.c b/trunk/drivers/leds/led-triggers.c index f1c00db88b5e..d8ddd9ef8994 100644 --- a/trunk/drivers/leds/led-triggers.c +++ b/trunk/drivers/leds/led-triggers.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "leds.h" /* diff --git a/trunk/drivers/leds/leds-88pm860x.c b/trunk/drivers/leds/leds-88pm860x.c index 16a60c06c96c..d196073a6aeb 100644 --- a/trunk/drivers/leds/leds-88pm860x.c +++ b/trunk/drivers/leds/leds-88pm860x.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/leds/leds-adp5520.c b/trunk/drivers/leds/leds-adp5520.c index 7ba4c7b5b97e..a8f315902131 100644 --- a/trunk/drivers/leds/leds-adp5520.c +++ b/trunk/drivers/leds/leds-adp5520.c @@ -20,7 +20,6 @@ #include #include #include -#include struct adp5520_led { struct led_classdev cdev; diff --git a/trunk/drivers/leds/leds-atmel-pwm.c b/trunk/drivers/leds/leds-atmel-pwm.c index c941d906bba6..52297c3ab246 100644 --- a/trunk/drivers/leds/leds-atmel-pwm.c +++ b/trunk/drivers/leds/leds-atmel-pwm.c @@ -3,7 +3,6 @@ #include #include #include -#include struct pwmled { diff --git a/trunk/drivers/leds/leds-bd2802.c b/trunk/drivers/leds/leds-bd2802.c index 286b501a3573..779d7f262c04 100644 --- a/trunk/drivers/leds/leds-bd2802.c +++ b/trunk/drivers/leds/leds-bd2802.c @@ -18,7 +18,6 @@ #include #include #include -#include #define LED_CTL(rgb2en, rgb1en) ((rgb2en) << 4 | ((rgb1en) << 0)) diff --git a/trunk/drivers/leds/leds-da903x.c b/trunk/drivers/leds/leds-da903x.c index f28931cf6781..1f3cc512eff8 100644 --- a/trunk/drivers/leds/leds-da903x.c +++ b/trunk/drivers/leds/leds-da903x.c @@ -19,7 +19,6 @@ #include #include #include -#include #define DA9030_LED1_CONTROL 0x20 #define DA9030_LED2_CONTROL 0x21 diff --git a/trunk/drivers/leds/leds-dac124s085.c b/trunk/drivers/leds/leds-dac124s085.c index 31cf0d60a9a5..2913d76ad3d2 100644 --- a/trunk/drivers/leds/leds-dac124s085.c +++ b/trunk/drivers/leds/leds-dac124s085.c @@ -9,6 +9,7 @@ * LED driver for the DAC124S085 SPI DAC */ +#include #include #include #include diff --git a/trunk/drivers/leds/leds-gpio.c b/trunk/drivers/leds/leds-gpio.c index c6e4b772b757..0823e2622e8c 100644 --- a/trunk/drivers/leds/leds-gpio.c +++ b/trunk/drivers/leds/leds-gpio.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/leds/leds-lp3944.c b/trunk/drivers/leds/leds-lp3944.c index 8d5ecceba181..5946208ba26e 100644 --- a/trunk/drivers/leds/leds-lp3944.c +++ b/trunk/drivers/leds/leds-lp3944.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/leds-lt3593.c b/trunk/drivers/leds/leds-lt3593.c index 2579678f97a6..fee40a841959 100644 --- a/trunk/drivers/leds/leds-lt3593.c +++ b/trunk/drivers/leds/leds-lt3593.c @@ -23,7 +23,6 @@ #include #include #include -#include struct lt3593_led_data { struct led_classdev cdev; diff --git a/trunk/drivers/leds/leds-pca9532.c b/trunk/drivers/leds/leds-pca9532.c index 6682175fa9f7..adc561eb59d2 100644 --- a/trunk/drivers/leds/leds-pca9532.c +++ b/trunk/drivers/leds/leds-pca9532.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/leds-pca955x.c b/trunk/drivers/leds/leds-pca955x.c index 8ff50f234190..4e2d1a42b48f 100644 --- a/trunk/drivers/leds/leds-pca955x.c +++ b/trunk/drivers/leds/leds-pca955x.c @@ -48,7 +48,6 @@ #include #include #include -#include /* LED select registers determine the source that drives LED outputs */ #define PCA955X_LS_LED_ON 0x0 /* Output LOW */ diff --git a/trunk/drivers/leds/leds-pwm.c b/trunk/drivers/leds/leds-pwm.c index da3fa8dcdf5b..88b1dd091cfb 100644 --- a/trunk/drivers/leds/leds-pwm.c +++ b/trunk/drivers/leds/leds-pwm.c @@ -21,7 +21,6 @@ #include #include #include -#include struct led_pwm_data { struct led_classdev cdev; diff --git a/trunk/drivers/leds/leds-regulator.c b/trunk/drivers/leds/leds-regulator.c index 3790816643be..7f00de3ef922 100644 --- a/trunk/drivers/leds/leds-regulator.c +++ b/trunk/drivers/leds/leds-regulator.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/leds-s3c24xx.c b/trunk/drivers/leds/leds-s3c24xx.c index a77771dc2e95..aa7acf3b9224 100644 --- a/trunk/drivers/leds/leds-s3c24xx.c +++ b/trunk/drivers/leds/leds-s3c24xx.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/leds/leds-sunfire.c b/trunk/drivers/leds/leds-sunfire.c index ab6d18f5c39f..6b008f0c3f62 100644 --- a/trunk/drivers/leds/leds-sunfire.c +++ b/trunk/drivers/leds/leds-sunfire.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/leds/leds-wm831x-status.c b/trunk/drivers/leds/leds-wm831x-status.c index ef5c24140a44..c586d05e336a 100644 --- a/trunk/drivers/leds/leds-wm831x-status.c +++ b/trunk/drivers/leds/leds-wm831x-status.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/leds-wm8350.c b/trunk/drivers/leds/leds-wm8350.c index 5aab32ce4f4d..38c6bcb07e6c 100644 --- a/trunk/drivers/leds/leds-wm8350.c +++ b/trunk/drivers/leds/leds-wm8350.c @@ -16,7 +16,6 @@ #include #include #include -#include /* Microamps */ static const int isink_cur[] = { diff --git a/trunk/drivers/leds/ledtrig-backlight.c b/trunk/drivers/leds/ledtrig-backlight.c index f948e57bd9b8..d3dfcfb417b8 100644 --- a/trunk/drivers/leds/ledtrig-backlight.c +++ b/trunk/drivers/leds/ledtrig-backlight.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/ledtrig-gpio.c b/trunk/drivers/leds/ledtrig-gpio.c index 991d93be0f44..f5913372d691 100644 --- a/trunk/drivers/leds/ledtrig-gpio.c +++ b/trunk/drivers/leds/ledtrig-gpio.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "leds.h" struct gpio_trig_data { diff --git a/trunk/drivers/leds/ledtrig-heartbeat.c b/trunk/drivers/leds/ledtrig-heartbeat.c index 759c0bba4a8f..c1c1ea6f817b 100644 --- a/trunk/drivers/leds/ledtrig-heartbeat.c +++ b/trunk/drivers/leds/ledtrig-heartbeat.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/leds/ledtrig-timer.c b/trunk/drivers/leds/ledtrig-timer.c index 82b77bd482ff..38b3378be442 100644 --- a/trunk/drivers/leds/ledtrig-timer.c +++ b/trunk/drivers/leds/ledtrig-timer.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "leds.h" struct timer_trig_data { diff --git a/trunk/drivers/lguest/core.c b/trunk/drivers/lguest/core.c index efa202499e37..8744d24ac6e6 100644 --- a/trunk/drivers/lguest/core.c +++ b/trunk/drivers/lguest/core.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/lguest/lg.h b/trunk/drivers/lguest/lg.h index 9136411fadd5..bc28745d05af 100644 --- a/trunk/drivers/lguest/lg.h +++ b/trunk/drivers/lguest/lg.h @@ -10,7 +10,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/lguest/lguest_device.c b/trunk/drivers/lguest/lguest_device.c index 07090f379c63..b6200bc39b58 100644 --- a/trunk/drivers/lguest/lguest_device.c +++ b/trunk/drivers/lguest/lguest_device.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/lguest/lguest_user.c b/trunk/drivers/lguest/lguest_user.c index 85b714df8eae..bd1632388e4a 100644 --- a/trunk/drivers/lguest/lguest_user.c +++ b/trunk/drivers/lguest/lguest_user.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "lg.h" /*L:056 diff --git a/trunk/drivers/lguest/page_tables.c b/trunk/drivers/lguest/page_tables.c index 04b22128a474..cf94326f1b59 100644 --- a/trunk/drivers/lguest/page_tables.c +++ b/trunk/drivers/lguest/page_tables.c @@ -10,7 +10,6 @@ /* Copyright (C) Rusty Russell IBM Corporation 2006. * GPL v2 and any later version */ #include -#include #include #include #include diff --git a/trunk/drivers/macintosh/mac_hid.c b/trunk/drivers/macintosh/mac_hid.c index 067f9962f499..e943d2a29253 100644 --- a/trunk/drivers/macintosh/mac_hid.c +++ b/trunk/drivers/macintosh/mac_hid.c @@ -13,7 +13,6 @@ #include #include #include -#include MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/macintosh/rack-meter.c b/trunk/drivers/macintosh/rack-meter.c index 7c54d80c4fb2..93fb32038b14 100644 --- a/trunk/drivers/macintosh/rack-meter.c +++ b/trunk/drivers/macintosh/rack-meter.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/macintosh/smu.c b/trunk/drivers/macintosh/smu.c index 888448cf7f1f..f96feeb6b9ce 100644 --- a/trunk/drivers/macintosh/smu.c +++ b/trunk/drivers/macintosh/smu.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index b18fa948f3d1..921373e4e3af 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -114,6 +114,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/macintosh/therm_windtunnel.c b/trunk/drivers/macintosh/therm_windtunnel.c index 0839770e4ec5..7fb8b4da35a7 100644 --- a/trunk/drivers/macintosh/therm_windtunnel.c +++ b/trunk/drivers/macintosh/therm_windtunnel.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/macintosh/via-pmu68k.c b/trunk/drivers/macintosh/via-pmu68k.c index aeb30d07d5a2..fb9fa614a0e8 100644 --- a/trunk/drivers/macintosh/via-pmu68k.c +++ b/trunk/drivers/macintosh/via-pmu68k.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/macintosh/windfarm_core.c b/trunk/drivers/macintosh/windfarm_core.c index c092354591bb..419795f4a2aa 100644 --- a/trunk/drivers/macintosh/windfarm_core.c +++ b/trunk/drivers/macintosh/windfarm_core.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/md/dm-log-userspace-base.c b/trunk/drivers/md/dm-log-userspace-base.c index 1ed0094f064b..7ac2c1450d10 100644 --- a/trunk/drivers/md/dm-log-userspace-base.c +++ b/trunk/drivers/md/dm-log-userspace-base.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/md/dm-log-userspace-transfer.c b/trunk/drivers/md/dm-log-userspace-transfer.c index 075cbcf8a9f5..f1c8cae70b4b 100644 --- a/trunk/drivers/md/dm-log-userspace-transfer.c +++ b/trunk/drivers/md/dm-log-userspace-transfer.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/md/dm-region-hash.c b/trunk/drivers/md/dm-region-hash.c index bd5c58b28868..168bd38f5006 100644 --- a/trunk/drivers/md/dm-region-hash.c +++ b/trunk/drivers/md/dm-region-hash.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include "dm.h" diff --git a/trunk/drivers/md/dm-service-time.c b/trunk/drivers/md/dm-service-time.c index 9c6c2e47ad62..cfa668f46c40 100644 --- a/trunk/drivers/md/dm-service-time.c +++ b/trunk/drivers/md/dm-service-time.c @@ -11,8 +11,6 @@ #include "dm.h" #include "dm-path-selector.h" -#include - #define DM_MSG_PREFIX "multipath service-time" #define ST_MIN_IO 1 #define ST_MAX_RELATIVE_THROUGHPUT 100 diff --git a/trunk/drivers/md/dm-target.c b/trunk/drivers/md/dm-target.c index 11dea11dc0b6..04feccf2a997 100644 --- a/trunk/drivers/md/dm-target.c +++ b/trunk/drivers/md/dm-target.c @@ -10,6 +10,7 @@ #include #include #include +#include #define DM_MSG_PREFIX "target" diff --git a/trunk/drivers/md/faulty.c b/trunk/drivers/md/faulty.c index 8e3850b98cca..713acd02ab39 100644 --- a/trunk/drivers/md/faulty.c +++ b/trunk/drivers/md/faulty.c @@ -64,7 +64,6 @@ #define MaxFault 50 #include #include -#include #include "md.h" #include diff --git a/trunk/drivers/md/linear.c b/trunk/drivers/md/linear.c index 09437e958235..bb2a23159b21 100644 --- a/trunk/drivers/md/linear.c +++ b/trunk/drivers/md/linear.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "md.h" #include "linear.h" diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index 9712b2e97be4..fdc1890b6ac5 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -49,7 +49,6 @@ #include #include #include -#include #include "md.h" #include "bitmap.h" diff --git a/trunk/drivers/md/multipath.c b/trunk/drivers/md/multipath.c index 789bf535d29c..5558ebc705c8 100644 --- a/trunk/drivers/md/multipath.c +++ b/trunk/drivers/md/multipath.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "md.h" #include "multipath.h" diff --git a/trunk/drivers/md/raid0.c b/trunk/drivers/md/raid0.c index c3bec024612e..377cf2a3c333 100644 --- a/trunk/drivers/md/raid0.c +++ b/trunk/drivers/md/raid0.c @@ -20,7 +20,6 @@ #include #include -#include #include "md.h" #include "raid0.h" diff --git a/trunk/drivers/md/raid1.c b/trunk/drivers/md/raid1.c index e59b10e66edb..f741f77eeb2b 100644 --- a/trunk/drivers/md/raid1.c +++ b/trunk/drivers/md/raid1.c @@ -31,7 +31,6 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/md/raid10.c b/trunk/drivers/md/raid10.c index e2766d8251a1..b4ba41ecbd20 100644 --- a/trunk/drivers/md/raid10.c +++ b/trunk/drivers/md/raid10.c @@ -18,7 +18,6 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index e3e9a36ea3b7..70ffbd071b2e 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -50,7 +50,6 @@ #include #include #include -#include #include "md.h" #include "raid5.h" #include "bitmap.h" diff --git a/trunk/drivers/md/raid6algos.c b/trunk/drivers/md/raid6algos.c index 1f8784bfd44d..bffc61bff5ab 100644 --- a/trunk/drivers/md/raid6algos.c +++ b/trunk/drivers/md/raid6algos.c @@ -17,7 +17,6 @@ */ #include -#include #ifndef __KERNEL__ #include #include diff --git a/trunk/drivers/media/IR/ir-keytable.c b/trunk/drivers/media/IR/ir-keytable.c index bfca26d51827..0a3b4ed38e48 100644 --- a/trunk/drivers/media/IR/ir-keytable.c +++ b/trunk/drivers/media/IR/ir-keytable.c @@ -14,7 +14,6 @@ #include -#include #include #define IR_TAB_MIN_SIZE 32 diff --git a/trunk/drivers/media/IR/ir-sysfs.c b/trunk/drivers/media/IR/ir-sysfs.c index e14e6c486b52..bf5fbcd84238 100644 --- a/trunk/drivers/media/IR/ir-sysfs.c +++ b/trunk/drivers/media/IR/ir-sysfs.c @@ -12,7 +12,6 @@ * GNU General Public License for more details. */ -#include #include #include #include diff --git a/trunk/drivers/media/common/tuners/max2165.c b/trunk/drivers/media/common/tuners/max2165.c index 937e4b00d7ee..3d03640cf1fe 100644 --- a/trunk/drivers/media/common/tuners/max2165.c +++ b/trunk/drivers/media/common/tuners/max2165.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/common/tuners/mc44s803.c b/trunk/drivers/media/common/tuners/mc44s803.c index fe5c4b8d83ee..20c4485ce16a 100644 --- a/trunk/drivers/media/common/tuners/mc44s803.c +++ b/trunk/drivers/media/common/tuners/mc44s803.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/common/tuners/mt2060.c b/trunk/drivers/media/common/tuners/mt2060.c index 2d0e7689c6a2..c7abe3d8f90e 100644 --- a/trunk/drivers/media/common/tuners/mt2060.c +++ b/trunk/drivers/media/common/tuners/mt2060.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/common/tuners/mt20xx.c b/trunk/drivers/media/common/tuners/mt20xx.c index d0e70e10a717..44608ad4e2d2 100644 --- a/trunk/drivers/media/common/tuners/mt20xx.c +++ b/trunk/drivers/media/common/tuners/mt20xx.c @@ -6,7 +6,6 @@ */ #include #include -#include #include #include "tuner-i2c.h" #include "mt20xx.h" diff --git a/trunk/drivers/media/common/tuners/mt2131.c b/trunk/drivers/media/common/tuners/mt2131.c index a4f830bb25d1..e8d3c48f8605 100644 --- a/trunk/drivers/media/common/tuners/mt2131.c +++ b/trunk/drivers/media/common/tuners/mt2131.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/common/tuners/mt2266.c b/trunk/drivers/media/common/tuners/mt2266.c index 25a8ea342c46..54b18f94b14b 100644 --- a/trunk/drivers/media/common/tuners/mt2266.c +++ b/trunk/drivers/media/common/tuners/mt2266.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "dvb_frontend.h" #include "mt2266.h" diff --git a/trunk/drivers/media/common/tuners/tda827x.c b/trunk/drivers/media/common/tuners/tda827x.c index b21b6ea68b25..36a7bc7585ab 100644 --- a/trunk/drivers/media/common/tuners/tda827x.c +++ b/trunk/drivers/media/common/tuners/tda827x.c @@ -19,7 +19,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/common/tuners/tda8290.c b/trunk/drivers/media/common/tuners/tda8290.c index c9062ceddc71..2833137fa819 100644 --- a/trunk/drivers/media/common/tuners/tda8290.c +++ b/trunk/drivers/media/common/tuners/tda8290.c @@ -21,7 +21,6 @@ */ #include -#include #include #include #include "tuner-i2c.h" diff --git a/trunk/drivers/media/common/tuners/tda9887.c b/trunk/drivers/media/common/tuners/tda9887.c index bf14bd79e2fc..a71c100c95df 100644 --- a/trunk/drivers/media/common/tuners/tda9887.c +++ b/trunk/drivers/media/common/tuners/tda9887.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/common/tuners/tea5761.c b/trunk/drivers/media/common/tuners/tea5761.c index 925399dffbed..60ed872f3d44 100644 --- a/trunk/drivers/media/common/tuners/tea5761.c +++ b/trunk/drivers/media/common/tuners/tea5761.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/common/tuners/tea5767.c b/trunk/drivers/media/common/tuners/tea5767.c index 36e85d81acb2..223a226d20a1 100644 --- a/trunk/drivers/media/common/tuners/tea5767.c +++ b/trunk/drivers/media/common/tuners/tea5767.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include "tuner-i2c.h" diff --git a/trunk/drivers/media/common/tuners/tuner-i2c.h b/trunk/drivers/media/common/tuners/tuner-i2c.h index 18f005634c67..cb1c7141f0c6 100644 --- a/trunk/drivers/media/common/tuners/tuner-i2c.h +++ b/trunk/drivers/media/common/tuners/tuner-i2c.h @@ -22,7 +22,6 @@ #define __TUNER_I2C_H__ #include -#include struct tuner_i2c_props { u8 addr; diff --git a/trunk/drivers/media/common/tuners/tuner-xc2028.c b/trunk/drivers/media/common/tuners/tuner-xc2028.c index 96d61707f501..be51c294b375 100644 --- a/trunk/drivers/media/common/tuners/tuner-xc2028.c +++ b/trunk/drivers/media/common/tuners/tuner-xc2028.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "tuner-i2c.h" #include "tuner-xc2028.h" diff --git a/trunk/drivers/media/dvb/bt8xx/dst_ca.c b/trunk/drivers/media/dvb/bt8xx/dst_ca.c index 770243c720d2..0e246eaad05a 100644 --- a/trunk/drivers/media/dvb/bt8xx/dst_ca.c +++ b/trunk/drivers/media/dvb/bt8xx/dst_ca.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/dvb/dm1105/dm1105.c b/trunk/drivers/media/dvb/dm1105/dm1105.c index b6d46961a99e..383cca378b8c 100644 --- a/trunk/drivers/media/dvb/dm1105/dm1105.c +++ b/trunk/drivers/media/dvb/dm1105/dm1105.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "demux.h" diff --git a/trunk/drivers/media/dvb/dvb-core/dmxdev.h b/trunk/drivers/media/dvb/dvb-core/dmxdev.h index 02ebe28f830d..c1379b56dfb4 100644 --- a/trunk/drivers/media/dvb/dvb-core/dmxdev.h +++ b/trunk/drivers/media/dvb/dvb-core/dmxdev.h @@ -31,7 +31,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/media/dvb/dvb-core/dvb_frontend.h b/trunk/drivers/media/dvb/dvb-core/dvb_frontend.h index bf0e6bed28dd..80dda308ff74 100644 --- a/trunk/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/trunk/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -36,7 +36,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/media/dvb/dvb-usb/af9015.c b/trunk/drivers/media/dvb/dvb-usb/af9015.c index 74d94e45324d..d7975383d31b 100644 --- a/trunk/drivers/media/dvb/dvb-usb/af9015.c +++ b/trunk/drivers/media/dvb/dvb-usb/af9015.c @@ -22,7 +22,6 @@ */ #include -#include #include "af9015.h" #include "af9013.h" diff --git a/trunk/drivers/media/dvb/dvb-usb/cxusb.c b/trunk/drivers/media/dvb/dvb-usb/cxusb.c index 960376da7d59..a7b8405c291e 100644 --- a/trunk/drivers/media/dvb/dvb-usb/cxusb.c +++ b/trunk/drivers/media/dvb/dvb-usb/cxusb.c @@ -25,7 +25,6 @@ */ #include #include -#include #include "cxusb.h" diff --git a/trunk/drivers/media/dvb/firewire/firedtv-1394.c b/trunk/drivers/media/dvb/firewire/firedtv-1394.c index 26333b4f4d3e..c3e0ec2dcfca 100644 --- a/trunk/drivers/media/dvb/firewire/firedtv-1394.c +++ b/trunk/drivers/media/dvb/firewire/firedtv-1394.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/firewire/firedtv-rc.c b/trunk/drivers/media/dvb/firewire/firedtv-rc.c index fcf3828472b8..599d66e5843d 100644 --- a/trunk/drivers/media/dvb/firewire/firedtv-rc.c +++ b/trunk/drivers/media/dvb/firewire/firedtv-rc.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/dvb/frontends/au8522_dig.c b/trunk/drivers/media/dvb/frontends/au8522_dig.c index a1fed0fa8ed4..956b80f4979c 100644 --- a/trunk/drivers/media/dvb/frontends/au8522_dig.c +++ b/trunk/drivers/media/dvb/frontends/au8522_dig.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "dvb_frontend.h" #include "au8522.h" diff --git a/trunk/drivers/media/dvb/frontends/dib0070.c b/trunk/drivers/media/dvb/frontends/dib0070.c index d4e466a90e43..0d12763603b4 100644 --- a/trunk/drivers/media/dvb/frontends/dib0070.c +++ b/trunk/drivers/media/dvb/frontends/dib0070.c @@ -25,7 +25,6 @@ */ #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/dib0090.c b/trunk/drivers/media/dvb/frontends/dib0090.c index 65240b7801e8..7eac178f57b2 100644 --- a/trunk/drivers/media/dvb/frontends/dib0090.c +++ b/trunk/drivers/media/dvb/frontends/dib0090.c @@ -25,7 +25,6 @@ */ #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/dib3000mc.c b/trunk/drivers/media/dvb/frontends/dib3000mc.c index 40a099810279..fa851601e7d4 100644 --- a/trunk/drivers/media/dvb/frontends/dib3000mc.c +++ b/trunk/drivers/media/dvb/frontends/dib3000mc.c @@ -12,7 +12,6 @@ */ #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/dib7000m.c b/trunk/drivers/media/dvb/frontends/dib7000m.c index 0f09fd31cb29..0109720353bd 100644 --- a/trunk/drivers/media/dvb/frontends/dib7000m.c +++ b/trunk/drivers/media/dvb/frontends/dib7000m.c @@ -9,7 +9,6 @@ * published by the Free Software Foundation, version 2. */ #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/dib7000p.c b/trunk/drivers/media/dvb/frontends/dib7000p.c index 85468a45c344..750ae61a20f4 100644 --- a/trunk/drivers/media/dvb/frontends/dib7000p.c +++ b/trunk/drivers/media/dvb/frontends/dib7000p.c @@ -8,7 +8,6 @@ * published by the Free Software Foundation, version 2. */ #include -#include #include #include "dvb_math.h" diff --git a/trunk/drivers/media/dvb/frontends/dib8000.c b/trunk/drivers/media/dvb/frontends/dib8000.c index df17b91b3250..2aa97dd6a8af 100644 --- a/trunk/drivers/media/dvb/frontends/dib8000.c +++ b/trunk/drivers/media/dvb/frontends/dib8000.c @@ -8,7 +8,6 @@ * published by the Free Software Foundation, version 2. */ #include -#include #include #include "dvb_math.h" diff --git a/trunk/drivers/media/dvb/frontends/drx397xD.c b/trunk/drivers/media/dvb/frontends/drx397xD.c index f74cca6dc26b..868b78bfae75 100644 --- a/trunk/drivers/media/dvb/frontends/drx397xD.c +++ b/trunk/drivers/media/dvb/frontends/drx397xD.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/dvb-pll.c b/trunk/drivers/media/dvb/frontends/dvb-pll.c index 4d4d0bb5920a..6d865d6161d7 100644 --- a/trunk/drivers/media/dvb/frontends/dvb-pll.c +++ b/trunk/drivers/media/dvb/frontends/dvb-pll.c @@ -18,7 +18,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/media/dvb/frontends/itd1000.c b/trunk/drivers/media/dvb/frontends/itd1000.c index f7a40a18777a..600dad6b41ea 100644 --- a/trunk/drivers/media/dvb/frontends/itd1000.c +++ b/trunk/drivers/media/dvb/frontends/itd1000.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/lgdt3304.c b/trunk/drivers/media/dvb/frontends/lgdt3304.c index 45a529b06b9d..e334b5d4e578 100644 --- a/trunk/drivers/media/dvb/frontends/lgdt3304.c +++ b/trunk/drivers/media/dvb/frontends/lgdt3304.c @@ -7,7 +7,6 @@ #include #include -#include #include #include "dvb_frontend.h" #include "lgdt3304.h" diff --git a/trunk/drivers/media/dvb/frontends/lgdt3305.c b/trunk/drivers/media/dvb/frontends/lgdt3305.c index d69c775f8645..fde8c59700fb 100644 --- a/trunk/drivers/media/dvb/frontends/lgdt3305.c +++ b/trunk/drivers/media/dvb/frontends/lgdt3305.c @@ -21,7 +21,6 @@ #include #include -#include #include "dvb_math.h" #include "lgdt3305.h" diff --git a/trunk/drivers/media/dvb/frontends/mb86a16.c b/trunk/drivers/media/dvb/frontends/mb86a16.c index 599d1aa519a3..d05f7500e0c5 100644 --- a/trunk/drivers/media/dvb/frontends/mb86a16.c +++ b/trunk/drivers/media/dvb/frontends/mb86a16.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "dvb_frontend.h" #include "mb86a16.h" diff --git a/trunk/drivers/media/dvb/frontends/s921_module.c b/trunk/drivers/media/dvb/frontends/s921_module.c index 0eefff61cc50..3156b64cfc96 100644 --- a/trunk/drivers/media/dvb/frontends/s921_module.c +++ b/trunk/drivers/media/dvb/frontends/s921_module.c @@ -9,7 +9,6 @@ #include #include -#include #include #include "dvb_frontend.h" #include "s921_module.h" diff --git a/trunk/drivers/media/dvb/frontends/stb0899_drv.c b/trunk/drivers/media/dvb/frontends/stb0899_drv.c index 8e38fcee564e..1570669837ea 100644 --- a/trunk/drivers/media/dvb/frontends/stb0899_drv.c +++ b/trunk/drivers/media/dvb/frontends/stb0899_drv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/frontends/stb6000.c b/trunk/drivers/media/dvb/frontends/stb6000.c index ed699647050e..0e2cb0df1441 100644 --- a/trunk/drivers/media/dvb/frontends/stb6000.c +++ b/trunk/drivers/media/dvb/frontends/stb6000.c @@ -20,7 +20,6 @@ */ -#include #include #include #include diff --git a/trunk/drivers/media/dvb/frontends/stb6100.c b/trunk/drivers/media/dvb/frontends/stb6100.c index f73c13323e90..60ee18a94f43 100644 --- a/trunk/drivers/media/dvb/frontends/stb6100.c +++ b/trunk/drivers/media/dvb/frontends/stb6100.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/stv090x.c b/trunk/drivers/media/dvb/frontends/stv090x.c index a3c07fe0e6c4..c52c3357dc54 100644 --- a/trunk/drivers/media/dvb/frontends/stv090x.c +++ b/trunk/drivers/media/dvb/frontends/stv090x.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/frontends/stv6110.c b/trunk/drivers/media/dvb/frontends/stv6110.c index 2dca7c8e5148..bef0cc838471 100644 --- a/trunk/drivers/media/dvb/frontends/stv6110.c +++ b/trunk/drivers/media/dvb/frontends/stv6110.c @@ -22,7 +22,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include diff --git a/trunk/drivers/media/dvb/frontends/stv6110x.c b/trunk/drivers/media/dvb/frontends/stv6110x.c index dea4245f077c..f931ed07e92d 100644 --- a/trunk/drivers/media/dvb/frontends/stv6110x.c +++ b/trunk/drivers/media/dvb/frontends/stv6110x.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "dvb_frontend.h" diff --git a/trunk/drivers/media/dvb/frontends/tda665x.c b/trunk/drivers/media/dvb/frontends/tda665x.c index 2c1c759a4f42..c44fefe92d97 100644 --- a/trunk/drivers/media/dvb/frontends/tda665x.c +++ b/trunk/drivers/media/dvb/frontends/tda665x.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "dvb_frontend.h" #include "tda665x.h" diff --git a/trunk/drivers/media/dvb/frontends/tda8261.c b/trunk/drivers/media/dvb/frontends/tda8261.c index 1742056a34e8..614afcec05f1 100644 --- a/trunk/drivers/media/dvb/frontends/tda8261.c +++ b/trunk/drivers/media/dvb/frontends/tda8261.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "dvb_frontend.h" #include "tda8261.h" diff --git a/trunk/drivers/media/dvb/frontends/tda826x.c b/trunk/drivers/media/dvb/frontends/tda826x.c index 06c94800b940..a051554b5e25 100644 --- a/trunk/drivers/media/dvb/frontends/tda826x.c +++ b/trunk/drivers/media/dvb/frontends/tda826x.c @@ -20,7 +20,6 @@ */ -#include #include #include #include diff --git a/trunk/drivers/media/dvb/frontends/tua6100.c b/trunk/drivers/media/dvb/frontends/tua6100.c index bcb95c2ef296..1790baee014c 100644 --- a/trunk/drivers/media/dvb/frontends/tua6100.c +++ b/trunk/drivers/media/dvb/frontends/tua6100.c @@ -28,7 +28,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/media/dvb/frontends/zl10036.c b/trunk/drivers/media/dvb/frontends/zl10036.c index 4627f491656b..34c5de491d2b 100644 --- a/trunk/drivers/media/dvb/frontends/zl10036.c +++ b/trunk/drivers/media/dvb/frontends/zl10036.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "zl10036.h" diff --git a/trunk/drivers/media/dvb/mantis/hopper_cards.c b/trunk/drivers/media/dvb/mantis/hopper_cards.c index 09e9fc785189..d073c61e3c0d 100644 --- a/trunk/drivers/media/dvb/mantis/hopper_cards.c +++ b/trunk/drivers/media/dvb/mantis/hopper_cards.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/mantis/mantis_ca.c b/trunk/drivers/media/dvb/mantis/mantis_ca.c index 330216febd78..403ce043d00e 100644 --- a/trunk/drivers/media/dvb/mantis/mantis_ca.c +++ b/trunk/drivers/media/dvb/mantis/mantis_ca.c @@ -19,7 +19,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/dvb/mantis/mantis_cards.c b/trunk/drivers/media/dvb/mantis/mantis_cards.c index cf4b39ffdaad..16f1708fd3bc 100644 --- a/trunk/drivers/media/dvb/mantis/mantis_cards.c +++ b/trunk/drivers/media/dvb/mantis/mantis_cards.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/ngene/ngene-core.c b/trunk/drivers/media/dvb/ngene/ngene-core.c index 645e8b8a7137..0150dfe7cfbb 100644 --- a/trunk/drivers/media/dvb/ngene/ngene-core.c +++ b/trunk/drivers/media/dvb/ngene/ngene-core.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/dvb/pluto2/pluto2.c b/trunk/drivers/media/dvb/pluto2/pluto2.c index 1c798219dc7c..80d14a065bad 100644 --- a/trunk/drivers/media/dvb/pluto2/pluto2.c +++ b/trunk/drivers/media/dvb/pluto2/pluto2.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "demux.h" #include "dmxdev.h" diff --git a/trunk/drivers/media/dvb/pt1/pt1.c b/trunk/drivers/media/dvb/pt1/pt1.c index 6aded234aa61..81e623a90f09 100644 --- a/trunk/drivers/media/dvb/pt1/pt1.c +++ b/trunk/drivers/media/dvb/pt1/pt1.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/dvb/siano/smscoreapi.c b/trunk/drivers/media/dvb/siano/smscoreapi.c index 0c87a3c3899a..4bfd3451b568 100644 --- a/trunk/drivers/media/dvb/siano/smscoreapi.c +++ b/trunk/drivers/media/dvb/siano/smscoreapi.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/siano/smsdvb.c b/trunk/drivers/media/dvb/siano/smsdvb.c index b80d09b035a1..5f3939821ca3 100644 --- a/trunk/drivers/media/dvb/siano/smsdvb.c +++ b/trunk/drivers/media/dvb/siano/smsdvb.c @@ -20,7 +20,6 @@ along with this program. If not, see . ****************************************************************/ #include -#include #include #include "dmxdev.h" diff --git a/trunk/drivers/media/dvb/siano/smssdio.c b/trunk/drivers/media/dvb/siano/smssdio.c index e57d38b0197c..195244a3e69b 100644 --- a/trunk/drivers/media/dvb/siano/smssdio.c +++ b/trunk/drivers/media/dvb/siano/smssdio.c @@ -33,7 +33,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/dvb/siano/smsusb.c b/trunk/drivers/media/dvb/siano/smsusb.c index a9c27fb69ba7..5eac27287d9c 100644 --- a/trunk/drivers/media/dvb/siano/smsusb.c +++ b/trunk/drivers/media/dvb/siano/smsusb.c @@ -23,7 +23,6 @@ along with this program. If not, see . #include #include #include -#include #include "smscoreapi.h" #include "sms-cards.h" diff --git a/trunk/drivers/media/dvb/ttpci/av7110.c b/trunk/drivers/media/dvb/ttpci/av7110.c index 38915591c6e5..baf3159a3aa6 100644 --- a/trunk/drivers/media/dvb/ttpci/av7110.c +++ b/trunk/drivers/media/dvb/ttpci/av7110.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/dvb/ttpci/av7110_ca.c b/trunk/drivers/media/dvb/ttpci/av7110_ca.c index ac7779c45c5b..c7a65b1544a3 100644 --- a/trunk/drivers/media/dvb/ttpci/av7110_ca.c +++ b/trunk/drivers/media/dvb/ttpci/av7110_ca.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "av7110.h" #include "av7110_hw.h" diff --git a/trunk/drivers/media/radio/radio-gemtek-pci.c b/trunk/drivers/media/radio/radio-gemtek-pci.c index 79039674a0e0..000f4d34087c 100644 --- a/trunk/drivers/media/radio/radio-gemtek-pci.c +++ b/trunk/drivers/media/radio/radio-gemtek-pci.c @@ -48,7 +48,6 @@ #include #include /* for KERNEL_VERSION MACRO */ #include -#include #include #include diff --git a/trunk/drivers/media/radio/radio-maestro.c b/trunk/drivers/media/radio/radio-maestro.c index 08f1051979ca..f8213b7c8ddc 100644 --- a/trunk/drivers/media/radio/radio-maestro.c +++ b/trunk/drivers/media/radio/radio-maestro.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/radio/radio-maxiradio.c b/trunk/drivers/media/radio/radio-maxiradio.c index 4349213b403b..44b4dbedb322 100644 --- a/trunk/drivers/media/radio/radio-maxiradio.c +++ b/trunk/drivers/media/radio/radio-maxiradio.c @@ -42,7 +42,6 @@ #include #include /* for KERNEL_VERSION MACRO */ #include -#include #include #include diff --git a/trunk/drivers/media/radio/radio-si4713.c b/trunk/drivers/media/radio/radio-si4713.c index 13554ab13f76..170bbe554787 100644 --- a/trunk/drivers/media/radio/radio-si4713.c +++ b/trunk/drivers/media/radio/radio-si4713.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/radio/radio-tea5764.c b/trunk/drivers/media/radio/radio-tea5764.c index 789d2ec66e19..8e718bfcdad3 100644 --- a/trunk/drivers/media/radio/radio-tea5764.c +++ b/trunk/drivers/media/radio/radio-tea5764.c @@ -32,7 +32,6 @@ * add RDS support */ #include -#include #include #include /* Initdata */ #include /* kernel radio structs */ diff --git a/trunk/drivers/media/radio/radio-timb.c b/trunk/drivers/media/radio/radio-timb.c index b8bb3ef47df5..0de457f6e6eb 100644 --- a/trunk/drivers/media/radio/radio-timb.c +++ b/trunk/drivers/media/radio/radio-timb.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/radio/saa7706h.c b/trunk/drivers/media/radio/saa7706h.c index 585680ffbfb6..5db5528a8b25 100644 --- a/trunk/drivers/media/radio/saa7706h.c +++ b/trunk/drivers/media/radio/saa7706h.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/radio/si470x/radio-si470x-i2c.c b/trunk/drivers/media/radio/si470x/radio-si470x-i2c.c index a5844d08d8b7..5466015346a1 100644 --- a/trunk/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/trunk/drivers/media/radio/si470x/radio-si470x-i2c.c @@ -31,7 +31,6 @@ /* kernel includes */ #include -#include #include #include diff --git a/trunk/drivers/media/radio/si470x/radio-si470x-usb.c b/trunk/drivers/media/radio/si470x/radio-si470x-usb.c index 5ec13e50a9f0..6f60841828da 100644 --- a/trunk/drivers/media/radio/si470x/radio-si470x-usb.c +++ b/trunk/drivers/media/radio/si470x/radio-si470x-usb.c @@ -37,7 +37,6 @@ /* kernel includes */ #include #include -#include #include "radio-si470x.h" diff --git a/trunk/drivers/media/radio/si4713-i2c.c b/trunk/drivers/media/radio/si4713-i2c.c index ab63dd5b25c4..6a0028eb461f 100644 --- a/trunk/drivers/media/radio/si4713-i2c.c +++ b/trunk/drivers/media/radio/si4713-i2c.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/radio/tef6862.c b/trunk/drivers/media/radio/tef6862.c index 90cae90277e7..6e607ff0c169 100644 --- a/trunk/drivers/media/radio/tef6862.c +++ b/trunk/drivers/media/radio/tef6862.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/adv7170.c b/trunk/drivers/media/video/adv7170.c index 48e89fbf391b..97b003449c91 100644 --- a/trunk/drivers/media/video/adv7170.c +++ b/trunk/drivers/media/video/adv7170.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/adv7175.c b/trunk/drivers/media/video/adv7175.c index f1ba0d742c65..cf8c06c85ded 100644 --- a/trunk/drivers/media/video/adv7175.c +++ b/trunk/drivers/media/video/adv7175.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/adv7180.c b/trunk/drivers/media/video/adv7180.c index 23e610f62736..0826f0dabc17 100644 --- a/trunk/drivers/media/video/adv7180.c +++ b/trunk/drivers/media/video/adv7180.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/adv7343.c b/trunk/drivers/media/video/adv7343.c index 41b2930d0ce4..df26f2fe44eb 100644 --- a/trunk/drivers/media/video/adv7343.c +++ b/trunk/drivers/media/video/adv7343.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/au0828/au0828-core.c b/trunk/drivers/media/video/au0828/au0828-core.c index ca342e4c61fc..3544a2f12f13 100644 --- a/trunk/drivers/media/video/au0828/au0828-core.c +++ b/trunk/drivers/media/video/au0828/au0828-core.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/au0828/au0828-dvb.c b/trunk/drivers/media/video/au0828/au0828-dvb.c index f1edf1d4afe8..b8a4b52e8d47 100644 --- a/trunk/drivers/media/video/au0828/au0828-dvb.c +++ b/trunk/drivers/media/video/au0828/au0828-dvb.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/au0828/au0828-video.c b/trunk/drivers/media/video/au0828/au0828-video.c index 8c140c01c5e6..dc67bc40f36f 100644 --- a/trunk/drivers/media/video/au0828/au0828-video.c +++ b/trunk/drivers/media/video/au0828/au0828-video.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/bt819.c b/trunk/drivers/media/video/bt819.c index 770cb9accf81..547e1a93c421 100644 --- a/trunk/drivers/media/video/bt819.c +++ b/trunk/drivers/media/video/bt819.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/bt856.c b/trunk/drivers/media/video/bt856.c index ae3337392505..d0b4d4925ff8 100644 --- a/trunk/drivers/media/video/bt856.c +++ b/trunk/drivers/media/video/bt856.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/bt866.c b/trunk/drivers/media/video/bt866.c index 62ac422bb159..af7e3a5bac9f 100644 --- a/trunk/drivers/media/video/bt866.c +++ b/trunk/drivers/media/video/bt866.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/bt8xx/bttv-driver.c b/trunk/drivers/media/video/bt8xx/bttv-driver.c index f4860f03dfc3..cb46e8fa8aaa 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-driver.c +++ b/trunk/drivers/media/video/bt8xx/bttv-driver.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/bt8xx/bttv-gpio.c b/trunk/drivers/media/video/bt8xx/bttv-gpio.c index fd604d32bbb9..74c325e594a2 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-gpio.c +++ b/trunk/drivers/media/video/bt8xx/bttv-gpio.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "bttvp.h" diff --git a/trunk/drivers/media/video/bt8xx/bttv-input.c b/trunk/drivers/media/video/bt8xx/bttv-input.c index aa153a986ade..b320dbd635aa 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-input.c +++ b/trunk/drivers/media/video/bt8xx/bttv-input.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "bttv.h" #include "bttvp.h" diff --git a/trunk/drivers/media/video/bt8xx/bttv-risc.c b/trunk/drivers/media/video/bt8xx/bttv-risc.c index c24b1c100e13..d16af2836379 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-risc.c +++ b/trunk/drivers/media/video/bt8xx/bttv-risc.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cafe_ccic.c b/trunk/drivers/media/video/cafe_ccic.c index be35e6965829..cbbf7e80d2cf 100644 --- a/trunk/drivers/media/video/cafe_ccic.c +++ b/trunk/drivers/media/video/cafe_ccic.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cpia_pp.c b/trunk/drivers/media/video/cpia_pp.c index f5604c16a092..c431df8248d6 100644 --- a/trunk/drivers/media/video/cpia_pp.c +++ b/trunk/drivers/media/video/cpia_pp.c @@ -35,7 +35,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/media/video/cs5345.c b/trunk/drivers/media/video/cs5345.c index 8362db509e2c..57dc1704b6c0 100644 --- a/trunk/drivers/media/video/cs5345.c +++ b/trunk/drivers/media/video/cs5345.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cs53l32a.c b/trunk/drivers/media/video/cs53l32a.c index 3cc135a98d82..80bca8df9fbf 100644 --- a/trunk/drivers/media/video/cs53l32a.c +++ b/trunk/drivers/media/video/cs53l32a.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx18/cx18-alsa-main.c b/trunk/drivers/media/video/cx18/cx18-alsa-main.c index b5d7cbf4528a..eb41d7ec65b9 100644 --- a/trunk/drivers/media/video/cx18/cx18-alsa-main.c +++ b/trunk/drivers/media/video/cx18/cx18-alsa-main.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx18/cx18-controls.c b/trunk/drivers/media/video/cx18/cx18-controls.c index 7fa589240ff2..93f0dae01350 100644 --- a/trunk/drivers/media/video/cx18/cx18-controls.c +++ b/trunk/drivers/media/video/cx18/cx18-controls.c @@ -21,7 +21,6 @@ * 02111-1307 USA */ #include -#include #include "cx18-driver.h" #include "cx18-cards.h" diff --git a/trunk/drivers/media/video/cx18/cx18-driver.h b/trunk/drivers/media/video/cx18/cx18-driver.h index b9728e8eee40..23ad6d548dc5 100644 --- a/trunk/drivers/media/video/cx18/cx18-driver.h +++ b/trunk/drivers/media/video/cx18/cx18-driver.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-cards.c b/trunk/drivers/media/video/cx231xx/cx231xx-cards.c index 6bdc0ef18119..a54908235009 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-cards.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-core.c b/trunk/drivers/media/video/cx231xx/cx231xx-core.c index b24eee115e7e..4a60dfbc347d 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-core.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-core.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-dvb.c b/trunk/drivers/media/video/cx231xx/cx231xx-dvb.c index 4ea3776b39fb..64e025e2bdf1 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-dvb.c @@ -20,7 +20,6 @@ */ #include -#include #include #include "cx231xx.h" diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-input.c b/trunk/drivers/media/video/cx231xx/cx231xx-input.c index b473cd8367f5..c5771db3bfce 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-input.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-input.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "cx231xx.h" diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-vbi.c b/trunk/drivers/media/video/cx231xx/cx231xx-vbi.c index 689c5e25776c..e97b8023a655 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-vbi.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-vbi.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-video.c b/trunk/drivers/media/video/cx231xx/cx231xx-video.c index 16a73eab6726..d4f546f11d74 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-video.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-video.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/cx23885/cx23885-417.c b/trunk/drivers/media/video/cx23885/cx23885-417.c index a8ddc227cf86..2ab97ad7b6fb 100644 --- a/trunk/drivers/media/video/cx23885/cx23885-417.c +++ b/trunk/drivers/media/video/cx23885/cx23885-417.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx23885/cx23885-input.c b/trunk/drivers/media/video/cx23885/cx23885-input.c index 8e9d990dbe93..9c6620f86dca 100644 --- a/trunk/drivers/media/video/cx23885/cx23885-input.c +++ b/trunk/drivers/media/video/cx23885/cx23885-input.c @@ -36,7 +36,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/video/cx23885/cx23885-vbi.c b/trunk/drivers/media/video/cx23885/cx23885-vbi.c index 708a8c766d1a..5b297f0323b6 100644 --- a/trunk/drivers/media/video/cx23885/cx23885-vbi.c +++ b/trunk/drivers/media/video/cx23885/cx23885-vbi.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "cx23885.h" diff --git a/trunk/drivers/media/video/cx23885/cx23885.h b/trunk/drivers/media/video/cx23885/cx23885.h index 8d6a55e54ee7..0e3a98d243c5 100644 --- a/trunk/drivers/media/video/cx23885/cx23885.h +++ b/trunk/drivers/media/video/cx23885/cx23885.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/cx23885/cx23888-ir.c b/trunk/drivers/media/video/cx23885/cx23888-ir.c index ad728d767d69..2bf57a4527d3 100644 --- a/trunk/drivers/media/video/cx23885/cx23888-ir.c +++ b/trunk/drivers/media/video/cx23885/cx23888-ir.c @@ -22,7 +22,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-alsa.c b/trunk/drivers/media/video/cx88/cx88-alsa.c index 33082c96745e..64b350df78e3 100644 --- a/trunk/drivers/media/video/cx88/cx88-alsa.c +++ b/trunk/drivers/media/video/cx88/cx88-alsa.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-blackbird.c b/trunk/drivers/media/video/cx88/cx88-blackbird.c index e46e1ceef72c..6fe30e6c4262 100644 --- a/trunk/drivers/media/video/cx88/cx88-blackbird.c +++ b/trunk/drivers/media/video/cx88/cx88-blackbird.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-cards.c b/trunk/drivers/media/video/cx88/cx88-cards.c index 2918a6e38fe8..eaf0ee7de832 100644 --- a/trunk/drivers/media/video/cx88/cx88-cards.c +++ b/trunk/drivers/media/video/cx88/cx88-cards.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "cx88.h" #include "tea5767.h" diff --git a/trunk/drivers/media/video/cx88/cx88-dsp.c b/trunk/drivers/media/video/cx88/cx88-dsp.c index a94e00a4ac5d..3e5eaf3fe2a6 100644 --- a/trunk/drivers/media/video/cx88/cx88-dsp.c +++ b/trunk/drivers/media/video/cx88/cx88-dsp.c @@ -19,7 +19,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-input.c b/trunk/drivers/media/video/cx88/cx88-input.c index 6b6abf062c21..de180d4d5a21 100644 --- a/trunk/drivers/media/video/cx88/cx88-input.c +++ b/trunk/drivers/media/video/cx88/cx88-input.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "cx88.h" diff --git a/trunk/drivers/media/video/cx88/cx88-mpeg.c b/trunk/drivers/media/video/cx88/cx88-mpeg.c index 6aba7af9160a..338af77f7f01 100644 --- a/trunk/drivers/media/video/cx88/cx88-mpeg.c +++ b/trunk/drivers/media/video/cx88/cx88-mpeg.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-tvaudio.c b/trunk/drivers/media/video/cx88/cx88-tvaudio.c index 239631568f3b..e8316cf7f32f 100644 --- a/trunk/drivers/media/video/cx88/cx88-tvaudio.c +++ b/trunk/drivers/media/video/cx88/cx88-tvaudio.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/cx88/cx88-vbi.c b/trunk/drivers/media/video/cx88/cx88-vbi.c index d9445b0e7ab2..0943060682bc 100644 --- a/trunk/drivers/media/video/cx88/cx88-vbi.c +++ b/trunk/drivers/media/video/cx88/cx88-vbi.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "cx88.h" diff --git a/trunk/drivers/media/video/cx88/cx88-vp3054-i2c.c b/trunk/drivers/media/video/cx88/cx88-vp3054-i2c.c index 794f2932b755..20800425c51e 100644 --- a/trunk/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/trunk/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -23,7 +23,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/video/davinci/dm644x_ccdc.c b/trunk/drivers/media/video/davinci/dm644x_ccdc.c index b4cc96dc99ef..0c394cade22a 100644 --- a/trunk/drivers/media/video/davinci/dm644x_ccdc.c +++ b/trunk/drivers/media/video/davinci/dm644x_ccdc.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/davinci/vpfe_capture.c b/trunk/drivers/media/video/davinci/vpfe_capture.c index 7cf042f9b377..885cd54499cf 100644 --- a/trunk/drivers/media/video/davinci/vpfe_capture.c +++ b/trunk/drivers/media/video/davinci/vpfe_capture.c @@ -67,7 +67,6 @@ * - Support for control ioctls */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/davinci/vpif_capture.c b/trunk/drivers/media/video/davinci/vpif_capture.c index 2e5a7fb2d0c9..78130721f578 100644 --- a/trunk/drivers/media/video/davinci/vpif_capture.c +++ b/trunk/drivers/media/video/davinci/vpif_capture.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/davinci/vpif_display.c b/trunk/drivers/media/video/davinci/vpif_display.c index 13c3a1b97760..dfddef7228dd 100644 --- a/trunk/drivers/media/video/davinci/vpif_display.c +++ b/trunk/drivers/media/video/davinci/vpif_display.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/em28xx/em28xx-cards.c b/trunk/drivers/media/video/em28xx/em28xx-cards.c index b0fb08337710..ecbcefb08739 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-cards.c +++ b/trunk/drivers/media/video/em28xx/em28xx-cards.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/em28xx/em28xx-core.c b/trunk/drivers/media/video/em28xx/em28xx-core.c index a41cc5566778..5a37eccbd7d6 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-core.c +++ b/trunk/drivers/media/video/em28xx/em28xx-core.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/em28xx/em28xx-dvb.c b/trunk/drivers/media/video/em28xx/em28xx-dvb.c index bcd3c371009b..1b96356b3ab2 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-dvb.c +++ b/trunk/drivers/media/video/em28xx/em28xx-dvb.c @@ -20,7 +20,6 @@ */ #include -#include #include #include "em28xx.h" diff --git a/trunk/drivers/media/video/em28xx/em28xx-input.c b/trunk/drivers/media/video/em28xx/em28xx-input.c index 20a0001e8885..1fb754e20875 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-input.c +++ b/trunk/drivers/media/video/em28xx/em28xx-input.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "em28xx.h" diff --git a/trunk/drivers/media/video/em28xx/em28xx-vbi.c b/trunk/drivers/media/video/em28xx/em28xx-vbi.c index 7f1c4a2173b6..c7dce39823d8 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-vbi.c +++ b/trunk/drivers/media/video/em28xx/em28xx-vbi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "em28xx.h" diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 0fe20110bfd6..ac2bd935927e 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "em28xx.h" #include diff --git a/trunk/drivers/media/video/gspca/gspca.h b/trunk/drivers/media/video/gspca/gspca.h index 8bb242fb79de..02c696a22be0 100644 --- a/trunk/drivers/media/video/gspca/gspca.h +++ b/trunk/drivers/media/video/gspca/gspca.h @@ -7,7 +7,6 @@ #include #include #include -#include /* compilation option */ #define GSPCA_DEBUG 1 diff --git a/trunk/drivers/media/video/gspca/jeilinj.c b/trunk/drivers/media/video/gspca/jeilinj.c index 84ecd56c6470..2019b04f9235 100644 --- a/trunk/drivers/media/video/gspca/jeilinj.c +++ b/trunk/drivers/media/video/gspca/jeilinj.c @@ -24,7 +24,6 @@ #define MODULE_NAME "jeilinj" #include -#include #include "gspca.h" #include "jpeg.h" diff --git a/trunk/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/trunk/drivers/media/video/gspca/m5602/m5602_s5k83a.c index 6b3be4fa2c06..fbd91545497a 100644 --- a/trunk/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/trunk/drivers/media/video/gspca/m5602/m5602_s5k83a.c @@ -17,7 +17,6 @@ */ #include -#include #include "m5602_s5k83a.h" static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val); diff --git a/trunk/drivers/media/video/gspca/sn9c20x.c b/trunk/drivers/media/video/gspca/sn9c20x.c index 38a6e15e096b..4a1bc08f82b9 100644 --- a/trunk/drivers/media/video/gspca/sn9c20x.c +++ b/trunk/drivers/media/video/gspca/sn9c20x.c @@ -23,7 +23,6 @@ #include #include #include -#include #endif #include "gspca.h" diff --git a/trunk/drivers/media/video/gspca/sonixj.c b/trunk/drivers/media/video/gspca/sonixj.c index 1d61b92f6bfc..83d5773d4629 100644 --- a/trunk/drivers/media/video/gspca/sonixj.c +++ b/trunk/drivers/media/video/gspca/sonixj.c @@ -22,7 +22,6 @@ #define MODULE_NAME "sonixj" #include -#include #include "gspca.h" #include "jpeg.h" diff --git a/trunk/drivers/media/video/gspca/sq905.c b/trunk/drivers/media/video/gspca/sq905.c index 09b3f93fa4d6..1fcaca6a87f7 100644 --- a/trunk/drivers/media/video/gspca/sq905.c +++ b/trunk/drivers/media/video/gspca/sq905.c @@ -36,7 +36,6 @@ #define MODULE_NAME "sq905" #include -#include #include "gspca.h" MODULE_AUTHOR("Adam Baker , " diff --git a/trunk/drivers/media/video/gspca/sq905c.c b/trunk/drivers/media/video/gspca/sq905c.c index 4c70628ca615..e64662052992 100644 --- a/trunk/drivers/media/video/gspca/sq905c.c +++ b/trunk/drivers/media/video/gspca/sq905c.c @@ -30,7 +30,6 @@ #define MODULE_NAME "sq905c" #include -#include #include "gspca.h" MODULE_AUTHOR("Theodore Kilgore "); diff --git a/trunk/drivers/media/video/gspca/zc3xx.c b/trunk/drivers/media/video/gspca/zc3xx.c index 7d7814c43f92..50986da3d912 100644 --- a/trunk/drivers/media/video/gspca/zc3xx.c +++ b/trunk/drivers/media/video/gspca/zc3xx.c @@ -22,7 +22,6 @@ #define MODULE_NAME "zc3xx" #include -#include #include "gspca.h" #include "jpeg.h" diff --git a/trunk/drivers/media/video/hdpvr/hdpvr-i2c.c b/trunk/drivers/media/video/hdpvr/hdpvr-i2c.c index 463b81bef6e2..296330a0e1e5 100644 --- a/trunk/drivers/media/video/hdpvr/hdpvr-i2c.c +++ b/trunk/drivers/media/video/hdpvr/hdpvr-i2c.c @@ -11,7 +11,6 @@ */ #include -#include #include "hdpvr.h" diff --git a/trunk/drivers/media/video/ivtv/ivtv-controls.c b/trunk/drivers/media/video/ivtv/ivtv-controls.c index b59475bfc243..4a9c8ce0ecb3 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-controls.c +++ b/trunk/drivers/media/video/ivtv/ivtv-controls.c @@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include -#include #include "ivtv-driver.h" #include "ivtv-cards.h" diff --git a/trunk/drivers/media/video/ivtv/ivtv-driver.h b/trunk/drivers/media/video/ivtv/ivtv-driver.h index 5028e31c564a..e4816da6482b 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-driver.h +++ b/trunk/drivers/media/video/ivtv/ivtv-driver.h @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/ivtv/ivtvfb.c b/trunk/drivers/media/video/ivtv/ivtvfb.c index de2ff1c6ac34..fa6bb85cb4b0 100644 --- a/trunk/drivers/media/video/ivtv/ivtvfb.c +++ b/trunk/drivers/media/video/ivtv/ivtvfb.c @@ -42,7 +42,6 @@ #include #include #include -#include #ifdef CONFIG_MTRR #include diff --git a/trunk/drivers/media/video/ks0127.c b/trunk/drivers/media/video/ks0127.c index 94734828053b..fab8e0254bbc 100644 --- a/trunk/drivers/media/video/ks0127.c +++ b/trunk/drivers/media/video/ks0127.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/m52790.c b/trunk/drivers/media/video/m52790.c index 4491d018eba6..d7317e798cc4 100644 --- a/trunk/drivers/media/video/m52790.c +++ b/trunk/drivers/media/video/m52790.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/meye.c b/trunk/drivers/media/video/meye.c index 4404e5ef818f..b421858ccf90 100644 --- a/trunk/drivers/media/video/meye.c +++ b/trunk/drivers/media/video/meye.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/msp3400-kthreads.c b/trunk/drivers/media/video/msp3400-kthreads.c index d5a69c5ee5e4..168bca703614 100644 --- a/trunk/drivers/media/video/msp3400-kthreads.c +++ b/trunk/drivers/media/video/msp3400-kthreads.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/mt9v011.c b/trunk/drivers/media/video/mt9v011.c index 72e55be0b4ab..cc85f77a5706 100644 --- a/trunk/drivers/media/video/mt9v011.c +++ b/trunk/drivers/media/video/mt9v011.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/mx1_camera.c b/trunk/drivers/media/video/mx1_camera.c index 3c8ebfcb742e..c167cc3de492 100644 --- a/trunk/drivers/media/video/mx1_camera.c +++ b/trunk/drivers/media/video/mx1_camera.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/omap24xxcam.c b/trunk/drivers/media/video/omap24xxcam.c index b189fe63394b..142c327afb32 100644 --- a/trunk/drivers/media/video/omap24xxcam.c +++ b/trunk/drivers/media/video/omap24xxcam.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/ov7670.c b/trunk/drivers/media/video/ov7670.c index aaa50f9b8e78..0e2184ec994e 100644 --- a/trunk/drivers/media/video/ov7670.c +++ b/trunk/drivers/media/video/ov7670.c @@ -12,7 +12,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/pms.c b/trunk/drivers/media/video/pms.c index 0598bbd3f368..11a2c26399b5 100644 --- a/trunk/drivers/media/video/pms.c +++ b/trunk/drivers/media/video/pms.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c index 88320900dbd4..68980e19409f 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c @@ -34,6 +34,7 @@ #include #include #include +#include struct routing_scheme { const int *def; diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index 2222da8d0ca6..82c135835753 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c @@ -36,6 +36,7 @@ #include #include #include +#include struct routing_scheme_item { diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c index e9b11e119f62..ae977668c496 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c @@ -19,6 +19,7 @@ */ #include +#include #include "pvrusb2-debugifc.h" #include "pvrusb2-hdw.h" #include "pvrusb2-debug.h" diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-dvb.c index 8c95793433e7..b7f5c49b1dbc 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-dvb.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-dvb.c @@ -20,7 +20,6 @@ #include #include -#include #include #include "dvbdev.h" #include "pvrusb2-debug.h" diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-eeprom.c index aeed1c2945fb..299afa4fa969 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-eeprom.c @@ -19,7 +19,6 @@ * */ -#include #include "pvrusb2-eeprom.h" #include "pvrusb2-hdw-internal.h" #include "pvrusb2-debug.h" diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c index eeacd0f67855..8689ddb54420 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index bf1e0fe9f4d2..cc8ddb2d2382 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -20,7 +20,6 @@ */ #include -#include #include #include "pvrusb2-context.h" #include "pvrusb2-hdw.h" diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c index 2e205c99eb96..4c96cf48c796 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c @@ -37,6 +37,7 @@ #include #include #include +#include struct routing_scheme { const int *def; diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-wm8775.c index 3ac8d751a5c0..8c1eae05aa08 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-wm8775.c @@ -34,6 +34,7 @@ #include #include #include +#include void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) { diff --git a/trunk/drivers/media/video/pwc/pwc-dec23.c b/trunk/drivers/media/video/pwc/pwc-dec23.c index 0c801b8f3eca..9e2d91f26bfe 100644 --- a/trunk/drivers/media/video/pwc/pwc-dec23.c +++ b/trunk/drivers/media/video/pwc/pwc-dec23.c @@ -30,7 +30,6 @@ #include #include -#include /* * USE_LOOKUP_TABLE_TO_CLAMP diff --git a/trunk/drivers/media/video/pwc/pwc-v4l.c b/trunk/drivers/media/video/pwc/pwc-v4l.c index 62d89b3113a4..bdb4ced57496 100644 --- a/trunk/drivers/media/video/pwc/pwc-v4l.c +++ b/trunk/drivers/media/video/pwc/pwc-v4l.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/media/video/pwc/pwc.h b/trunk/drivers/media/video/pwc/pwc.h index f1b206632957..0902355dfa77 100644 --- a/trunk/drivers/media/video/pwc/pwc.h +++ b/trunk/drivers/media/video/pwc/pwc.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/pxa_camera.c b/trunk/drivers/media/video/pxa_camera.c index 5ecc30daef2d..322ac4eecf0a 100644 --- a/trunk/drivers/media/video/pxa_camera.c +++ b/trunk/drivers/media/video/pxa_camera.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/s2255drv.c b/trunk/drivers/media/video/s2255drv.c index 3de914deb8ee..fb742f1ae711 100644 --- a/trunk/drivers/media/video/s2255drv.c +++ b/trunk/drivers/media/video/s2255drv.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/saa5246a.c b/trunk/drivers/media/video/saa5246a.c index 6b3b09ef8978..5ab6a0f901c0 100644 --- a/trunk/drivers/media/video/saa5246a.c +++ b/trunk/drivers/media/video/saa5246a.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/saa5249.c b/trunk/drivers/media/video/saa5249.c index 31ff27df4cbf..12835fb82c95 100644 --- a/trunk/drivers/media/video/saa5249.c +++ b/trunk/drivers/media/video/saa5249.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/saa7134/saa7134-dvb.c b/trunk/drivers/media/video/saa7134/saa7134-dvb.c index 4ab4a987c9b9..73739d2a63dd 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-dvb.c +++ b/trunk/drivers/media/video/saa7134/saa7134-dvb.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/saa7134/saa7134-empress.c b/trunk/drivers/media/video/saa7134/saa7134-empress.c index ea877a50f52d..ee5bff02a92c 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-empress.c +++ b/trunk/drivers/media/video/saa7134/saa7134-empress.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/media/video/saa7134/saa7134-i2c.c b/trunk/drivers/media/video/saa7134/saa7134-i2c.c index da41b6b1e64a..8096dace5f6c 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-i2c.c +++ b/trunk/drivers/media/video/saa7134/saa7134-i2c.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "saa7134-reg.h" diff --git a/trunk/drivers/media/video/saa7134/saa7134-input.c b/trunk/drivers/media/video/saa7134/saa7134-input.c index 58a0cdc8414a..9499000f66b6 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-input.c +++ b/trunk/drivers/media/video/saa7134/saa7134-input.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "saa7134-reg.h" #include "saa7134.h" diff --git a/trunk/drivers/media/video/saa7134/saa7134-ts.c b/trunk/drivers/media/video/saa7134/saa7134-ts.c index 2e3f4b412d8c..b9817d74943f 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-ts.c +++ b/trunk/drivers/media/video/saa7134/saa7134-ts.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "saa7134-reg.h" diff --git a/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c b/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c index 3e7d2fd1688f..76b16407b01e 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/trunk/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/saa7134/saa7134-vbi.c b/trunk/drivers/media/video/saa7134/saa7134-vbi.c index e9aa94b807f1..cb0304298a96 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-vbi.c +++ b/trunk/drivers/media/video/saa7134/saa7134-vbi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "saa7134-reg.h" #include "saa7134.h" diff --git a/trunk/drivers/media/video/saa7164/saa7164-api.c b/trunk/drivers/media/video/saa7164/saa7164-api.c index 3f1262b00cc0..1d487c150340 100644 --- a/trunk/drivers/media/video/saa7164/saa7164-api.c +++ b/trunk/drivers/media/video/saa7164/saa7164-api.c @@ -20,7 +20,6 @@ */ #include -#include #include "saa7164.h" diff --git a/trunk/drivers/media/video/saa7164/saa7164-buffer.c b/trunk/drivers/media/video/saa7164/saa7164-buffer.c index 5713f3a4b76c..9ca5c83d165b 100644 --- a/trunk/drivers/media/video/saa7164/saa7164-buffer.c +++ b/trunk/drivers/media/video/saa7164/saa7164-buffer.c @@ -19,8 +19,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #include "saa7164.h" /* The PCI address space for buffer handling looks like this: diff --git a/trunk/drivers/media/video/saa7164/saa7164-fw.c b/trunk/drivers/media/video/saa7164/saa7164-fw.c index 270245d275ab..ee0af3534ede 100644 --- a/trunk/drivers/media/video/saa7164/saa7164-fw.c +++ b/trunk/drivers/media/video/saa7164/saa7164-fw.c @@ -20,7 +20,6 @@ */ #include -#include #include "saa7164.h" diff --git a/trunk/drivers/media/video/saa717x.c b/trunk/drivers/media/video/saa717x.c index d521c648e157..6818df571168 100644 --- a/trunk/drivers/media/video/saa717x.c +++ b/trunk/drivers/media/video/saa717x.c @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/media/video/saa7185.c b/trunk/drivers/media/video/saa7185.c index 77db20392910..212baa10829b 100644 --- a/trunk/drivers/media/video/saa7185.c +++ b/trunk/drivers/media/video/saa7185.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/sh_mobile_ceu_camera.c b/trunk/drivers/media/video/sh_mobile_ceu_camera.c index 6e16b3979326..fb88c63188f3 100644 --- a/trunk/drivers/media/video/sh_mobile_ceu_camera.c +++ b/trunk/drivers/media/video/sh_mobile_ceu_camera.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/soc_camera.c b/trunk/drivers/media/video/soc_camera.c index a24174ddec46..80f6bfa2632b 100644 --- a/trunk/drivers/media/video/soc_camera.c +++ b/trunk/drivers/media/video/soc_camera.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/tda9840.c b/trunk/drivers/media/video/tda9840.c index 92d22d8931c1..d381fce3db40 100644 --- a/trunk/drivers/media/video/tda9840.c +++ b/trunk/drivers/media/video/tda9840.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tea6415c.c b/trunk/drivers/media/video/tea6415c.c index 3021a1e6b7bb..1585839bd0bd 100644 --- a/trunk/drivers/media/video/tea6415c.c +++ b/trunk/drivers/media/video/tea6415c.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tea6420.c b/trunk/drivers/media/video/tea6420.c index 49dafc5e1e2f..6bf6bc7dbc7f 100644 --- a/trunk/drivers/media/video/tea6420.c +++ b/trunk/drivers/media/video/tea6420.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/ths7303.c b/trunk/drivers/media/video/ths7303.c index 61b1dd118364..21781f8a0e8e 100644 --- a/trunk/drivers/media/video/ths7303.c +++ b/trunk/drivers/media/video/ths7303.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tlg2300/pd-alsa.c b/trunk/drivers/media/video/tlg2300/pd-alsa.c index 9f8b7da56b67..6f42621ad478 100644 --- a/trunk/drivers/media/video/tlg2300/pd-alsa.c +++ b/trunk/drivers/media/video/tlg2300/pd-alsa.c @@ -4,10 +4,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tlg2300/pd-dvb.c b/trunk/drivers/media/video/tlg2300/pd-dvb.c index ebd9cb5bec74..4133aee568bf 100644 --- a/trunk/drivers/media/video/tlg2300/pd-dvb.c +++ b/trunk/drivers/media/video/tlg2300/pd-dvb.c @@ -3,7 +3,6 @@ #include #include #include -#include #include "vendorcmds.h" #include diff --git a/trunk/drivers/media/video/tlg2300/pd-video.c b/trunk/drivers/media/video/tlg2300/pd-video.c index cf8f18c007e6..becfba6a3041 100644 --- a/trunk/drivers/media/video/tlg2300/pd-video.c +++ b/trunk/drivers/media/video/tlg2300/pd-video.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/tlv320aic23b.c b/trunk/drivers/media/video/tlv320aic23b.c index 9ddb32bc7af0..07789c64814c 100644 --- a/trunk/drivers/media/video/tlv320aic23b.c +++ b/trunk/drivers/media/video/tlv320aic23b.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tvp514x.c b/trunk/drivers/media/video/tvp514x.c index e4815a1806e3..26b4e718cd6d 100644 --- a/trunk/drivers/media/video/tvp514x.c +++ b/trunk/drivers/media/video/tvp514x.c @@ -29,7 +29,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/video/tvp5150.c b/trunk/drivers/media/video/tvp5150.c index 908ffb68e926..2d38e253f14e 100644 --- a/trunk/drivers/media/video/tvp5150.c +++ b/trunk/drivers/media/video/tvp5150.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/media/video/tvp7002.c b/trunk/drivers/media/video/tvp7002.c index 4a69bcc738f3..5a878bca02d4 100644 --- a/trunk/drivers/media/video/tvp7002.c +++ b/trunk/drivers/media/video/tvp7002.c @@ -26,7 +26,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/upd64031a.c b/trunk/drivers/media/video/upd64031a.c index 36c0c461d8be..a07a3fbb51eb 100644 --- a/trunk/drivers/media/video/upd64031a.c +++ b/trunk/drivers/media/video/upd64031a.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/upd64083.c b/trunk/drivers/media/video/upd64083.c index c5af93b30a2b..6eb0e5b00c32 100644 --- a/trunk/drivers/media/video/upd64083.c +++ b/trunk/drivers/media/video/upd64083.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/usbvideo/konicawc.c b/trunk/drivers/media/video/usbvideo/konicawc.c index 562e1d170be0..a0addcb04295 100644 --- a/trunk/drivers/media/video/usbvideo/konicawc.c +++ b/trunk/drivers/media/video/usbvideo/konicawc.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "usbvideo.h" diff --git a/trunk/drivers/media/video/usbvideo/quickcam_messenger.c b/trunk/drivers/media/video/usbvideo/quickcam_messenger.c index fab48ec6c0ea..c4d1b96b5cee 100644 --- a/trunk/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/trunk/drivers/media/video/usbvideo/quickcam_messenger.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "usbvideo.h" #include "quickcam_messenger.h" diff --git a/trunk/drivers/media/video/usbvision/usbvision-core.c b/trunk/drivers/media/video/usbvision/usbvision-core.c index f7aae2293758..e0f91e4ab653 100644 --- a/trunk/drivers/media/video/usbvision/usbvision-core.c +++ b/trunk/drivers/media/video/usbvision/usbvision-core.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/trunk/drivers/media/video/usbvision/usbvision-i2c.c b/trunk/drivers/media/video/usbvision/usbvision-i2c.c index 083765238a6a..0613922997e0 100644 --- a/trunk/drivers/media/video/usbvision/usbvision-i2c.c +++ b/trunk/drivers/media/video/usbvision/usbvision-i2c.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/media/video/uvc/uvc_ctrl.c b/trunk/drivers/media/video/uvc/uvc_ctrl.c index 6d3850b37161..3b2e7800d56f 100644 --- a/trunk/drivers/media/video/uvc/uvc_ctrl.c +++ b/trunk/drivers/media/video/uvc/uvc_ctrl.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/uvc/uvc_driver.c b/trunk/drivers/media/video/uvc/uvc_driver.c index 86ff8c12ea58..a814820a3f6e 100644 --- a/trunk/drivers/media/video/uvc/uvc_driver.c +++ b/trunk/drivers/media/video/uvc/uvc_driver.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/uvc/uvc_status.c b/trunk/drivers/media/video/uvc/uvc_status.c index 85019bdacdf7..1ca6dff73612 100644 --- a/trunk/drivers/media/video/uvc/uvc_status.c +++ b/trunk/drivers/media/video/uvc/uvc_status.c @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/media/video/uvc/uvc_v4l2.c b/trunk/drivers/media/video/uvc/uvc_v4l2.c index 7c9ab2933496..43152aa52227 100644 --- a/trunk/drivers/media/video/uvc/uvc_v4l2.c +++ b/trunk/drivers/media/video/uvc/uvc_v4l2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/uvc/uvc_video.c b/trunk/drivers/media/video/uvc/uvc_video.c index 821a9969b7bf..6b0666be370f 100644 --- a/trunk/drivers/media/video/uvc/uvc_video.c +++ b/trunk/drivers/media/video/uvc/uvc_video.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/v4l2-ioctl.c b/trunk/drivers/media/video/v4l2-ioctl.c index 7d59c107f13b..4b11257c3184 100644 --- a/trunk/drivers/media/video/v4l2-ioctl.c +++ b/trunk/drivers/media/video/v4l2-ioctl.c @@ -13,7 +13,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/media/video/videobuf-dma-contig.c b/trunk/drivers/media/video/videobuf-dma-contig.c index dce4f3aa4af1..22c01097e8a8 100644 --- a/trunk/drivers/media/video/videobuf-dma-contig.c +++ b/trunk/drivers/media/video/videobuf-dma-contig.c @@ -20,7 +20,6 @@ #include #include #include -#include #include struct videobuf_dma_contig_memory { diff --git a/trunk/drivers/media/video/videobuf-dvb.c b/trunk/drivers/media/video/videobuf-dvb.c index 0afb62e63d99..a56cf0d3a6d6 100644 --- a/trunk/drivers/media/video/videobuf-dvb.c +++ b/trunk/drivers/media/video/videobuf-dvb.c @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/media/video/vino.c b/trunk/drivers/media/video/vino.c index 3eb15f72ac09..a15d1e7cbed8 100644 --- a/trunk/drivers/media/video/vino.c +++ b/trunk/drivers/media/video/vino.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/vp27smpx.c b/trunk/drivers/media/video/vp27smpx.c index ca8303bd2401..38e53b303cc3 100644 --- a/trunk/drivers/media/video/vp27smpx.c +++ b/trunk/drivers/media/video/vp27smpx.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/vpx3220.c b/trunk/drivers/media/video/vpx3220.c index 77ebcea7c3da..33205d7537d8 100644 --- a/trunk/drivers/media/video/vpx3220.c +++ b/trunk/drivers/media/video/vpx3220.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/w9966.c b/trunk/drivers/media/video/w9966.c index bf9bf650a317..dcade619cbd8 100644 --- a/trunk/drivers/media/video/w9966.c +++ b/trunk/drivers/media/video/w9966.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/wm8739.c b/trunk/drivers/media/video/wm8739.c index a11b99b4226b..b572ce288e14 100644 --- a/trunk/drivers/media/video/wm8739.c +++ b/trunk/drivers/media/video/wm8739.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/wm8775.c b/trunk/drivers/media/video/wm8775.c index 5c2ba599c0c7..f1f261a35245 100644 --- a/trunk/drivers/media/video/wm8775.c +++ b/trunk/drivers/media/video/wm8775.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/media/video/zoran/zoran_card.c b/trunk/drivers/media/video/zoran/zoran_card.c index bfcd3aef50f9..be70574870de 100644 --- a/trunk/drivers/media/video/zoran/zoran_card.c +++ b/trunk/drivers/media/video/zoran/zoran_card.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/memstick/core/memstick.c b/trunk/drivers/memstick/core/memstick.c index c00fe8253c51..b3bf1c44d74d 100644 --- a/trunk/drivers/memstick/core/memstick.c +++ b/trunk/drivers/memstick/core/memstick.c @@ -16,7 +16,6 @@ #include #include #include -#include #define DRIVER_NAME "memstick" diff --git a/trunk/drivers/memstick/core/mspro_block.c b/trunk/drivers/memstick/core/mspro_block.c index 8327e248520a..972b87069d55 100644 --- a/trunk/drivers/memstick/core/mspro_block.c +++ b/trunk/drivers/memstick/core/mspro_block.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #define DRIVER_NAME "mspro_block" diff --git a/trunk/drivers/memstick/host/jmb38x_ms.c b/trunk/drivers/memstick/host/jmb38x_ms.c index f2b894cd8b02..f4a162a4bece 100644 --- a/trunk/drivers/memstick/host/jmb38x_ms.c +++ b/trunk/drivers/memstick/host/jmb38x_ms.c @@ -16,7 +16,6 @@ #include #include #include -#include #define DRIVER_NAME "jmb38x_ms" diff --git a/trunk/drivers/message/fusion/mptfc.c b/trunk/drivers/message/fusion/mptfc.c index 33f7256055b1..612ab3c51a6b 100644 --- a/trunk/drivers/message/fusion/mptfc.c +++ b/trunk/drivers/message/fusion/mptfc.c @@ -54,7 +54,6 @@ #include /* notifier code */ #include #include -#include #include #include diff --git a/trunk/drivers/message/fusion/mptlan.c b/trunk/drivers/message/fusion/mptlan.c index 4fa9665cbe93..34f3f36f819b 100644 --- a/trunk/drivers/message/fusion/mptlan.c +++ b/trunk/drivers/message/fusion/mptlan.c @@ -57,7 +57,6 @@ #include #include #include -#include #define my_VERSION MPT_LINUX_VERSION_COMMON #define MYNAM "mptlan" diff --git a/trunk/drivers/message/fusion/mptsas.c b/trunk/drivers/message/fusion/mptsas.c index 76687126b573..c20bbe45da82 100644 --- a/trunk/drivers/message/fusion/mptsas.c +++ b/trunk/drivers/message/fusion/mptsas.c @@ -45,7 +45,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/message/fusion/mptscsih.c b/trunk/drivers/message/fusion/mptscsih.c index 6796597dcee0..4a7d1afcb666 100644 --- a/trunk/drivers/message/fusion/mptscsih.c +++ b/trunk/drivers/message/fusion/mptscsih.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/message/fusion/mptspi.c b/trunk/drivers/message/fusion/mptspi.c index e44365193fdf..69f4257419b5 100644 --- a/trunk/drivers/message/fusion/mptspi.c +++ b/trunk/drivers/message/fusion/mptspi.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/message/i2o/i2o_block.c b/trunk/drivers/message/i2o/i2o_block.c index fc593fbab696..2658b1484a2c 100644 --- a/trunk/drivers/message/i2o/i2o_block.c +++ b/trunk/drivers/message/i2o/i2o_block.c @@ -51,7 +51,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/message/i2o/i2o_config.c b/trunk/drivers/message/i2o/i2o_config.c index 11073fa3d9f4..3d5f40cd69df 100644 --- a/trunk/drivers/message/i2o/i2o_config.c +++ b/trunk/drivers/message/i2o/i2o_config.c @@ -33,7 +33,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/message/i2o/i2o_proc.c b/trunk/drivers/message/i2o/i2o_proc.c index 07dbeaf9df99..949a648f8e2e 100644 --- a/trunk/drivers/message/i2o/i2o_proc.c +++ b/trunk/drivers/message/i2o/i2o_proc.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/message/i2o/iop.c b/trunk/drivers/message/i2o/iop.c index 090d2a3a6548..ef5ce2676f05 100644 --- a/trunk/drivers/message/i2o/iop.c +++ b/trunk/drivers/message/i2o/iop.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "core.h" #define OSM_NAME "i2o" diff --git a/trunk/drivers/message/i2o/pci.c b/trunk/drivers/message/i2o/pci.c index 73e4658af53c..35ba2ae38b42 100644 --- a/trunk/drivers/message/i2o/pci.c +++ b/trunk/drivers/message/i2o/pci.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "core.h" diff --git a/trunk/drivers/mfd/88pm860x-i2c.c b/trunk/drivers/mfd/88pm860x-i2c.c index 4a6e7186334e..c37e12bf3004 100644 --- a/trunk/drivers/mfd/88pm860x-i2c.c +++ b/trunk/drivers/mfd/88pm860x-i2c.c @@ -13,7 +13,6 @@ #include #include #include -#include static inline int pm860x_read_device(struct i2c_client *i2c, int reg, int bytes, void *dest) diff --git a/trunk/drivers/mfd/ab3100-core.c b/trunk/drivers/mfd/ab3100-core.c index e4ca5909e424..a2ce3b6af4a2 100644 --- a/trunk/drivers/mfd/ab3100-core.c +++ b/trunk/drivers/mfd/ab3100-core.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/ab3100-otp.c b/trunk/drivers/mfd/ab3100-otp.c index 2d14655fdebd..b603469dff69 100644 --- a/trunk/drivers/mfd/ab3100-otp.c +++ b/trunk/drivers/mfd/ab3100-otp.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/ab4500-core.c b/trunk/drivers/mfd/ab4500-core.c index c275daa3ab1a..1c44c19e073a 100644 --- a/trunk/drivers/mfd/ab4500-core.c +++ b/trunk/drivers/mfd/ab4500-core.c @@ -15,7 +15,6 @@ * Interrupt management to be added - TODO. */ #include -#include #include #include #include diff --git a/trunk/drivers/mfd/adp5520.c b/trunk/drivers/mfd/adp5520.c index 005532865654..b26644772d02 100644 --- a/trunk/drivers/mfd/adp5520.c +++ b/trunk/drivers/mfd/adp5520.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/asic3.c b/trunk/drivers/mfd/asic3.c index 7de708d15d72..95c1e6bd1729 100644 --- a/trunk/drivers/mfd/asic3.c +++ b/trunk/drivers/mfd/asic3.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mfd/da903x.c b/trunk/drivers/mfd/da903x.c index 67181b147ab3..e5ffe5617393 100644 --- a/trunk/drivers/mfd/da903x.c +++ b/trunk/drivers/mfd/da903x.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DA9030_CHIP_ID 0x00 #define DA9030_EVENT_A 0x01 diff --git a/trunk/drivers/mfd/ezx-pcap.c b/trunk/drivers/mfd/ezx-pcap.c index 134c69aa4790..df405af968fa 100644 --- a/trunk/drivers/mfd/ezx-pcap.c +++ b/trunk/drivers/mfd/ezx-pcap.c @@ -18,7 +18,6 @@ #include #include #include -#include #define PCAP_ADC_MAXQ 8 struct pcap_adc_request { diff --git a/trunk/drivers/mfd/htc-egpio.c b/trunk/drivers/mfd/htc-egpio.c index d3e74f8585e0..addb846c1e34 100644 --- a/trunk/drivers/mfd/htc-egpio.c +++ b/trunk/drivers/mfd/htc-egpio.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mfd/htc-i2cpld.c b/trunk/drivers/mfd/htc-i2cpld.c index 594c9a8e25e1..37b9fdab4f36 100644 --- a/trunk/drivers/mfd/htc-i2cpld.c +++ b/trunk/drivers/mfd/htc-i2cpld.c @@ -35,7 +35,6 @@ #include #include #include -#include struct htcpld_chip { spinlock_t lock; diff --git a/trunk/drivers/mfd/htc-pasic3.c b/trunk/drivers/mfd/htc-pasic3.c index f04300e05fd6..cb73051e43db 100644 --- a/trunk/drivers/mfd/htc-pasic3.c +++ b/trunk/drivers/mfd/htc-pasic3.c @@ -19,7 +19,6 @@ #include #include #include -#include struct pasic3_data { void __iomem *mapping; diff --git a/trunk/drivers/mfd/max8925-i2c.c b/trunk/drivers/mfd/max8925-i2c.c index d9fd8785da4d..c0b883c14f41 100644 --- a/trunk/drivers/mfd/max8925-i2c.c +++ b/trunk/drivers/mfd/max8925-i2c.c @@ -13,7 +13,6 @@ #include #include #include -#include #define RTC_I2C_ADDR 0x68 #define ADC_I2C_ADDR 0x47 diff --git a/trunk/drivers/mfd/mc13783-core.c b/trunk/drivers/mfd/mc13783-core.c index 1f68ecadddc2..62a847e4c2d8 100644 --- a/trunk/drivers/mfd/mc13783-core.c +++ b/trunk/drivers/mfd/mc13783-core.c @@ -9,7 +9,6 @@ * the terms of the GNU General Public License version 2 as published by the * Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/drivers/mfd/mcp-sa11x0.c b/trunk/drivers/mfd/mcp-sa11x0.c index 2dab02d9ac8b..258427232728 100644 --- a/trunk/drivers/mfd/mcp-sa11x0.c +++ b/trunk/drivers/mfd/mcp-sa11x0.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/mfd/menelaus.c b/trunk/drivers/mfd/menelaus.c index a94b131a18ef..970afa103261 100644 --- a/trunk/drivers/mfd/menelaus.c +++ b/trunk/drivers/mfd/menelaus.c @@ -40,7 +40,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mfd/mfd-core.c b/trunk/drivers/mfd/mfd-core.c index 8ffbb7a85a7e..aa17f4bddc56 100644 --- a/trunk/drivers/mfd/mfd-core.c +++ b/trunk/drivers/mfd/mfd-core.c @@ -15,7 +15,6 @@ #include #include #include -#include static int mfd_add_device(struct device *parent, int id, const struct mfd_cell *cell, diff --git a/trunk/drivers/mfd/pcf50633-adc.c b/trunk/drivers/mfd/pcf50633-adc.c index fe8f922f6654..6d2e8466df1d 100644 --- a/trunk/drivers/mfd/pcf50633-adc.c +++ b/trunk/drivers/mfd/pcf50633-adc.c @@ -17,7 +17,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/mfd/pcf50633-core.c b/trunk/drivers/mfd/pcf50633-core.c index 63a614d696c1..03dcc9200707 100644 --- a/trunk/drivers/mfd/pcf50633-core.c +++ b/trunk/drivers/mfd/pcf50633-core.c @@ -22,7 +22,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mfd/sh_mobile_sdhi.c b/trunk/drivers/mfd/sh_mobile_sdhi.c index 497f91b6138e..468fd366d4da 100644 --- a/trunk/drivers/mfd/sh_mobile_sdhi.c +++ b/trunk/drivers/mfd/sh_mobile_sdhi.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/sm501.c b/trunk/drivers/mfd/sm501.c index bc9275c12133..7b6652f60117 100644 --- a/trunk/drivers/mfd/sm501.c +++ b/trunk/drivers/mfd/sm501.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mfd/t7l66xb.c b/trunk/drivers/mfd/t7l66xb.c index da6383a934ac..26d9176fca91 100644 --- a/trunk/drivers/mfd/t7l66xb.c +++ b/trunk/drivers/mfd/t7l66xb.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/tc6387xb.c b/trunk/drivers/mfd/tc6387xb.c index 517f9bcdeaac..5c7f04343d5c 100644 --- a/trunk/drivers/mfd/tc6387xb.c +++ b/trunk/drivers/mfd/tc6387xb.c @@ -17,7 +17,6 @@ #include #include #include -#include enum { TC6387XB_CELL_MMC, diff --git a/trunk/drivers/mfd/tc6393xb.c b/trunk/drivers/mfd/tc6393xb.c index fcf9068810fb..c59e5c5737d0 100644 --- a/trunk/drivers/mfd/tc6393xb.c +++ b/trunk/drivers/mfd/tc6393xb.c @@ -25,7 +25,6 @@ #include #include #include -#include #define SCR_REVID 0x08 /* b Revision ID */ #define SCR_ISR 0x50 /* b Interrupt Status */ diff --git a/trunk/drivers/mfd/timberdale.c b/trunk/drivers/mfd/timberdale.c index 7f478ec4184b..1ed44d283803 100644 --- a/trunk/drivers/mfd/timberdale.c +++ b/trunk/drivers/mfd/timberdale.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mfd/twl4030-codec.c b/trunk/drivers/mfd/twl4030-codec.c index add6f67d8032..700b149c1b91 100644 --- a/trunk/drivers/mfd/twl4030-codec.c +++ b/trunk/drivers/mfd/twl4030-codec.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/twl4030-irq.c b/trunk/drivers/mfd/twl4030-irq.c index 202bdd59632d..9df9a5ad38f9 100644 --- a/trunk/drivers/mfd/twl4030-irq.c +++ b/trunk/drivers/mfd/twl4030-irq.c @@ -31,7 +31,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mfd/ucb1400_core.c b/trunk/drivers/mfd/ucb1400_core.c index dbe280153f9e..85fd9421be94 100644 --- a/trunk/drivers/mfd/ucb1400_core.c +++ b/trunk/drivers/mfd/ucb1400_core.c @@ -22,7 +22,6 @@ #include #include -#include #include unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, diff --git a/trunk/drivers/mfd/wm831x-core.c b/trunk/drivers/mfd/wm831x-core.c index a3d5728b6449..07101e9e1cba 100644 --- a/trunk/drivers/mfd/wm831x-core.c +++ b/trunk/drivers/mfd/wm831x-core.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mfd/wm8350-core.c b/trunk/drivers/mfd/wm8350-core.c index e400a3bed063..bd75807d5302 100644 --- a/trunk/drivers/mfd/wm8350-core.c +++ b/trunk/drivers/mfd/wm8350-core.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mfd/wm8350-i2c.c b/trunk/drivers/mfd/wm8350-i2c.c index 65830f57c093..8d8c93217572 100644 --- a/trunk/drivers/mfd/wm8350-i2c.c +++ b/trunk/drivers/mfd/wm8350-i2c.c @@ -19,7 +19,6 @@ #include #include #include -#include static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg, int bytes, void *dest) diff --git a/trunk/drivers/mfd/wm8400-core.c b/trunk/drivers/mfd/wm8400-core.c index 865ce013a821..ecfc8bbe89b9 100644 --- a/trunk/drivers/mfd/wm8400-core.c +++ b/trunk/drivers/mfd/wm8400-core.c @@ -18,7 +18,6 @@ #include #include #include -#include static struct { u16 readable; /* Mask of readable bits */ diff --git a/trunk/drivers/mfd/wm8994-core.c b/trunk/drivers/mfd/wm8994-core.c index cc524df10aa1..844e1c1b7d90 100644 --- a/trunk/drivers/mfd/wm8994-core.c +++ b/trunk/drivers/mfd/wm8994-core.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/misc/atmel-ssc.c b/trunk/drivers/misc/atmel-ssc.c index 4afffe610f99..558bf3f2c276 100644 --- a/trunk/drivers/misc/atmel-ssc.c +++ b/trunk/drivers/misc/atmel-ssc.c @@ -15,7 +15,6 @@ #include #include #include -#include /* Serialize access to ssc_list and user count */ static DEFINE_SPINLOCK(user_lock); diff --git a/trunk/drivers/misc/atmel_pwm.c b/trunk/drivers/misc/atmel_pwm.c index 0f3fb4f03bdf..6aa5294dfec4 100644 --- a/trunk/drivers/misc/atmel_pwm.c +++ b/trunk/drivers/misc/atmel_pwm.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/misc/atmel_tclib.c b/trunk/drivers/misc/atmel_tclib.c index 3891124001f2..05dc8a31f280 100644 --- a/trunk/drivers/misc/atmel_tclib.c +++ b/trunk/drivers/misc/atmel_tclib.c @@ -6,7 +6,6 @@ #include #include #include -#include /* Number of bytes to reserve for the iomem resource */ #define ATMEL_TC_IOMEM_SIZE 256 diff --git a/trunk/drivers/misc/c2port/core.c b/trunk/drivers/misc/c2port/core.c index ed090e77c9cd..b7a85f46a6c2 100644 --- a/trunk/drivers/misc/c2port/core.c +++ b/trunk/drivers/misc/c2port/core.c @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/misc/cb710/core.c b/trunk/drivers/misc/cb710/core.c index efec4139c3f6..b14eab0f2ba5 100644 --- a/trunk/drivers/misc/cb710/core.c +++ b/trunk/drivers/misc/cb710/core.c @@ -9,11 +9,11 @@ */ #include #include +#include #include #include #include #include -#include static DEFINE_IDA(cb710_ida); static DEFINE_SPINLOCK(cb710_ida_lock); diff --git a/trunk/drivers/misc/cb710/debug.c b/trunk/drivers/misc/cb710/debug.c index fcb3b8e30c52..02358d086e03 100644 --- a/trunk/drivers/misc/cb710/debug.c +++ b/trunk/drivers/misc/cb710/debug.c @@ -10,6 +10,7 @@ #include #include #include +#include #define CB710_REG_COUNT 0x80 diff --git a/trunk/drivers/misc/cs5535-mfgpt.c b/trunk/drivers/misc/cs5535-mfgpt.c index 9bec24db4d41..8110460558ff 100644 --- a/trunk/drivers/misc/cs5535-mfgpt.c +++ b/trunk/drivers/misc/cs5535-mfgpt.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DRV_NAME "cs5535-mfgpt" #define MFGPT_BAR 2 diff --git a/trunk/drivers/misc/ds1682.c b/trunk/drivers/misc/ds1682.c index 9197cfc55015..f3ee4a1abb77 100644 --- a/trunk/drivers/misc/ds1682.c +++ b/trunk/drivers/misc/ds1682.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/misc/enclosure.c b/trunk/drivers/misc/enclosure.c index 48c84a58163e..1eac626e710a 100644 --- a/trunk/drivers/misc/enclosure.c +++ b/trunk/drivers/misc/enclosure.c @@ -27,7 +27,6 @@ #include #include #include -#include static LIST_HEAD(container_list); static DEFINE_MUTEX(container_list_lock); diff --git a/trunk/drivers/misc/ep93xx_pwm.c b/trunk/drivers/misc/ep93xx_pwm.c index 46b3439673e9..ba4694169d79 100644 --- a/trunk/drivers/misc/ep93xx_pwm.c +++ b/trunk/drivers/misc/ep93xx_pwm.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/misc/hpilo.c b/trunk/drivers/misc/hpilo.c index 98ad0120aa9b..a92a3a742b43 100644 --- a/trunk/drivers/misc/hpilo.c +++ b/trunk/drivers/misc/hpilo.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "hpilo.h" static struct class *ilo_class; diff --git a/trunk/drivers/misc/ibmasm/command.c b/trunk/drivers/misc/ibmasm/command.c index 5c766b4fb238..e2031739aa29 100644 --- a/trunk/drivers/misc/ibmasm/command.c +++ b/trunk/drivers/misc/ibmasm/command.c @@ -23,7 +23,6 @@ */ #include -#include #include "ibmasm.h" #include "lowlevel.h" diff --git a/trunk/drivers/misc/ibmasm/event.c b/trunk/drivers/misc/ibmasm/event.c index 76bfda1ffaa9..572d41ffc186 100644 --- a/trunk/drivers/misc/ibmasm/event.c +++ b/trunk/drivers/misc/ibmasm/event.c @@ -23,7 +23,6 @@ */ #include -#include #include "ibmasm.h" #include "lowlevel.h" diff --git a/trunk/drivers/misc/ibmasm/ibmasmfs.c b/trunk/drivers/misc/ibmasm/ibmasmfs.c index 8844a3f45381..aecf40ecb3a4 100644 --- a/trunk/drivers/misc/ibmasm/ibmasmfs.c +++ b/trunk/drivers/misc/ibmasm/ibmasmfs.c @@ -75,7 +75,6 @@ #include #include -#include #include #include #include "ibmasm.h" diff --git a/trunk/drivers/misc/ibmasm/module.c b/trunk/drivers/misc/ibmasm/module.c index a234d965243b..dc14b0b9cbfa 100644 --- a/trunk/drivers/misc/ibmasm/module.c +++ b/trunk/drivers/misc/ibmasm/module.c @@ -52,7 +52,6 @@ #include #include -#include #include "ibmasm.h" #include "lowlevel.h" #include "remote.h" diff --git a/trunk/drivers/misc/ics932s401.c b/trunk/drivers/misc/ics932s401.c index 152e9d93eecb..395a4ea64e9c 100644 --- a/trunk/drivers/misc/ics932s401.c +++ b/trunk/drivers/misc/ics932s401.c @@ -26,7 +26,6 @@ #include #include #include -#include /* Addresses to scan */ static const unsigned short normal_i2c[] = { 0x69, I2C_CLIENT_END }; diff --git a/trunk/drivers/misc/ioc4.c b/trunk/drivers/misc/ioc4.c index 193206602d88..09dcb699e667 100644 --- a/trunk/drivers/misc/ioc4.c +++ b/trunk/drivers/misc/ioc4.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/misc/iwmc3200top/debugfs.c b/trunk/drivers/misc/iwmc3200top/debugfs.c index e9eda471f6e0..0c8ea0a1c8a3 100644 --- a/trunk/drivers/misc/iwmc3200top/debugfs.c +++ b/trunk/drivers/misc/iwmc3200top/debugfs.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/misc/iwmc3200top/fw-download.c b/trunk/drivers/misc/iwmc3200top/fw-download.c index e27afde6e99f..9dbaeb574e63 100644 --- a/trunk/drivers/misc/iwmc3200top/fw-download.c +++ b/trunk/drivers/misc/iwmc3200top/fw-download.c @@ -26,7 +26,6 @@ #include #include -#include #include #include "iwmc3200top.h" diff --git a/trunk/drivers/misc/iwmc3200top/log.c b/trunk/drivers/misc/iwmc3200top/log.c index a36a55a49cac..d569279698f6 100644 --- a/trunk/drivers/misc/iwmc3200top/log.c +++ b/trunk/drivers/misc/iwmc3200top/log.c @@ -26,7 +26,6 @@ #include #include -#include #include #include "fw-msg.h" #include "iwmc3200top.h" diff --git a/trunk/drivers/misc/iwmc3200top/main.c b/trunk/drivers/misc/iwmc3200top/main.c index c73cef2c3c5e..3b7292a5cea9 100644 --- a/trunk/drivers/misc/iwmc3200top/main.c +++ b/trunk/drivers/misc/iwmc3200top/main.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/misc/kgdbts.c b/trunk/drivers/misc/kgdbts.c index 72450237a0f4..fcb6ec1af173 100644 --- a/trunk/drivers/misc/kgdbts.c +++ b/trunk/drivers/misc/kgdbts.c @@ -295,10 +295,6 @@ static int check_and_rewind_pc(char *put_str, char *arg) /* On x86 a breakpoint stop requires it to be decremented */ if (addr + 1 == kgdbts_regs.ip) offset = -1; -#elif defined(CONFIG_SUPERH) - /* On SUPERH a breakpoint stop requires it to be decremented */ - if (addr + 2 == kgdbts_regs.pc) - offset = -2; #endif if (strcmp(arg, "silent") && instruction_pointer(&kgdbts_regs) + offset != addr) { @@ -309,8 +305,6 @@ static int check_and_rewind_pc(char *put_str, char *arg) #ifdef CONFIG_X86 /* On x86 adjust the instruction pointer if needed */ kgdbts_regs.ip += offset; -#elif defined(CONFIG_SUPERH) - kgdbts_regs.pc += offset; #endif return 0; } diff --git a/trunk/drivers/misc/lkdtm.c b/trunk/drivers/misc/lkdtm.c index 31a991161f0a..4a0648301fdf 100644 --- a/trunk/drivers/misc/lkdtm.c +++ b/trunk/drivers/misc/lkdtm.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/misc/phantom.c b/trunk/drivers/misc/phantom.c index 75ee0d3f6f45..779aa8ebe4cf 100644 --- a/trunk/drivers/misc/phantom.c +++ b/trunk/drivers/misc/phantom.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/misc/sgi-xp/xpc_main.c b/trunk/drivers/misc/sgi-xp/xpc_main.c index 8d082b46426b..832ed4c88cf7 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_main.c +++ b/trunk/drivers/misc/sgi-xp/xpc_main.c @@ -44,7 +44,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/misc/sgi-xp/xpc_partition.c b/trunk/drivers/misc/sgi-xp/xpc_partition.c index d551f09ccb79..9a6268c89fdd 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_partition.c +++ b/trunk/drivers/misc/sgi-xp/xpc_partition.c @@ -17,7 +17,6 @@ #include #include -#include #include "xpc.h" #include diff --git a/trunk/drivers/misc/sgi-xp/xpc_sn2.c b/trunk/drivers/misc/sgi-xp/xpc_sn2.c index 7d71c04fc938..8b70e03f939f 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_sn2.c +++ b/trunk/drivers/misc/sgi-xp/xpc_sn2.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/misc/sgi-xp/xpc_uv.c b/trunk/drivers/misc/sgi-xp/xpc_uv.c index 1f59ee2226ca..8725d5e8ab0c 100644 --- a/trunk/drivers/misc/sgi-xp/xpc_uv.c +++ b/trunk/drivers/misc/sgi-xp/xpc_uv.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #if defined CONFIG_X86_64 #include diff --git a/trunk/drivers/misc/sgi-xp/xpnet.c b/trunk/drivers/misc/sgi-xp/xpnet.c index ee5109a3cd98..57b152f8d1b9 100644 --- a/trunk/drivers/misc/sgi-xp/xpnet.c +++ b/trunk/drivers/misc/sgi-xp/xpnet.c @@ -20,7 +20,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/misc/tifm_core.c b/trunk/drivers/misc/tifm_core.c index 5f6852dff40b..98bcba521da2 100644 --- a/trunk/drivers/misc/tifm_core.c +++ b/trunk/drivers/misc/tifm_core.c @@ -10,7 +10,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/mmc/card/block.c b/trunk/drivers/mmc/card/block.c index cb9fbc83b090..1f552c6e7579 100644 --- a/trunk/drivers/mmc/card/block.c +++ b/trunk/drivers/mmc/card/block.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mmc/card/mmc_test.c b/trunk/drivers/mmc/card/mmc_test.c index 445d7db2277e..e7f8027165e6 100644 --- a/trunk/drivers/mmc/card/mmc_test.c +++ b/trunk/drivers/mmc/card/mmc_test.c @@ -13,7 +13,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mmc/card/queue.c b/trunk/drivers/mmc/card/queue.c index d6ded247d941..381fe032caa1 100644 --- a/trunk/drivers/mmc/card/queue.c +++ b/trunk/drivers/mmc/card/queue.c @@ -9,7 +9,6 @@ * published by the Free Software Foundation. * */ -#include #include #include #include diff --git a/trunk/drivers/mmc/card/sdio_uart.c b/trunk/drivers/mmc/card/sdio_uart.c index a0716967b7c8..723e50894db9 100644 --- a/trunk/drivers/mmc/card/sdio_uart.c +++ b/trunk/drivers/mmc/card/sdio_uart.c @@ -34,10 +34,10 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/core/bus.c b/trunk/drivers/mmc/core/bus.c index 49d9dcaeca49..bdb165f93046 100644 --- a/trunk/drivers/mmc/core/bus.c +++ b/trunk/drivers/mmc/core/bus.c @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/mmc/core/debugfs.c b/trunk/drivers/mmc/core/debugfs.c index 53cb380c0987..96d10f40fb23 100644 --- a/trunk/drivers/mmc/core/debugfs.c +++ b/trunk/drivers/mmc/core/debugfs.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/core/host.c b/trunk/drivers/mmc/core/host.c index 47353909e345..a268d12f1af0 100644 --- a/trunk/drivers/mmc/core/host.c +++ b/trunk/drivers/mmc/core/host.c @@ -16,7 +16,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mmc/core/mmc.c b/trunk/drivers/mmc/core/mmc.c index 89f7a25b7ac1..e041c003db22 100644 --- a/trunk/drivers/mmc/core/mmc.c +++ b/trunk/drivers/mmc/core/mmc.c @@ -11,7 +11,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/mmc/core/mmc_ops.c b/trunk/drivers/mmc/core/mmc_ops.c index 326447c9ede8..d2cb5c634392 100644 --- a/trunk/drivers/mmc/core/mmc_ops.c +++ b/trunk/drivers/mmc/core/mmc_ops.c @@ -9,7 +9,6 @@ * your option) any later version. */ -#include #include #include diff --git a/trunk/drivers/mmc/core/sd.c b/trunk/drivers/mmc/core/sd.c index 5eac21df4809..fdd414eded09 100644 --- a/trunk/drivers/mmc/core/sd.c +++ b/trunk/drivers/mmc/core/sd.c @@ -11,7 +11,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/mmc/core/sdio_bus.c b/trunk/drivers/mmc/core/sdio_bus.c index 4a890dcb95ab..9e060c87e64d 100644 --- a/trunk/drivers/mmc/core/sdio_bus.c +++ b/trunk/drivers/mmc/core/sdio_bus.c @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/mmc/core/sdio_cis.c b/trunk/drivers/mmc/core/sdio_cis.c index 541bdb89e0c5..9538389783c1 100644 --- a/trunk/drivers/mmc/core/sdio_cis.c +++ b/trunk/drivers/mmc/core/sdio_cis.c @@ -14,7 +14,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/mmc/host/at91_mci.c b/trunk/drivers/mmc/host/at91_mci.c index a6dd7da37357..91dc60cd032b 100644 --- a/trunk/drivers/mmc/host/at91_mci.c +++ b/trunk/drivers/mmc/host/at91_mci.c @@ -65,7 +65,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mmc/host/atmel-mci.c b/trunk/drivers/mmc/host/atmel-mci.c index 88be37d9e9a5..8072128e933b 100644 --- a/trunk/drivers/mmc/host/atmel-mci.c +++ b/trunk/drivers/mmc/host/atmel-mci.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/au1xmmc.c b/trunk/drivers/mmc/host/au1xmmc.c index f5834449400e..57b21198828f 100644 --- a/trunk/drivers/mmc/host/au1xmmc.c +++ b/trunk/drivers/mmc/host/au1xmmc.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/bfin_sdh.c b/trunk/drivers/mmc/host/bfin_sdh.c index 6919e844072c..56f7b448b911 100644 --- a/trunk/drivers/mmc/host/bfin_sdh.c +++ b/trunk/drivers/mmc/host/bfin_sdh.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/cb710-mmc.c b/trunk/drivers/mmc/host/cb710-mmc.c index 92a324f7417c..4e72964a7b43 100644 --- a/trunk/drivers/mmc/host/cb710-mmc.c +++ b/trunk/drivers/mmc/host/cb710-mmc.c @@ -9,6 +9,7 @@ */ #include #include +#include #include #include #include "cb710-mmc.h" diff --git a/trunk/drivers/mmc/host/mmc_spi.c b/trunk/drivers/mmc/host/mmc_spi.c index ad847a24a675..d55fe4fb7935 100644 --- a/trunk/drivers/mmc/host/mmc_spi.c +++ b/trunk/drivers/mmc/host/mmc_spi.c @@ -26,7 +26,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/mmc/host/msm_sdcc.c b/trunk/drivers/mmc/host/msm_sdcc.c index 04ae884383f6..4c068e5fe6b2 100644 --- a/trunk/drivers/mmc/host/msm_sdcc.c +++ b/trunk/drivers/mmc/host/msm_sdcc.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/of_mmc_spi.c b/trunk/drivers/mmc/host/of_mmc_spi.c index bb6cc54b558e..0c7a63c1f12f 100644 --- a/trunk/drivers/mmc/host/of_mmc_spi.c +++ b/trunk/drivers/mmc/host/of_mmc_spi.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mmc/host/omap.c b/trunk/drivers/mmc/host/omap.c index 84d280406341..c6d7e8ecadbf 100644 --- a/trunk/drivers/mmc/host/omap.c +++ b/trunk/drivers/mmc/host/omap.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/pxamci.c b/trunk/drivers/mmc/host/pxamci.c index 0ed48959b590..0d783f3e79ed 100644 --- a/trunk/drivers/mmc/host/pxamci.c +++ b/trunk/drivers/mmc/host/pxamci.c @@ -29,7 +29,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mmc/host/sdhci-pci.c b/trunk/drivers/mmc/host/sdhci-pci.c index 6701af629c30..8e1020cf73f4 100644 --- a/trunk/drivers/mmc/host/sdhci-pci.c +++ b/trunk/drivers/mmc/host/sdhci-pci.c @@ -16,7 +16,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mmc/host/sdhci-s3c.c b/trunk/drivers/mmc/host/sdhci-s3c.c index 2136794c0cfa..50997d2a63e7 100644 --- a/trunk/drivers/mmc/host/sdhci-s3c.c +++ b/trunk/drivers/mmc/host/sdhci-s3c.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/sdhci.c b/trunk/drivers/mmc/host/sdhci.c index 9d4fdfa685e5..d6ab62d539fb 100644 --- a/trunk/drivers/mmc/host/sdhci.c +++ b/trunk/drivers/mmc/host/sdhci.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mmc/host/wbsd.c b/trunk/drivers/mmc/host/wbsd.c index 69efe01eece8..89bf8cd25cac 100644 --- a/trunk/drivers/mmc/host/wbsd.c +++ b/trunk/drivers/mmc/host/wbsd.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/devices/block2mtd.c b/trunk/drivers/mtd/devices/block2mtd.c index ce6424008ed9..8c295f40d2ac 100644 --- a/trunk/drivers/mtd/devices/block2mtd.c +++ b/trunk/drivers/mtd/devices/block2mtd.c @@ -17,7 +17,6 @@ #include #include #include -#include #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) diff --git a/trunk/drivers/mtd/devices/m25p80.c b/trunk/drivers/mtd/devices/m25p80.c index 81e49a9b017e..f3f4768d6e18 100644 --- a/trunk/drivers/mtd/devices/m25p80.c +++ b/trunk/drivers/mtd/devices/m25p80.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/devices/sst25l.c b/trunk/drivers/mtd/devices/sst25l.c index fe17054ee2fe..0a11721f146e 100644 --- a/trunk/drivers/mtd/devices/sst25l.c +++ b/trunk/drivers/mtd/devices/sst25l.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/lpddr/lpddr_cmds.c b/trunk/drivers/mtd/lpddr/lpddr_cmds.c index a73ee12aad81..e22ca49583e7 100644 --- a/trunk/drivers/mtd/lpddr/lpddr_cmds.c +++ b/trunk/drivers/mtd/lpddr/lpddr_cmds.c @@ -26,7 +26,6 @@ */ #include #include -#include static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len, size_t *retlen, u_char *buf); diff --git a/trunk/drivers/mtd/maps/amd76xrom.c b/trunk/drivers/mtd/maps/amd76xrom.c index 19fe92db0c46..237733d094c4 100644 --- a/trunk/drivers/mtd/maps/amd76xrom.c +++ b/trunk/drivers/mtd/maps/amd76xrom.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/bfin-async-flash.c b/trunk/drivers/mtd/maps/bfin-async-flash.c index c0fd99b0c525..a7c808b577d3 100644 --- a/trunk/drivers/mtd/maps/bfin-async-flash.c +++ b/trunk/drivers/mtd/maps/bfin-async-flash.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/maps/ck804xrom.c b/trunk/drivers/mtd/maps/ck804xrom.c index ddb462bea9b5..424f17d6ffd1 100644 --- a/trunk/drivers/mtd/maps/ck804xrom.c +++ b/trunk/drivers/mtd/maps/ck804xrom.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/esb2rom.c b/trunk/drivers/mtd/maps/esb2rom.c index d12c93dc1aad..11a2f57df9cf 100644 --- a/trunk/drivers/mtd/maps/esb2rom.c +++ b/trunk/drivers/mtd/maps/esb2rom.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/gpio-addr-flash.c b/trunk/drivers/mtd/maps/gpio-addr-flash.c index 32e89d773b4e..1ad5caf9fe69 100644 --- a/trunk/drivers/mtd/maps/gpio-addr-flash.c +++ b/trunk/drivers/mtd/maps/gpio-addr-flash.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) diff --git a/trunk/drivers/mtd/maps/ichxrom.c b/trunk/drivers/mtd/maps/ichxrom.c index f102bf243a74..c32bc28920b3 100644 --- a/trunk/drivers/mtd/maps/ichxrom.c +++ b/trunk/drivers/mtd/maps/ichxrom.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/intel_vr_nor.c b/trunk/drivers/mtd/maps/intel_vr_nor.c index fc1998512eb4..1e7814ae212a 100644 --- a/trunk/drivers/mtd/maps/intel_vr_nor.c +++ b/trunk/drivers/mtd/maps/intel_vr_nor.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/octagon-5066.c b/trunk/drivers/mtd/maps/octagon-5066.c index 23fe1786770f..2b2e45093218 100644 --- a/trunk/drivers/mtd/maps/octagon-5066.c +++ b/trunk/drivers/mtd/maps/octagon-5066.c @@ -24,6 +24,7 @@ ##################################################################### */ #include +#include #include #include #include diff --git a/trunk/drivers/mtd/maps/physmap_of.c b/trunk/drivers/mtd/maps/physmap_of.c index 101ee6ead05c..61e4eb48bb2d 100644 --- a/trunk/drivers/mtd/maps/physmap_of.c +++ b/trunk/drivers/mtd/maps/physmap_of.c @@ -23,7 +23,6 @@ #include #include #include -#include struct of_flash_list { struct mtd_info *mtd; diff --git a/trunk/drivers/mtd/maps/pismo.c b/trunk/drivers/mtd/maps/pismo.c index 60c068db452d..30e12c88d1da 100644 --- a/trunk/drivers/mtd/maps/pismo.c +++ b/trunk/drivers/mtd/maps/pismo.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/pmcmsp-flash.c b/trunk/drivers/mtd/maps/pmcmsp-flash.c index acb13fa5001c..c8fd8da4bc87 100644 --- a/trunk/drivers/mtd/maps/pmcmsp-flash.c +++ b/trunk/drivers/mtd/maps/pmcmsp-flash.c @@ -28,7 +28,6 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/pxa2xx-flash.c b/trunk/drivers/mtd/maps/pxa2xx-flash.c index 91dc6331053f..b13f6417b5b2 100644 --- a/trunk/drivers/mtd/maps/pxa2xx-flash.c +++ b/trunk/drivers/mtd/maps/pxa2xx-flash.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/sbc_gxx.c b/trunk/drivers/mtd/maps/sbc_gxx.c index 04b2781fc627..1b1c0b7e11ef 100644 --- a/trunk/drivers/mtd/maps/sbc_gxx.c +++ b/trunk/drivers/mtd/maps/sbc_gxx.c @@ -45,6 +45,7 @@ separate MTD devices. // Includes #include +#include #include #include #include diff --git a/trunk/drivers/mtd/maps/sun_uflash.c b/trunk/drivers/mtd/maps/sun_uflash.c index fadc4c45b455..fd7a1017399a 100644 --- a/trunk/drivers/mtd/maps/sun_uflash.c +++ b/trunk/drivers/mtd/maps/sun_uflash.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/maps/vmax301.c b/trunk/drivers/mtd/maps/vmax301.c index 6adaa6acc193..6d452dcdfe34 100644 --- a/trunk/drivers/mtd/maps/vmax301.c +++ b/trunk/drivers/mtd/maps/vmax301.c @@ -16,6 +16,7 @@ ##################################################################### */ #include +#include #include #include #include diff --git a/trunk/drivers/mtd/maps/vmu-flash.c b/trunk/drivers/mtd/maps/vmu-flash.c index 4afc167731ef..82afad0ddd72 100644 --- a/trunk/drivers/mtd/maps/vmu-flash.c +++ b/trunk/drivers/mtd/maps/vmu-flash.c @@ -8,7 +8,6 @@ * GNU General Public Licence */ #include -#include #include #include #include diff --git a/trunk/drivers/mtd/mtdcore.c b/trunk/drivers/mtd/mtdcore.c index 5b38b17d2229..c356c0a30c3e 100644 --- a/trunk/drivers/mtd/mtdcore.c +++ b/trunk/drivers/mtd/mtdcore.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/mtd/nand/bcm_umi_nand.c b/trunk/drivers/mtd/nand/bcm_umi_nand.c index c997f98eeb3d..7d1cca7a31a9 100644 --- a/trunk/drivers/mtd/nand/bcm_umi_nand.c +++ b/trunk/drivers/mtd/nand/bcm_umi_nand.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/nand/cafe_nand.c b/trunk/drivers/mtd/nand/cafe_nand.c index e5a9f9ccea60..c828d9ac7bd7 100644 --- a/trunk/drivers/mtd/nand/cafe_nand.c +++ b/trunk/drivers/mtd/nand/cafe_nand.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #define CAFE_NAND_CTRL1 0x00 diff --git a/trunk/drivers/mtd/nand/cmx270_nand.c b/trunk/drivers/mtd/nand/cmx270_nand.c index 6e6495278258..826cacffcefc 100644 --- a/trunk/drivers/mtd/nand/cmx270_nand.c +++ b/trunk/drivers/mtd/nand/cmx270_nand.c @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/davinci_nand.c b/trunk/drivers/mtd/nand/davinci_nand.c index 76e2dc8e62f7..fe3eba87de40 100644 --- a/trunk/drivers/mtd/nand/davinci_nand.c +++ b/trunk/drivers/mtd/nand/davinci_nand.c @@ -32,7 +32,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/mtd/nand/diskonchip.c b/trunk/drivers/mtd/nand/diskonchip.c index 47067bc98248..b126cf887476 100644 --- a/trunk/drivers/mtd/nand/diskonchip.c +++ b/trunk/drivers/mtd/nand/diskonchip.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/fsl_upm.c b/trunk/drivers/mtd/nand/fsl_upm.c index 4b96296af321..071a60cb4204 100644 --- a/trunk/drivers/mtd/nand/fsl_upm.c +++ b/trunk/drivers/mtd/nand/fsl_upm.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #define FSL_UPM_WAIT_RUN_PATTERN 0x1 diff --git a/trunk/drivers/mtd/nand/ndfc.c b/trunk/drivers/mtd/nand/ndfc.c index b983cae8c298..40b5658bdbe6 100644 --- a/trunk/drivers/mtd/nand/ndfc.c +++ b/trunk/drivers/mtd/nand/ndfc.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/nand/nomadik_nand.c b/trunk/drivers/mtd/nand/nomadik_nand.c index 1f6f741af5da..66123419f65d 100644 --- a/trunk/drivers/mtd/nand/nomadik_nand.c +++ b/trunk/drivers/mtd/nand/nomadik_nand.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/omap2.c b/trunk/drivers/mtd/nand/omap2.c index 7545568fce47..26aec0080184 100644 --- a/trunk/drivers/mtd/nand/omap2.c +++ b/trunk/drivers/mtd/nand/omap2.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/pxa3xx_nand.c b/trunk/drivers/mtd/nand/pxa3xx_nand.c index 5d55152162cf..1a5a0365c983 100644 --- a/trunk/drivers/mtd/nand/pxa3xx_nand.c +++ b/trunk/drivers/mtd/nand/pxa3xx_nand.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/sh_flctl.c b/trunk/drivers/mtd/nand/sh_flctl.c index 34752fce0793..1842df8bdd93 100644 --- a/trunk/drivers/mtd/nand/sh_flctl.c +++ b/trunk/drivers/mtd/nand/sh_flctl.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/nand/tmio_nand.c b/trunk/drivers/mtd/nand/tmio_nand.c index fa28f01ae009..92c73344a669 100644 --- a/trunk/drivers/mtd/nand/tmio_nand.c +++ b/trunk/drivers/mtd/nand/tmio_nand.c @@ -37,7 +37,6 @@ #include #include #include -#include /*--------------------------------------------------------------------------*/ diff --git a/trunk/drivers/mtd/ofpart.c b/trunk/drivers/mtd/ofpart.c index 4f0d635674f3..62d6a78c4eee 100644 --- a/trunk/drivers/mtd/ofpart.c +++ b/trunk/drivers/mtd/ofpart.c @@ -17,7 +17,6 @@ #include #include #include -#include #include int __devinit of_mtd_parse_partitions(struct device *dev, diff --git a/trunk/drivers/mtd/onenand/omap2.c b/trunk/drivers/mtd/onenand/omap2.c index fd406348fdfd..75f38b95811e 100644 --- a/trunk/drivers/mtd/onenand/omap2.c +++ b/trunk/drivers/mtd/onenand/omap2.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/onenand/onenand_base.c b/trunk/drivers/mtd/onenand/onenand_base.c index 32f0ed33afe0..f63b1db3ffb3 100644 --- a/trunk/drivers/mtd/onenand/onenand_base.c +++ b/trunk/drivers/mtd/onenand/onenand_base.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/onenand/onenand_sim.c b/trunk/drivers/mtd/onenand/onenand_sim.c index 8b246061d511..f6e3c8aebd3a 100644 --- a/trunk/drivers/mtd/onenand/onenand_sim.c +++ b/trunk/drivers/mtd/onenand/onenand_sim.c @@ -16,7 +16,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/mtd/tests/mtd_nandecctest.c b/trunk/drivers/mtd/tests/mtd_nandecctest.c index 70d6d7d0d656..c1f31051784c 100644 --- a/trunk/drivers/mtd/tests/mtd_nandecctest.c +++ b/trunk/drivers/mtd/tests/mtd_nandecctest.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/mtd/tests/mtd_oobtest.c b/trunk/drivers/mtd/tests/mtd_oobtest.c index dec92ae6111a..5813920e79a5 100644 --- a/trunk/drivers/mtd/tests/mtd_oobtest.c +++ b/trunk/drivers/mtd/tests/mtd_oobtest.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_oobtest: " diff --git a/trunk/drivers/mtd/tests/mtd_pagetest.c b/trunk/drivers/mtd/tests/mtd_pagetest.c index 921a85df9196..ce17cbe918c5 100644 --- a/trunk/drivers/mtd/tests/mtd_pagetest.c +++ b/trunk/drivers/mtd/tests/mtd_pagetest.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_pagetest: " diff --git a/trunk/drivers/mtd/tests/mtd_readtest.c b/trunk/drivers/mtd/tests/mtd_readtest.c index 7107fccbc7de..25c5dd03a837 100644 --- a/trunk/drivers/mtd/tests/mtd_readtest.c +++ b/trunk/drivers/mtd/tests/mtd_readtest.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_readtest: " diff --git a/trunk/drivers/mtd/tests/mtd_speedtest.c b/trunk/drivers/mtd/tests/mtd_speedtest.c index 56ca62bb96bf..7fbb51d4eabe 100644 --- a/trunk/drivers/mtd/tests/mtd_speedtest.c +++ b/trunk/drivers/mtd/tests/mtd_speedtest.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_speedtest: " diff --git a/trunk/drivers/mtd/tests/mtd_stresstest.c b/trunk/drivers/mtd/tests/mtd_stresstest.c index 3854afec56d0..a99d3cd737d8 100644 --- a/trunk/drivers/mtd/tests/mtd_stresstest.c +++ b/trunk/drivers/mtd/tests/mtd_stresstest.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/mtd/tests/mtd_subpagetest.c b/trunk/drivers/mtd/tests/mtd_subpagetest.c index 700237a3d120..5b889724268e 100644 --- a/trunk/drivers/mtd/tests/mtd_subpagetest.c +++ b/trunk/drivers/mtd/tests/mtd_subpagetest.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_subpagetest: " diff --git a/trunk/drivers/mtd/tests/mtd_torturetest.c b/trunk/drivers/mtd/tests/mtd_torturetest.c index 5c6c3d248901..631a0ab3a33c 100644 --- a/trunk/drivers/mtd/tests/mtd_torturetest.c +++ b/trunk/drivers/mtd/tests/mtd_torturetest.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #define PRINT_PREF KERN_INFO "mtd_torturetest: " diff --git a/trunk/drivers/mtd/ubi/build.c b/trunk/drivers/mtd/ubi/build.c index 55c726dde942..fad40aa6f099 100644 --- a/trunk/drivers/mtd/ubi/build.c +++ b/trunk/drivers/mtd/ubi/build.c @@ -44,7 +44,6 @@ #include #include #include -#include #include "ubi.h" /* Maximum length of the 'mtd=' parameter */ diff --git a/trunk/drivers/mtd/ubi/cdev.c b/trunk/drivers/mtd/ubi/cdev.c index 72ebb3f06b86..111ea41c4ecd 100644 --- a/trunk/drivers/mtd/ubi/cdev.c +++ b/trunk/drivers/mtd/ubi/cdev.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/ubi/gluebi.c b/trunk/drivers/mtd/ubi/gluebi.c index 9aa81584c8a2..b5e478fa2661 100644 --- a/trunk/drivers/mtd/ubi/gluebi.c +++ b/trunk/drivers/mtd/ubi/gluebi.c @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/ubi/io.c b/trunk/drivers/mtd/ubi/io.c index 533b1a4b9af1..b4ecc84c7549 100644 --- a/trunk/drivers/mtd/ubi/io.c +++ b/trunk/drivers/mtd/ubi/io.c @@ -88,7 +88,6 @@ #include #include -#include #include "ubi.h" #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID diff --git a/trunk/drivers/mtd/ubi/kapi.c b/trunk/drivers/mtd/ubi/kapi.c index 17f287decc36..1361574e2b00 100644 --- a/trunk/drivers/mtd/ubi/kapi.c +++ b/trunk/drivers/mtd/ubi/kapi.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/ubi/scan.c b/trunk/drivers/mtd/ubi/scan.c index dc5f688699da..594184bbd56a 100644 --- a/trunk/drivers/mtd/ubi/scan.c +++ b/trunk/drivers/mtd/ubi/scan.c @@ -41,7 +41,6 @@ */ #include -#include #include #include #include "ubi.h" diff --git a/trunk/drivers/mtd/ubi/ubi.h b/trunk/drivers/mtd/ubi/ubi.h index 5176d4886518..1af08178defd 100644 --- a/trunk/drivers/mtd/ubi/ubi.h +++ b/trunk/drivers/mtd/ubi/ubi.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/mtd/ubi/vmt.c b/trunk/drivers/mtd/ubi/vmt.c index e42afab9a9fe..ab64cb56df6e 100644 --- a/trunk/drivers/mtd/ubi/vmt.c +++ b/trunk/drivers/mtd/ubi/vmt.c @@ -25,7 +25,6 @@ #include #include -#include #include "ubi.h" #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID diff --git a/trunk/drivers/mtd/ubi/vtbl.c b/trunk/drivers/mtd/ubi/vtbl.c index cd90ff3b76b1..40044028d682 100644 --- a/trunk/drivers/mtd/ubi/vtbl.c +++ b/trunk/drivers/mtd/ubi/vtbl.c @@ -58,7 +58,6 @@ #include #include -#include #include #include "ubi.h" diff --git a/trunk/drivers/net/3c501.c b/trunk/drivers/net/3c501.c index 3ea42ff17657..b6de7b1e2a5c 100644 --- a/trunk/drivers/net/3c501.c +++ b/trunk/drivers/net/3c501.c @@ -117,6 +117,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/3c505.c b/trunk/drivers/net/3c505.c index 29b8d1d63bde..04b5bba19021 100644 --- a/trunk/drivers/net/3c505.c +++ b/trunk/drivers/net/3c505.c @@ -102,12 +102,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/3c507.c b/trunk/drivers/net/3c507.c index b32b7a1710b7..77cf0901a441 100644 --- a/trunk/drivers/net/3c507.c +++ b/trunk/drivers/net/3c507.c @@ -58,6 +58,7 @@ static const char version[] = #include #include #include +#include #include #include diff --git a/trunk/drivers/net/3c509.c b/trunk/drivers/net/3c509.c index ab9bb3c52002..902435a76466 100644 --- a/trunk/drivers/net/3c509.c +++ b/trunk/drivers/net/3c509.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/3c515.c b/trunk/drivers/net/3c515.c index 2e17837be546..1e898b1c8068 100644 --- a/trunk/drivers/net/3c515.c +++ b/trunk/drivers/net/3c515.c @@ -65,6 +65,7 @@ static int max_interrupt_work = 20; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/3c523.c b/trunk/drivers/net/3c523.c index 1719079cc498..beed4fa10c6e 100644 --- a/trunk/drivers/net/3c523.c +++ b/trunk/drivers/net/3c523.c @@ -99,6 +99,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/3c59x.c b/trunk/drivers/net/3c59x.c index 5f92fdbe66e2..f965431f4924 100644 --- a/trunk/drivers/net/3c59x.c +++ b/trunk/drivers/net/3c59x.c @@ -77,6 +77,7 @@ static int vortex_debug = 1; #include #include #include +#include #include #include #include @@ -89,7 +90,6 @@ static int vortex_debug = 1; #include #include #include -#include #include /* For nr_irqs only. */ #include #include diff --git a/trunk/drivers/net/7990.c b/trunk/drivers/net/7990.c index 500e135723bd..4e9a5a20b6a6 100644 --- a/trunk/drivers/net/7990.c +++ b/trunk/drivers/net/7990.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/8139cp.c b/trunk/drivers/net/8139cp.c index a09e6ce3eaa0..3d4406b16658 100644 --- a/trunk/drivers/net/8139cp.c +++ b/trunk/drivers/net/8139cp.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/8139too.c b/trunk/drivers/net/8139too.c index a03d291de854..b4efc913978b 100644 --- a/trunk/drivers/net/8139too.c +++ b/trunk/drivers/net/8139too.c @@ -110,7 +110,6 @@ #include #include #include -#include #include #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION diff --git a/trunk/drivers/net/82596.c b/trunk/drivers/net/82596.c index 56e68db48861..f94d17d78bb0 100644 --- a/trunk/drivers/net/82596.c +++ b/trunk/drivers/net/82596.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 7b832c727f87..0ba5b8e50a7c 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -2582,31 +2582,6 @@ config CHELSIO_T3 To compile this driver as a module, choose M here: the module will be called cxgb3. -config CHELSIO_T4_DEPENDS - tristate - depends on PCI && INET - default y - -config CHELSIO_T4 - tristate "Chelsio Communications T4 Ethernet support" - depends on CHELSIO_T4_DEPENDS - select FW_LOADER - select MDIO - help - This driver supports Chelsio T4-based gigabit and 10Gb Ethernet - adapters. - - For general information about Chelsio and our products, visit - our website at . - - For customer support, please visit our customer support page at - . - - Please send feedback to . - - To compile this driver as a module choose M here; the module - will be called cxgb4. - config EHEA tristate "eHEA Ethernet support" depends on IBMEBUS && INET && SPARSEMEM diff --git a/trunk/drivers/net/Makefile b/trunk/drivers/net/Makefile index a583b50d9de8..478886234c28 100644 --- a/trunk/drivers/net/Makefile +++ b/trunk/drivers/net/Makefile @@ -19,7 +19,6 @@ obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_IP1000) += ipg.o obj-$(CONFIG_CHELSIO_T1) += chelsio/ obj-$(CONFIG_CHELSIO_T3) += cxgb3/ -obj-$(CONFIG_CHELSIO_T4) += cxgb4/ obj-$(CONFIG_EHEA) += ehea/ obj-$(CONFIG_CAN) += can/ obj-$(CONFIG_BONDING) += bonding/ diff --git a/trunk/drivers/net/a2065.c b/trunk/drivers/net/a2065.c index ed5e9742be2c..bd4d829eca12 100644 --- a/trunk/drivers/net/a2065.c +++ b/trunk/drivers/net/a2065.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/acenic.c b/trunk/drivers/net/acenic.c index 97a3dfd94dfa..4ae750ef1e10 100644 --- a/trunk/drivers/net/acenic.c +++ b/trunk/drivers/net/acenic.c @@ -67,7 +67,6 @@ #include #include #include -#include #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #include diff --git a/trunk/drivers/net/amd8111e.c b/trunk/drivers/net/amd8111e.c index 8d58f0a8f42f..b8a59d255b49 100644 --- a/trunk/drivers/net/amd8111e.c +++ b/trunk/drivers/net/amd8111e.c @@ -73,6 +73,7 @@ Revision History: #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/appletalk/cops.c b/trunk/drivers/net/appletalk/cops.c index 6f8d6206b5c4..73b38c204eb9 100644 --- a/trunk/drivers/net/appletalk/cops.c +++ b/trunk/drivers/net/appletalk/cops.c @@ -56,6 +56,7 @@ static const char *version = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/appletalk/ipddp.c b/trunk/drivers/net/appletalk/ipddp.c index 79636ee35829..eb0448b03f41 100644 --- a/trunk/drivers/net/appletalk/ipddp.c +++ b/trunk/drivers/net/appletalk/ipddp.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/appletalk/ltpc.c b/trunk/drivers/net/appletalk/ltpc.c index 6af65b656f31..8ea4ec705bef 100644 --- a/trunk/drivers/net/appletalk/ltpc.c +++ b/trunk/drivers/net/appletalk/ltpc.c @@ -215,6 +215,7 @@ static int dma; #include #include #include +#include #include #include #include @@ -227,7 +228,6 @@ static int dma; #include #include #include -#include #include #include diff --git a/trunk/drivers/net/arcnet/arc-rawmode.c b/trunk/drivers/net/arcnet/arc-rawmode.c index 705e6ce2eb90..8ea9c7545c12 100644 --- a/trunk/drivers/net/arcnet/arc-rawmode.c +++ b/trunk/drivers/net/arcnet/arc-rawmode.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/arcnet/arc-rimi.c b/trunk/drivers/net/arcnet/arc-rimi.c index 9efbbbae47ca..e6afab2455b1 100644 --- a/trunk/drivers/net/arcnet/arc-rimi.c +++ b/trunk/drivers/net/arcnet/arc-rimi.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arcnet/capmode.c b/trunk/drivers/net/arcnet/capmode.c index 355797f70048..66bcbbb6babc 100644 --- a/trunk/drivers/net/arcnet/capmode.c +++ b/trunk/drivers/net/arcnet/capmode.c @@ -27,7 +27,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/arcnet/com20020-isa.c b/trunk/drivers/net/arcnet/com20020-isa.c index 0402da30a4ed..db08fc24047a 100644 --- a/trunk/drivers/net/arcnet/com20020-isa.c +++ b/trunk/drivers/net/arcnet/com20020-isa.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arcnet/com20020-pci.c b/trunk/drivers/net/arcnet/com20020-pci.c index 2c712af6c265..b68e1eb405ff 100644 --- a/trunk/drivers/net/arcnet/com20020-pci.c +++ b/trunk/drivers/net/arcnet/com20020-pci.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arcnet/com20020.c b/trunk/drivers/net/arcnet/com20020.c index c9e459400ff9..0a74f21409c5 100644 --- a/trunk/drivers/net/arcnet/com20020.c +++ b/trunk/drivers/net/arcnet/com20020.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arcnet/com90io.c b/trunk/drivers/net/arcnet/com90io.c index 4cb401813b7e..28dea518d554 100644 --- a/trunk/drivers/net/arcnet/com90io.c +++ b/trunk/drivers/net/arcnet/com90io.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arcnet/com90xx.c b/trunk/drivers/net/arcnet/com90xx.c index f3b46f71e293..112e230cb13d 100644 --- a/trunk/drivers/net/arcnet/com90xx.c +++ b/trunk/drivers/net/arcnet/com90xx.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/arcnet/rfc1051.c b/trunk/drivers/net/arcnet/rfc1051.c index f81db4070a57..06f8fa2f8f2f 100644 --- a/trunk/drivers/net/arcnet/rfc1051.c +++ b/trunk/drivers/net/arcnet/rfc1051.c @@ -24,7 +24,6 @@ * ********************** */ #include -#include #include #include #include diff --git a/trunk/drivers/net/arcnet/rfc1201.c b/trunk/drivers/net/arcnet/rfc1201.c index b71431aae084..745530651c45 100644 --- a/trunk/drivers/net/arcnet/rfc1201.c +++ b/trunk/drivers/net/arcnet/rfc1201.c @@ -23,7 +23,6 @@ * * ********************** */ -#include #include #include #include diff --git a/trunk/drivers/net/ariadne.c b/trunk/drivers/net/ariadne.c index fa1a2354f5f9..08d8be47dae0 100644 --- a/trunk/drivers/net/ariadne.c +++ b/trunk/drivers/net/ariadne.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arm/at91_ether.c b/trunk/drivers/net/arm/at91_ether.c index aed5b5479b50..8b23d5a175bf 100644 --- a/trunk/drivers/net/arm/at91_ether.c +++ b/trunk/drivers/net/arm/at91_ether.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/arm/ep93xx_eth.c b/trunk/drivers/net/arm/ep93xx_eth.c index 6995169d285a..bf72d57a0afd 100644 --- a/trunk/drivers/net/arm/ep93xx_eth.c +++ b/trunk/drivers/net/arm/ep93xx_eth.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/arm/etherh.c b/trunk/drivers/net/arm/etherh.c index 4af235d41fda..f52f668c49bf 100644 --- a/trunk/drivers/net/arm/etherh.c +++ b/trunk/drivers/net/arm/etherh.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/arm/ixp4xx_eth.c b/trunk/drivers/net/arm/ixp4xx_eth.c index 6be8b098b8b4..6e2ae1d06df1 100644 --- a/trunk/drivers/net/arm/ixp4xx_eth.c +++ b/trunk/drivers/net/arm/ixp4xx_eth.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/arm/ks8695net.c b/trunk/drivers/net/arm/ks8695net.c index 84f8a8f73802..e7810b74f396 100644 --- a/trunk/drivers/net/arm/ks8695net.c +++ b/trunk/drivers/net/arm/ks8695net.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/arm/w90p910_ether.c b/trunk/drivers/net/arm/w90p910_ether.c index f7c9ca1dfb17..febd813c916d 100644 --- a/trunk/drivers/net/arm/w90p910_ether.c +++ b/trunk/drivers/net/arm/w90p910_ether.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DRV_MODULE_NAME "w90p910-emc" #define DRV_MODULE_VERSION "0.1" diff --git a/trunk/drivers/net/at1700.c b/trunk/drivers/net/at1700.c index 10a20fb9ae65..309843ab8869 100644 --- a/trunk/drivers/net/at1700.c +++ b/trunk/drivers/net/at1700.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/atarilance.c b/trunk/drivers/net/atarilance.c index a8686bfec7a1..280cfff48b49 100644 --- a/trunk/drivers/net/atarilance.c +++ b/trunk/drivers/net/atarilance.c @@ -53,6 +53,7 @@ static char version[] = "atarilance.c: v1.3 04/04/96 " #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/atl1c/atl1c_ethtool.c b/trunk/drivers/net/atl1c/atl1c_ethtool.c index 32339243d61f..61a0f2ff11e9 100644 --- a/trunk/drivers/net/atl1c/atl1c_ethtool.c +++ b/trunk/drivers/net/atl1c/atl1c_ethtool.c @@ -22,7 +22,6 @@ #include #include -#include #include "atl1c.h" diff --git a/trunk/drivers/net/atl1e/atl1e_ethtool.c b/trunk/drivers/net/atl1e/atl1e_ethtool.c index ffd696ee7c8e..a76006c1bc6b 100644 --- a/trunk/drivers/net/atl1e/atl1e_ethtool.c +++ b/trunk/drivers/net/atl1e/atl1e_ethtool.c @@ -22,7 +22,6 @@ #include #include -#include #include "atl1e.h" diff --git a/trunk/drivers/net/atlx/atl2.c b/trunk/drivers/net/atlx/atl2.c index 54662f24f9bb..7061d7108f08 100644 --- a/trunk/drivers/net/atlx/atl2.c +++ b/trunk/drivers/net/atlx/atl2.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/atp.c b/trunk/drivers/net/atp.c index 55039d44dc47..6ad16205dc17 100644 --- a/trunk/drivers/net/atp.c +++ b/trunk/drivers/net/atp.c @@ -129,6 +129,7 @@ static int xcvr[NUM_UNITS]; /* The data transfer mode. */ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ax88796.c b/trunk/drivers/net/ax88796.c index b718dc60afc4..1dd4403247ca 100644 --- a/trunk/drivers/net/ax88796.c +++ b/trunk/drivers/net/ax88796.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/b44.c b/trunk/drivers/net/b44.c index 69d9f3d368ae..332c60356285 100644 --- a/trunk/drivers/net/b44.c +++ b/trunk/drivers/net/b44.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/bcm63xx_enet.c b/trunk/drivers/net/bcm63xx_enet.c index 17460aba3bae..8cdcab7655c0 100644 --- a/trunk/drivers/net/bcm63xx_enet.c +++ b/trunk/drivers/net/bcm63xx_enet.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/benet/be.h b/trunk/drivers/net/benet/be.h index 56387b191c96..8f0752553681 100644 --- a/trunk/drivers/net/benet/be.h +++ b/trunk/drivers/net/benet/be.h @@ -29,7 +29,6 @@ #include #include #include -#include #include "be_hw.h" diff --git a/trunk/drivers/net/benet/be_cmds.c b/trunk/drivers/net/benet/be_cmds.c index d0ef4ac987cd..50e6259b50e4 100644 --- a/trunk/drivers/net/benet/be_cmds.c +++ b/trunk/drivers/net/benet/be_cmds.c @@ -1464,8 +1464,8 @@ int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc, req->params.op_type = cpu_to_le32(IMG_TYPE_REDBOOT); req->params.op_code = cpu_to_le32(FLASHROM_OPER_REPORT); - req->params.offset = cpu_to_le32(offset); - req->params.data_buf_size = cpu_to_le32(0x4); + req->params.offset = offset; + req->params.data_buf_size = 0x4; status = be_mcc_notify_wait(adapter); if (!status) diff --git a/trunk/drivers/net/benet/be_main.c b/trunk/drivers/net/benet/be_main.c index ec6ace802256..43e8032f9236 100644 --- a/trunk/drivers/net/benet/be_main.c +++ b/trunk/drivers/net/benet/be_main.c @@ -807,7 +807,7 @@ static void be_rx_compl_process(struct be_adapter *adapter, return; } vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); - vid = swab16(vid); + vid = be16_to_cpu(vid); vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); } else { netif_receive_skb(skb); @@ -884,7 +884,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, napi_gro_frags(&eq_obj->napi); } else { vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); - vid = swab16(vid); + vid = be16_to_cpu(vid); if (!adapter->vlan_grp || adapter->vlans_added == 0) return; @@ -1855,7 +1855,7 @@ static bool be_flash_redboot(struct be_adapter *adapter, p += crc_offset; status = be_cmd_get_flash_crc(adapter, flashed_crc, - (image_size - 4)); + (img_start + image_size - 4)); if (status) { dev_err(&adapter->pdev->dev, "could not get crc from flash, not flashing redboot\n"); @@ -1991,7 +1991,7 @@ int be_load_fw(struct be_adapter *adapter, u8 *func) struct flash_file_hdr_g3 *fhdr3; struct image_hdr *img_hdr_ptr = NULL; struct be_dma_mem flash_cmd; - int status, i = 0, num_imgs = 0; + int status, i = 0; const u8 *p; strcpy(fw_file, func); @@ -2017,14 +2017,15 @@ int be_load_fw(struct be_adapter *adapter, u8 *func) if ((adapter->generation == BE_GEN3) && (get_ufigen_type(fhdr) == BE_GEN3)) { fhdr3 = (struct flash_file_hdr_g3 *) fw->data; - num_imgs = le32_to_cpu(fhdr3->num_imgs); - for (i = 0; i < num_imgs; i++) { + for (i = 0; i < fhdr3->num_imgs; i++) { img_hdr_ptr = (struct image_hdr *) (fw->data + (sizeof(struct flash_file_hdr_g3) + - i * sizeof(struct image_hdr))); - if (le32_to_cpu(img_hdr_ptr->imageid) == 1) - status = be_flash_data(adapter, fw, &flash_cmd, - num_imgs); + i * sizeof(struct image_hdr))); + if (img_hdr_ptr->imageid == 1) { + status = be_flash_data(adapter, fw, + &flash_cmd, fhdr3->num_imgs); + } + } } else if ((adapter->generation == BE_GEN2) && (get_ufigen_type(fhdr) == BE_GEN2)) { diff --git a/trunk/drivers/net/bmac.c b/trunk/drivers/net/bmac.c index 598b007f1991..119468e76323 100644 --- a/trunk/drivers/net/bmac.c +++ b/trunk/drivers/net/bmac.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/bonding/bond_main.c b/trunk/drivers/net/bonding/bond_main.c index 0075514bf32f..5b92fbff431d 100644 --- a/trunk/drivers/net/bonding/bond_main.c +++ b/trunk/drivers/net/bonding/bond_main.c @@ -4156,7 +4156,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev * send the join/membership reports. The curr_active_slave found * will send all of this type of traffic. */ - if ((iph->protocol == IPPROTO_IGMP) && + if ((iph->protocol == htons(IPPROTO_IGMP)) && (skb->protocol == htons(ETH_P_IP))) { read_lock(&bond->curr_slave_lock); @@ -4450,14 +4450,6 @@ static const struct net_device_ops bond_netdev_ops = { .ndo_vlan_rx_kill_vid = bond_vlan_rx_kill_vid, }; -static void bond_destructor(struct net_device *bond_dev) -{ - struct bonding *bond = netdev_priv(bond_dev); - if (bond->wq) - destroy_workqueue(bond->wq); - free_netdev(bond_dev); -} - static void bond_setup(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); @@ -4478,7 +4470,7 @@ static void bond_setup(struct net_device *bond_dev) bond_dev->ethtool_ops = &bond_ethtool_ops; bond_set_mode_ops(bond, bond->params.mode); - bond_dev->destructor = bond_destructor; + bond_dev->destructor = free_netdev; /* Initialize the device options */ bond_dev->tx_queue_len = 0; @@ -4550,6 +4542,9 @@ static void bond_uninit(struct net_device *bond_dev) bond_remove_proc_entry(bond); + if (bond->wq) + destroy_workqueue(bond->wq); + netif_addr_lock_bh(bond_dev); bond_mc_list_destroy(bond); netif_addr_unlock_bh(bond_dev); @@ -4961,8 +4956,8 @@ int bond_create(struct net *net, const char *name) bond_setup); if (!bond_dev) { pr_err("%s: eek! can't alloc netdev!\n", name); - rtnl_unlock(); - return -ENOMEM; + res = -ENOMEM; + goto out; } dev_net_set(bond_dev, net); @@ -4971,16 +4966,19 @@ int bond_create(struct net *net, const char *name) if (!name) { res = dev_alloc_name(bond_dev, "bond%d"); if (res < 0) - goto out; + goto out_netdev; } res = register_netdevice(bond_dev); + if (res < 0) + goto out_netdev; out: rtnl_unlock(); - if (res < 0) - bond_destructor(bond_dev); return res; +out_netdev: + free_netdev(bond_dev); + goto out; } static int __net_init bond_net_init(struct net *net) diff --git a/trunk/drivers/net/can/dev.c b/trunk/drivers/net/can/dev.c index d0f8c7e67e7d..904aa369f80e 100644 --- a/trunk/drivers/net/can/dev.c +++ b/trunk/drivers/net/can/dev.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/can/mcp251x.c b/trunk/drivers/net/can/mcp251x.c index b39b108318b4..f8cc168ec76c 100644 --- a/trunk/drivers/net/can/mcp251x.c +++ b/trunk/drivers/net/can/mcp251x.c @@ -73,7 +73,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/can/sja1000/ems_pci.c b/trunk/drivers/net/can/sja1000/ems_pci.c index 5f53da0bc40c..87300606abb9 100644 --- a/trunk/drivers/net/can/sja1000/ems_pci.c +++ b/trunk/drivers/net/can/sja1000/ems_pci.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/can/sja1000/plx_pci.c b/trunk/drivers/net/can/sja1000/plx_pci.c index 4aff4070db96..6b46a6395f80 100644 --- a/trunk/drivers/net/can/sja1000/plx_pci.c +++ b/trunk/drivers/net/can/sja1000/plx_pci.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/can/vcan.c b/trunk/drivers/net/can/vcan.c index a30b8f480f61..d124d837ae58 100644 --- a/trunk/drivers/net/can/vcan.c +++ b/trunk/drivers/net/can/vcan.c @@ -48,7 +48,6 @@ #include #include #include -#include #include static __initdata const char banner[] = diff --git a/trunk/drivers/net/chelsio/common.h b/trunk/drivers/net/chelsio/common.h index 036b2dfb1d40..2d11afe45310 100644 --- a/trunk/drivers/net/chelsio/common.h +++ b/trunk/drivers/net/chelsio/common.h @@ -51,7 +51,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/chelsio/pm3393.c b/trunk/drivers/net/chelsio/pm3393.c index 9e631b9d3948..a6eb30a6e2b9 100644 --- a/trunk/drivers/net/chelsio/pm3393.c +++ b/trunk/drivers/net/chelsio/pm3393.c @@ -44,7 +44,6 @@ #include "suni1x10gexp_regs.h" #include -#include #define OFFSET(REG_ADDR) ((REG_ADDR) << 2) diff --git a/trunk/drivers/net/chelsio/sge.c b/trunk/drivers/net/chelsio/sge.c index df3a1410696e..55d99ca82f8a 100644 --- a/trunk/drivers/net/chelsio/sge.c +++ b/trunk/drivers/net/chelsio/sge.c @@ -53,7 +53,6 @@ #include #include #include -#include #include "cpl5_cmd.h" #include "sge.h" diff --git a/trunk/drivers/net/cris/eth_v10.c b/trunk/drivers/net/cris/eth_v10.c index 61a33914e96f..dd24aadb778c 100644 --- a/trunk/drivers/net/cris/eth_v10.c +++ b/trunk/drivers/net/cris/eth_v10.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/cs89x0.c b/trunk/drivers/net/cs89x0.c index 4c38491b8efb..b0208e474f7e 100644 --- a/trunk/drivers/net/cs89x0.c +++ b/trunk/drivers/net/cs89x0.c @@ -138,12 +138,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/cxgb3/cxgb3_main.c b/trunk/drivers/net/cxgb3/cxgb3_main.c index aced6c5e635c..9e3e8750b46a 100644 --- a/trunk/drivers/net/cxgb3/cxgb3_main.c +++ b/trunk/drivers/net/cxgb3/cxgb3_main.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include "common.h" diff --git a/trunk/drivers/net/cxgb3/cxgb3_offload.c b/trunk/drivers/net/cxgb3/cxgb3_offload.c index c6485b39eb0e..9498361119d6 100644 --- a/trunk/drivers/net/cxgb3/cxgb3_offload.c +++ b/trunk/drivers/net/cxgb3/cxgb3_offload.c @@ -31,7 +31,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/cxgb3/l2t.c b/trunk/drivers/net/cxgb3/l2t.c index 2f3ee721c3e1..ff1611f90e7a 100644 --- a/trunk/drivers/net/cxgb3/l2t.c +++ b/trunk/drivers/net/cxgb3/l2t.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include "common.h" #include "t3cdev.h" diff --git a/trunk/drivers/net/cxgb3/sge.c b/trunk/drivers/net/cxgb3/sge.c index 07d7e7fab3f5..67e61b2a8c42 100644 --- a/trunk/drivers/net/cxgb3/sge.c +++ b/trunk/drivers/net/cxgb3/sge.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "common.h" #include "regs.h" diff --git a/trunk/drivers/net/cxgb4/Makefile b/trunk/drivers/net/cxgb4/Makefile deleted file mode 100644 index 498667487f52..000000000000 --- a/trunk/drivers/net/cxgb4/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Chelsio T4 driver -# - -obj-$(CONFIG_CHELSIO_T4) += cxgb4.o - -cxgb4-objs := cxgb4_main.o l2t.o t4_hw.o sge.o diff --git a/trunk/drivers/net/cxgb4/cxgb4.h b/trunk/drivers/net/cxgb4/cxgb4.h deleted file mode 100644 index 3d8ff4889b56..000000000000 --- a/trunk/drivers/net/cxgb4/cxgb4.h +++ /dev/null @@ -1,741 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __CXGB4_H__ -#define __CXGB4_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cxgb4_uld.h" -#include "t4_hw.h" - -#define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 1 -#define FW_VERSION_MICRO 0 - -enum { - MAX_NPORTS = 4, /* max # of ports */ - SERNUM_LEN = 16, /* Serial # length */ - EC_LEN = 16, /* E/C length */ - ID_LEN = 16, /* ID length */ -}; - -enum { - MEM_EDC0, - MEM_EDC1, - MEM_MC -}; - -enum dev_master { - MASTER_CANT, - MASTER_MAY, - MASTER_MUST -}; - -enum dev_state { - DEV_STATE_UNINIT, - DEV_STATE_INIT, - DEV_STATE_ERR -}; - -enum { - PAUSE_RX = 1 << 0, - PAUSE_TX = 1 << 1, - PAUSE_AUTONEG = 1 << 2 -}; - -struct port_stats { - u64 tx_octets; /* total # of octets in good frames */ - u64 tx_frames; /* all good frames */ - u64 tx_bcast_frames; /* all broadcast frames */ - u64 tx_mcast_frames; /* all multicast frames */ - u64 tx_ucast_frames; /* all unicast frames */ - u64 tx_error_frames; /* all error frames */ - - u64 tx_frames_64; /* # of Tx frames in a particular range */ - u64 tx_frames_65_127; - u64 tx_frames_128_255; - u64 tx_frames_256_511; - u64 tx_frames_512_1023; - u64 tx_frames_1024_1518; - u64 tx_frames_1519_max; - - u64 tx_drop; /* # of dropped Tx frames */ - u64 tx_pause; /* # of transmitted pause frames */ - u64 tx_ppp0; /* # of transmitted PPP prio 0 frames */ - u64 tx_ppp1; /* # of transmitted PPP prio 1 frames */ - u64 tx_ppp2; /* # of transmitted PPP prio 2 frames */ - u64 tx_ppp3; /* # of transmitted PPP prio 3 frames */ - u64 tx_ppp4; /* # of transmitted PPP prio 4 frames */ - u64 tx_ppp5; /* # of transmitted PPP prio 5 frames */ - u64 tx_ppp6; /* # of transmitted PPP prio 6 frames */ - u64 tx_ppp7; /* # of transmitted PPP prio 7 frames */ - - u64 rx_octets; /* total # of octets in good frames */ - u64 rx_frames; /* all good frames */ - u64 rx_bcast_frames; /* all broadcast frames */ - u64 rx_mcast_frames; /* all multicast frames */ - u64 rx_ucast_frames; /* all unicast frames */ - u64 rx_too_long; /* # of frames exceeding MTU */ - u64 rx_jabber; /* # of jabber frames */ - u64 rx_fcs_err; /* # of received frames with bad FCS */ - u64 rx_len_err; /* # of received frames with length error */ - u64 rx_symbol_err; /* symbol errors */ - u64 rx_runt; /* # of short frames */ - - u64 rx_frames_64; /* # of Rx frames in a particular range */ - u64 rx_frames_65_127; - u64 rx_frames_128_255; - u64 rx_frames_256_511; - u64 rx_frames_512_1023; - u64 rx_frames_1024_1518; - u64 rx_frames_1519_max; - - u64 rx_pause; /* # of received pause frames */ - u64 rx_ppp0; /* # of received PPP prio 0 frames */ - u64 rx_ppp1; /* # of received PPP prio 1 frames */ - u64 rx_ppp2; /* # of received PPP prio 2 frames */ - u64 rx_ppp3; /* # of received PPP prio 3 frames */ - u64 rx_ppp4; /* # of received PPP prio 4 frames */ - u64 rx_ppp5; /* # of received PPP prio 5 frames */ - u64 rx_ppp6; /* # of received PPP prio 6 frames */ - u64 rx_ppp7; /* # of received PPP prio 7 frames */ - - u64 rx_ovflow0; /* drops due to buffer-group 0 overflows */ - u64 rx_ovflow1; /* drops due to buffer-group 1 overflows */ - u64 rx_ovflow2; /* drops due to buffer-group 2 overflows */ - u64 rx_ovflow3; /* drops due to buffer-group 3 overflows */ - u64 rx_trunc0; /* buffer-group 0 truncated packets */ - u64 rx_trunc1; /* buffer-group 1 truncated packets */ - u64 rx_trunc2; /* buffer-group 2 truncated packets */ - u64 rx_trunc3; /* buffer-group 3 truncated packets */ -}; - -struct lb_port_stats { - u64 octets; - u64 frames; - u64 bcast_frames; - u64 mcast_frames; - u64 ucast_frames; - u64 error_frames; - - u64 frames_64; - u64 frames_65_127; - u64 frames_128_255; - u64 frames_256_511; - u64 frames_512_1023; - u64 frames_1024_1518; - u64 frames_1519_max; - - u64 drop; - - u64 ovflow0; - u64 ovflow1; - u64 ovflow2; - u64 ovflow3; - u64 trunc0; - u64 trunc1; - u64 trunc2; - u64 trunc3; -}; - -struct tp_tcp_stats { - u32 tcpOutRsts; - u64 tcpInSegs; - u64 tcpOutSegs; - u64 tcpRetransSegs; -}; - -struct tp_err_stats { - u32 macInErrs[4]; - u32 hdrInErrs[4]; - u32 tcpInErrs[4]; - u32 tnlCongDrops[4]; - u32 ofldChanDrops[4]; - u32 tnlTxDrops[4]; - u32 ofldVlanDrops[4]; - u32 tcp6InErrs[4]; - u32 ofldNoNeigh; - u32 ofldCongDefer; -}; - -struct tp_params { - unsigned int ntxchan; /* # of Tx channels */ - unsigned int tre; /* log2 of core clocks per TP tick */ -}; - -struct vpd_params { - unsigned int cclk; - u8 ec[EC_LEN + 1]; - u8 sn[SERNUM_LEN + 1]; - u8 id[ID_LEN + 1]; -}; - -struct pci_params { - unsigned char speed; - unsigned char width; -}; - -struct adapter_params { - struct tp_params tp; - struct vpd_params vpd; - struct pci_params pci; - - unsigned int fw_vers; - unsigned int tp_vers; - u8 api_vers[7]; - - unsigned short mtus[NMTUS]; - unsigned short a_wnd[NCCTRL_WIN]; - unsigned short b_wnd[NCCTRL_WIN]; - - unsigned char nports; /* # of ethernet ports */ - unsigned char portvec; - unsigned char rev; /* chip revision */ - unsigned char offload; - - unsigned int ofldq_wr_cred; -}; - -struct trace_params { - u32 data[TRACE_LEN / 4]; - u32 mask[TRACE_LEN / 4]; - unsigned short snap_len; - unsigned short min_len; - unsigned char skip_ofst; - unsigned char skip_len; - unsigned char invert; - unsigned char port; -}; - -struct link_config { - unsigned short supported; /* link capabilities */ - unsigned short advertising; /* advertised capabilities */ - unsigned short requested_speed; /* speed user has requested */ - unsigned short speed; /* actual link speed */ - unsigned char requested_fc; /* flow control user has requested */ - unsigned char fc; /* actual link flow control */ - unsigned char autoneg; /* autonegotiating? */ - unsigned char link_ok; /* link up? */ -}; - -#define FW_LEN16(fw_struct) FW_CMD_LEN16(sizeof(fw_struct) / 16) - -enum { - MAX_ETH_QSETS = 32, /* # of Ethernet Tx/Rx queue sets */ - MAX_OFLD_QSETS = 16, /* # of offload Tx/Rx queue sets */ - MAX_CTRL_QUEUES = NCHAN, /* # of control Tx queues */ - MAX_RDMA_QUEUES = NCHAN, /* # of streaming RDMA Rx queues */ -}; - -enum { - MAX_EGRQ = 128, /* max # of egress queues, including FLs */ - MAX_INGQ = 64 /* max # of interrupt-capable ingress queues */ -}; - -struct adapter; -struct vlan_group; -struct sge_rspq; - -struct port_info { - struct adapter *adapter; - struct vlan_group *vlan_grp; - u16 viid; - s16 xact_addr_filt; /* index of exact MAC address filter */ - u16 rss_size; /* size of VI's RSS table slice */ - s8 mdio_addr; - u8 port_type; - u8 mod_type; - u8 port_id; - u8 tx_chan; - u8 lport; /* associated offload logical port */ - u8 rx_offload; /* CSO, etc */ - u8 nqsets; /* # of qsets */ - u8 first_qset; /* index of first qset */ - struct link_config link_cfg; -}; - -/* port_info.rx_offload flags */ -enum { - RX_CSO = 1 << 0, -}; - -struct dentry; -struct work_struct; - -enum { /* adapter flags */ - FULL_INIT_DONE = (1 << 0), - USING_MSI = (1 << 1), - USING_MSIX = (1 << 2), - QUEUES_BOUND = (1 << 3), - FW_OK = (1 << 4), -}; - -struct rx_sw_desc; - -struct sge_fl { /* SGE free-buffer queue state */ - unsigned int avail; /* # of available Rx buffers */ - unsigned int pend_cred; /* new buffers since last FL DB ring */ - unsigned int cidx; /* consumer index */ - unsigned int pidx; /* producer index */ - unsigned long alloc_failed; /* # of times buffer allocation failed */ - unsigned long large_alloc_failed; - unsigned long starving; - /* RO fields */ - unsigned int cntxt_id; /* SGE context id for the free list */ - unsigned int size; /* capacity of free list */ - struct rx_sw_desc *sdesc; /* address of SW Rx descriptor ring */ - __be64 *desc; /* address of HW Rx descriptor ring */ - dma_addr_t addr; /* bus address of HW ring start */ -}; - -/* A packet gather list */ -struct pkt_gl { - skb_frag_t frags[MAX_SKB_FRAGS]; - void *va; /* virtual address of first byte */ - unsigned int nfrags; /* # of fragments */ - unsigned int tot_len; /* total length of fragments */ -}; - -typedef int (*rspq_handler_t)(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *gl); - -struct sge_rspq { /* state for an SGE response queue */ - struct napi_struct napi; - const __be64 *cur_desc; /* current descriptor in queue */ - unsigned int cidx; /* consumer index */ - u8 gen; /* current generation bit */ - u8 intr_params; /* interrupt holdoff parameters */ - u8 next_intr_params; /* holdoff params for next interrupt */ - u8 pktcnt_idx; /* interrupt packet threshold */ - u8 uld; /* ULD handling this queue */ - u8 idx; /* queue index within its group */ - int offset; /* offset into current Rx buffer */ - u16 cntxt_id; /* SGE context id for the response q */ - u16 abs_id; /* absolute SGE id for the response q */ - __be64 *desc; /* address of HW response ring */ - dma_addr_t phys_addr; /* physical address of the ring */ - unsigned int iqe_len; /* entry size */ - unsigned int size; /* capacity of response queue */ - struct adapter *adap; - struct net_device *netdev; /* associated net device */ - rspq_handler_t handler; -}; - -struct sge_eth_stats { /* Ethernet queue statistics */ - unsigned long pkts; /* # of ethernet packets */ - unsigned long lro_pkts; /* # of LRO super packets */ - unsigned long lro_merged; /* # of wire packets merged by LRO */ - unsigned long rx_cso; /* # of Rx checksum offloads */ - unsigned long vlan_ex; /* # of Rx VLAN extractions */ - unsigned long rx_drops; /* # of packets dropped due to no mem */ -}; - -struct sge_eth_rxq { /* SW Ethernet Rx queue */ - struct sge_rspq rspq; - struct sge_fl fl; - struct sge_eth_stats stats; -} ____cacheline_aligned_in_smp; - -struct sge_ofld_stats { /* offload queue statistics */ - unsigned long pkts; /* # of packets */ - unsigned long imm; /* # of immediate-data packets */ - unsigned long an; /* # of asynchronous notifications */ - unsigned long nomem; /* # of responses deferred due to no mem */ -}; - -struct sge_ofld_rxq { /* SW offload Rx queue */ - struct sge_rspq rspq; - struct sge_fl fl; - struct sge_ofld_stats stats; -} ____cacheline_aligned_in_smp; - -struct tx_desc { - __be64 flit[8]; -}; - -struct tx_sw_desc; - -struct sge_txq { - unsigned int in_use; /* # of in-use Tx descriptors */ - unsigned int size; /* # of descriptors */ - unsigned int cidx; /* SW consumer index */ - unsigned int pidx; /* producer index */ - unsigned long stops; /* # of times q has been stopped */ - unsigned long restarts; /* # of queue restarts */ - unsigned int cntxt_id; /* SGE context id for the Tx q */ - struct tx_desc *desc; /* address of HW Tx descriptor ring */ - struct tx_sw_desc *sdesc; /* address of SW Tx descriptor ring */ - struct sge_qstat *stat; /* queue status entry */ - dma_addr_t phys_addr; /* physical address of the ring */ -}; - -struct sge_eth_txq { /* state for an SGE Ethernet Tx queue */ - struct sge_txq q; - struct netdev_queue *txq; /* associated netdev TX queue */ - unsigned long tso; /* # of TSO requests */ - unsigned long tx_cso; /* # of Tx checksum offloads */ - unsigned long vlan_ins; /* # of Tx VLAN insertions */ - unsigned long mapping_err; /* # of I/O MMU packet mapping errors */ -} ____cacheline_aligned_in_smp; - -struct sge_ofld_txq { /* state for an SGE offload Tx queue */ - struct sge_txq q; - struct adapter *adap; - struct sk_buff_head sendq; /* list of backpressured packets */ - struct tasklet_struct qresume_tsk; /* restarts the queue */ - u8 full; /* the Tx ring is full */ - unsigned long mapping_err; /* # of I/O MMU packet mapping errors */ -} ____cacheline_aligned_in_smp; - -struct sge_ctrl_txq { /* state for an SGE control Tx queue */ - struct sge_txq q; - struct adapter *adap; - struct sk_buff_head sendq; /* list of backpressured packets */ - struct tasklet_struct qresume_tsk; /* restarts the queue */ - u8 full; /* the Tx ring is full */ -} ____cacheline_aligned_in_smp; - -struct sge { - struct sge_eth_txq ethtxq[MAX_ETH_QSETS]; - struct sge_ofld_txq ofldtxq[MAX_OFLD_QSETS]; - struct sge_ctrl_txq ctrlq[MAX_CTRL_QUEUES]; - - struct sge_eth_rxq ethrxq[MAX_ETH_QSETS]; - struct sge_ofld_rxq ofldrxq[MAX_OFLD_QSETS]; - struct sge_ofld_rxq rdmarxq[MAX_RDMA_QUEUES]; - struct sge_rspq fw_evtq ____cacheline_aligned_in_smp; - - struct sge_rspq intrq ____cacheline_aligned_in_smp; - spinlock_t intrq_lock; - - u16 max_ethqsets; /* # of available Ethernet queue sets */ - u16 ethqsets; /* # of active Ethernet queue sets */ - u16 ethtxq_rover; /* Tx queue to clean up next */ - u16 ofldqsets; /* # of active offload queue sets */ - u16 rdmaqs; /* # of available RDMA Rx queues */ - u16 ofld_rxq[MAX_OFLD_QSETS]; - u16 rdma_rxq[NCHAN]; - u16 timer_val[SGE_NTIMERS]; - u8 counter_val[SGE_NCOUNTERS]; - unsigned int starve_thres; - u8 idma_state[2]; - void *egr_map[MAX_EGRQ]; /* qid->queue egress queue map */ - struct sge_rspq *ingr_map[MAX_INGQ]; /* qid->queue ingress queue map */ - DECLARE_BITMAP(starving_fl, MAX_EGRQ); - DECLARE_BITMAP(txq_maperr, MAX_EGRQ); - struct timer_list rx_timer; /* refills starving FLs */ - struct timer_list tx_timer; /* checks Tx queues */ -}; - -#define for_each_ethrxq(sge, i) for (i = 0; i < (sge)->ethqsets; i++) -#define for_each_ofldrxq(sge, i) for (i = 0; i < (sge)->ofldqsets; i++) -#define for_each_rdmarxq(sge, i) for (i = 0; i < (sge)->rdmaqs; i++) - -struct l2t_data; - -struct adapter { - void __iomem *regs; - struct pci_dev *pdev; - struct device *pdev_dev; - unsigned long registered_device_map; - unsigned long open_device_map; - unsigned long flags; - - const char *name; - int msg_enable; - - struct adapter_params params; - struct cxgb4_virt_res vres; - unsigned int swintr; - - unsigned int wol; - - struct { - unsigned short vec; - char desc[14]; - } msix_info[MAX_INGQ + 1]; - - struct sge sge; - - struct net_device *port[MAX_NPORTS]; - u8 chan_map[NCHAN]; /* channel -> port map */ - - struct l2t_data *l2t; - void *uld_handle[CXGB4_ULD_MAX]; - struct list_head list_node; - - struct tid_info tids; - void **tid_release_head; - spinlock_t tid_release_lock; - struct work_struct tid_release_task; - bool tid_release_task_busy; - - struct dentry *debugfs_root; - - spinlock_t stats_lock; -}; - -static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) -{ - return readl(adap->regs + reg_addr); -} - -static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val) -{ - writel(val, adap->regs + reg_addr); -} - -#ifndef readq -static inline u64 readq(const volatile void __iomem *addr) -{ - return readl(addr) + ((u64)readl(addr + 4) << 32); -} - -static inline void writeq(u64 val, volatile void __iomem *addr) -{ - writel(val, addr); - writel(val >> 32, addr + 4); -} -#endif - -static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) -{ - return readq(adap->regs + reg_addr); -} - -static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val) -{ - writeq(val, adap->regs + reg_addr); -} - -/** - * netdev2pinfo - return the port_info structure associated with a net_device - * @dev: the netdev - * - * Return the struct port_info associated with a net_device - */ -static inline struct port_info *netdev2pinfo(const struct net_device *dev) -{ - return netdev_priv(dev); -} - -/** - * adap2pinfo - return the port_info of a port - * @adap: the adapter - * @idx: the port index - * - * Return the port_info structure for the port of the given index. - */ -static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) -{ - return netdev_priv(adap->port[idx]); -} - -/** - * netdev2adap - return the adapter structure associated with a net_device - * @dev: the netdev - * - * Return the struct adapter associated with a net_device - */ -static inline struct adapter *netdev2adap(const struct net_device *dev) -{ - return netdev2pinfo(dev)->adapter; -} - -void t4_os_portmod_changed(const struct adapter *adap, int port_id); -void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat); - -void *t4_alloc_mem(size_t size); -void t4_free_mem(void *addr); - -void t4_free_sge_resources(struct adapter *adap); -irq_handler_t t4_intr_handler(struct adapter *adap); -netdev_tx_t t4_eth_xmit(struct sk_buff *skb, struct net_device *dev); -int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *gl); -int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb); -int t4_ofld_send(struct adapter *adap, struct sk_buff *skb); -int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, - struct net_device *dev, int intr_idx, - struct sge_fl *fl, rspq_handler_t hnd); -int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq, - struct net_device *dev, struct netdev_queue *netdevq, - unsigned int iqid); -int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq, - struct net_device *dev, unsigned int iqid, - unsigned int cmplqid); -int t4_sge_alloc_ofld_txq(struct adapter *adap, struct sge_ofld_txq *txq, - struct net_device *dev, unsigned int iqid); -irqreturn_t t4_sge_intr_msix(int irq, void *cookie); -void t4_sge_init(struct adapter *adap); -void t4_sge_start(struct adapter *adap); -void t4_sge_stop(struct adapter *adap); - -#define for_each_port(adapter, iter) \ - for (iter = 0; iter < (adapter)->params.nports; ++iter) - -static inline unsigned int core_ticks_per_usec(const struct adapter *adap) -{ - return adap->params.vpd.cclk / 1000; -} - -static inline unsigned int us_to_core_ticks(const struct adapter *adap, - unsigned int us) -{ - return (us * adap->params.vpd.cclk) / 1000; -} - -void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, - u32 val); - -int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, - void *rpl, bool sleep_ok); - -static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, - int size, void *rpl) -{ - return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); -} - -static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, - int size, void *rpl) -{ - return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); -} - -void t4_intr_enable(struct adapter *adapter); -void t4_intr_disable(struct adapter *adapter); -void t4_intr_clear(struct adapter *adapter); -int t4_slow_intr_handler(struct adapter *adapter); - -int t4_link_start(struct adapter *adap, unsigned int mbox, unsigned int port, - struct link_config *lc); -int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port); -int t4_seeprom_wp(struct adapter *adapter, bool enable); -int t4_read_flash(struct adapter *adapter, unsigned int addr, - unsigned int nwords, u32 *data, int byte_oriented); -int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size); -int t4_check_fw_version(struct adapter *adapter); -int t4_prep_adapter(struct adapter *adapter); -int t4_port_init(struct adapter *adap, int mbox, int pf, int vf); -void t4_fatal_err(struct adapter *adapter); -void t4_set_vlan_accel(struct adapter *adapter, unsigned int ports, int on); -int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp, - int filter_index, int enable); -void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp, - int filter_index, int *enabled); -int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid, - int start, int n, const u16 *rspq, unsigned int nrspq); -int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, - unsigned int flags); -int t4_read_rss(struct adapter *adapter, u16 *entries); -int t4_mc_read(struct adapter *adap, u32 addr, __be32 *data, u64 *parity); -int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, - u64 *parity); - -void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p); -void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p); - -void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log); -void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st); -void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, - struct tp_tcp_stats *v6); -void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, - const unsigned short *alpha, const unsigned short *beta); - -void t4_wol_magic_enable(struct adapter *adap, unsigned int port, - const u8 *addr); -int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, - u64 mask0, u64 mask1, unsigned int crc, bool enable); - -int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, - enum dev_master master, enum dev_state *state); -int t4_fw_bye(struct adapter *adap, unsigned int mbox); -int t4_early_init(struct adapter *adap, unsigned int mbox); -int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); -int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int nparams, const u32 *params, - u32 *val); -int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int nparams, const u32 *params, - const u32 *val); -int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int txq, unsigned int txq_eth_ctrl, - unsigned int rxqi, unsigned int rxq, unsigned int tc, - unsigned int vi, unsigned int cmask, unsigned int pmask, - unsigned int nexact, unsigned int rcaps, unsigned int wxcaps); -int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, - unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - unsigned int *rss_size); -int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int viid); -int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid, - int mtu, int promisc, int all_multi, int bcast, bool sleep_ok); -int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, - unsigned int viid, bool free, unsigned int naddr, - const u8 **addr, u16 *idx, u64 *hash, bool sleep_ok); -int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, - int idx, const u8 *addr, bool persist, bool add_smt); -int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, - bool ucast, u64 vec, bool sleep_ok); -int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid, - bool rx_en, bool tx_en); -int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, - unsigned int nblinks); -int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, - unsigned int mmd, unsigned int reg, u16 *valp); -int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, - unsigned int mmd, unsigned int reg, u16 val); -int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start, - unsigned int pf, unsigned int vf, unsigned int iqid, - unsigned int fl0id, unsigned int fl1id); -int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int iqtype, unsigned int iqid, - unsigned int fl0id, unsigned int fl1id); -int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid); -int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid); -int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid); -int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); -#endif /* __CXGB4_H__ */ diff --git a/trunk/drivers/net/cxgb4/cxgb4_main.c b/trunk/drivers/net/cxgb4/cxgb4_main.c deleted file mode 100644 index a7e30a23d322..000000000000 --- a/trunk/drivers/net/cxgb4/cxgb4_main.c +++ /dev/null @@ -1,3388 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "cxgb4.h" -#include "t4_regs.h" -#include "t4_msg.h" -#include "t4fw_api.h" -#include "l2t.h" - -#define DRV_VERSION "1.0.0-ko" -#define DRV_DESC "Chelsio T4 Network Driver" - -/* - * Max interrupt hold-off timer value in us. Queues fall back to this value - * under extreme memory pressure so it's largish to give the system time to - * recover. - */ -#define MAX_SGE_TIMERVAL 200U - -enum { - MEMWIN0_APERTURE = 65536, - MEMWIN0_BASE = 0x30000, - MEMWIN1_APERTURE = 32768, - MEMWIN1_BASE = 0x28000, - MEMWIN2_APERTURE = 2048, - MEMWIN2_BASE = 0x1b800, -}; - -enum { - MAX_TXQ_ENTRIES = 16384, - MAX_CTRL_TXQ_ENTRIES = 1024, - MAX_RSPQ_ENTRIES = 16384, - MAX_RX_BUFFERS = 16384, - MIN_TXQ_ENTRIES = 32, - MIN_CTRL_TXQ_ENTRIES = 32, - MIN_RSPQ_ENTRIES = 128, - MIN_FL_ENTRIES = 16 -}; - -#define DFLT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK | \ - NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP |\ - NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) - -#define CH_DEVICE(devid) { PCI_VDEVICE(CHELSIO, devid), 0 } - -static DEFINE_PCI_DEVICE_TABLE(cxgb4_pci_tbl) = { - CH_DEVICE(0xa000), /* PE10K */ - { 0, } -}; - -#define FW_FNAME "cxgb4/t4fw.bin" - -MODULE_DESCRIPTION(DRV_DESC); -MODULE_AUTHOR("Chelsio Communications"); -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_VERSION(DRV_VERSION); -MODULE_DEVICE_TABLE(pci, cxgb4_pci_tbl); -MODULE_FIRMWARE(FW_FNAME); - -static int dflt_msg_enable = DFLT_MSG_ENABLE; - -module_param(dflt_msg_enable, int, 0644); -MODULE_PARM_DESC(dflt_msg_enable, "Chelsio T4 default message enable bitmap"); - -/* - * The driver uses the best interrupt scheme available on a platform in the - * order MSI-X, MSI, legacy INTx interrupts. This parameter determines which - * of these schemes the driver may consider as follows: - * - * msi = 2: choose from among all three options - * msi = 1: only consider MSI and INTx interrupts - * msi = 0: force INTx interrupts - */ -static int msi = 2; - -module_param(msi, int, 0644); -MODULE_PARM_DESC(msi, "whether to use INTx (0), MSI (1) or MSI-X (2)"); - -/* - * Queue interrupt hold-off timer values. Queues default to the first of these - * upon creation. - */ -static unsigned int intr_holdoff[SGE_NTIMERS - 1] = { 5, 10, 20, 50, 100 }; - -module_param_array(intr_holdoff, uint, NULL, 0644); -MODULE_PARM_DESC(intr_holdoff, "values for queue interrupt hold-off timers " - "0..4 in microseconds"); - -static unsigned int intr_cnt[SGE_NCOUNTERS - 1] = { 4, 8, 16 }; - -module_param_array(intr_cnt, uint, NULL, 0644); -MODULE_PARM_DESC(intr_cnt, - "thresholds 1..3 for queue interrupt packet counters"); - -static int vf_acls; - -#ifdef CONFIG_PCI_IOV -module_param(vf_acls, bool, 0644); -MODULE_PARM_DESC(vf_acls, "if set enable virtualization L2 ACL enforcement"); - -static unsigned int num_vf[4]; - -module_param_array(num_vf, uint, NULL, 0644); -MODULE_PARM_DESC(num_vf, "number of VFs for each of PFs 0-3"); -#endif - -static struct dentry *cxgb4_debugfs_root; - -static LIST_HEAD(adapter_list); -static DEFINE_MUTEX(uld_mutex); -static struct cxgb4_uld_info ulds[CXGB4_ULD_MAX]; -static const char *uld_str[] = { "RDMA", "iSCSI" }; - -static void link_report(struct net_device *dev) -{ - if (!netif_carrier_ok(dev)) - netdev_info(dev, "link down\n"); - else { - static const char *fc[] = { "no", "Rx", "Tx", "Tx/Rx" }; - - const char *s = "10Mbps"; - const struct port_info *p = netdev_priv(dev); - - switch (p->link_cfg.speed) { - case SPEED_10000: - s = "10Gbps"; - break; - case SPEED_1000: - s = "1000Mbps"; - break; - case SPEED_100: - s = "100Mbps"; - break; - } - - netdev_info(dev, "link up, %s, full-duplex, %s PAUSE\n", s, - fc[p->link_cfg.fc]); - } -} - -void t4_os_link_changed(struct adapter *adapter, int port_id, int link_stat) -{ - struct net_device *dev = adapter->port[port_id]; - - /* Skip changes from disabled ports. */ - if (netif_running(dev) && link_stat != netif_carrier_ok(dev)) { - if (link_stat) - netif_carrier_on(dev); - else - netif_carrier_off(dev); - - link_report(dev); - } -} - -void t4_os_portmod_changed(const struct adapter *adap, int port_id) -{ - static const char *mod_str[] = { - NULL, "LR", "SR", "ER", "passive DA", "active DA" - }; - - const struct net_device *dev = adap->port[port_id]; - const struct port_info *pi = netdev_priv(dev); - - if (pi->mod_type == FW_PORT_MOD_TYPE_NONE) - netdev_info(dev, "port module unplugged\n"); - else - netdev_info(dev, "%s module inserted\n", mod_str[pi->mod_type]); -} - -/* - * Configure the exact and hash address filters to handle a port's multicast - * and secondary unicast MAC addresses. - */ -static int set_addr_filters(const struct net_device *dev, bool sleep) -{ - u64 mhash = 0; - u64 uhash = 0; - bool free = true; - u16 filt_idx[7]; - const u8 *addr[7]; - int ret, naddr = 0; - const struct dev_addr_list *d; - const struct netdev_hw_addr *ha; - int uc_cnt = netdev_uc_count(dev); - const struct port_info *pi = netdev_priv(dev); - - /* first do the secondary unicast addresses */ - netdev_for_each_uc_addr(ha, dev) { - addr[naddr++] = ha->addr; - if (--uc_cnt == 0 || naddr >= ARRAY_SIZE(addr)) { - ret = t4_alloc_mac_filt(pi->adapter, 0, pi->viid, free, - naddr, addr, filt_idx, &uhash, sleep); - if (ret < 0) - return ret; - - free = false; - naddr = 0; - } - } - - /* next set up the multicast addresses */ - netdev_for_each_mc_addr(d, dev) { - addr[naddr++] = d->dmi_addr; - if (naddr >= ARRAY_SIZE(addr) || d->next == NULL) { - ret = t4_alloc_mac_filt(pi->adapter, 0, pi->viid, free, - naddr, addr, filt_idx, &mhash, sleep); - if (ret < 0) - return ret; - - free = false; - naddr = 0; - } - } - - return t4_set_addr_hash(pi->adapter, 0, pi->viid, uhash != 0, - uhash | mhash, sleep); -} - -/* - * Set Rx properties of a port, such as promiscruity, address filters, and MTU. - * If @mtu is -1 it is left unchanged. - */ -static int set_rxmode(struct net_device *dev, int mtu, bool sleep_ok) -{ - int ret; - struct port_info *pi = netdev_priv(dev); - - ret = set_addr_filters(dev, sleep_ok); - if (ret == 0) - ret = t4_set_rxmode(pi->adapter, 0, pi->viid, mtu, - (dev->flags & IFF_PROMISC) ? 1 : 0, - (dev->flags & IFF_ALLMULTI) ? 1 : 0, 1, - sleep_ok); - return ret; -} - -/** - * link_start - enable a port - * @dev: the port to enable - * - * Performs the MAC and PHY actions needed to enable a port. - */ -static int link_start(struct net_device *dev) -{ - int ret; - struct port_info *pi = netdev_priv(dev); - - /* - * We do not set address filters and promiscuity here, the stack does - * that step explicitly. - */ - ret = t4_set_rxmode(pi->adapter, 0, pi->viid, dev->mtu, -1, -1, -1, - true); - if (ret == 0) { - ret = t4_change_mac(pi->adapter, 0, pi->viid, - pi->xact_addr_filt, dev->dev_addr, true, - false); - if (ret >= 0) { - pi->xact_addr_filt = ret; - ret = 0; - } - } - if (ret == 0) - ret = t4_link_start(pi->adapter, 0, pi->tx_chan, &pi->link_cfg); - if (ret == 0) - ret = t4_enable_vi(pi->adapter, 0, pi->viid, true, true); - return ret; -} - -/* - * Response queue handler for the FW event queue. - */ -static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *gl) -{ - u8 opcode = ((const struct rss_header *)rsp)->opcode; - - rsp++; /* skip RSS header */ - if (likely(opcode == CPL_SGE_EGR_UPDATE)) { - const struct cpl_sge_egr_update *p = (void *)rsp; - unsigned int qid = EGR_QID(ntohl(p->opcode_qid)); - struct sge_txq *txq = q->adap->sge.egr_map[qid]; - - txq->restarts++; - if ((u8 *)txq < (u8 *)q->adap->sge.ethrxq) { - struct sge_eth_txq *eq; - - eq = container_of(txq, struct sge_eth_txq, q); - netif_tx_wake_queue(eq->txq); - } else { - struct sge_ofld_txq *oq; - - oq = container_of(txq, struct sge_ofld_txq, q); - tasklet_schedule(&oq->qresume_tsk); - } - } else if (opcode == CPL_FW6_MSG || opcode == CPL_FW4_MSG) { - const struct cpl_fw6_msg *p = (void *)rsp; - - if (p->type == 0) - t4_handle_fw_rpl(q->adap, p->data); - } else if (opcode == CPL_L2T_WRITE_RPL) { - const struct cpl_l2t_write_rpl *p = (void *)rsp; - - do_l2t_write_rpl(q->adap, p); - } else - dev_err(q->adap->pdev_dev, - "unexpected CPL %#x on FW event queue\n", opcode); - return 0; -} - -/** - * uldrx_handler - response queue handler for ULD queues - * @q: the response queue that received the packet - * @rsp: the response queue descriptor holding the offload message - * @gl: the gather list of packet fragments - * - * Deliver an ingress offload packet to a ULD. All processing is done by - * the ULD, we just maintain statistics. - */ -static int uldrx_handler(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *gl) -{ - struct sge_ofld_rxq *rxq = container_of(q, struct sge_ofld_rxq, rspq); - - if (ulds[q->uld].rx_handler(q->adap->uld_handle[q->uld], rsp, gl)) { - rxq->stats.nomem++; - return -1; - } - if (gl == NULL) - rxq->stats.imm++; - else if (gl == CXGB4_MSG_AN) - rxq->stats.an++; - else - rxq->stats.pkts++; - return 0; -} - -static void disable_msi(struct adapter *adapter) -{ - if (adapter->flags & USING_MSIX) { - pci_disable_msix(adapter->pdev); - adapter->flags &= ~USING_MSIX; - } else if (adapter->flags & USING_MSI) { - pci_disable_msi(adapter->pdev); - adapter->flags &= ~USING_MSI; - } -} - -/* - * Interrupt handler for non-data events used with MSI-X. - */ -static irqreturn_t t4_nondata_intr(int irq, void *cookie) -{ - struct adapter *adap = cookie; - - u32 v = t4_read_reg(adap, MYPF_REG(PL_PF_INT_CAUSE)); - if (v & PFSW) { - adap->swintr = 1; - t4_write_reg(adap, MYPF_REG(PL_PF_INT_CAUSE), v); - } - t4_slow_intr_handler(adap); - return IRQ_HANDLED; -} - -/* - * Name the MSI-X interrupts. - */ -static void name_msix_vecs(struct adapter *adap) -{ - int i, j, msi_idx = 2, n = sizeof(adap->msix_info[0].desc) - 1; - - /* non-data interrupts */ - snprintf(adap->msix_info[0].desc, n, "%s", adap->name); - adap->msix_info[0].desc[n] = 0; - - /* FW events */ - snprintf(adap->msix_info[1].desc, n, "%s-FWeventq", adap->name); - adap->msix_info[1].desc[n] = 0; - - /* Ethernet queues */ - for_each_port(adap, j) { - struct net_device *d = adap->port[j]; - const struct port_info *pi = netdev_priv(d); - - for (i = 0; i < pi->nqsets; i++, msi_idx++) { - snprintf(adap->msix_info[msi_idx].desc, n, "%s-Rx%d", - d->name, i); - adap->msix_info[msi_idx].desc[n] = 0; - } - } - - /* offload queues */ - for_each_ofldrxq(&adap->sge, i) { - snprintf(adap->msix_info[msi_idx].desc, n, "%s-ofld%d", - adap->name, i); - adap->msix_info[msi_idx++].desc[n] = 0; - } - for_each_rdmarxq(&adap->sge, i) { - snprintf(adap->msix_info[msi_idx].desc, n, "%s-rdma%d", - adap->name, i); - adap->msix_info[msi_idx++].desc[n] = 0; - } -} - -static int request_msix_queue_irqs(struct adapter *adap) -{ - struct sge *s = &adap->sge; - int err, ethqidx, ofldqidx = 0, rdmaqidx = 0, msi = 2; - - err = request_irq(adap->msix_info[1].vec, t4_sge_intr_msix, 0, - adap->msix_info[1].desc, &s->fw_evtq); - if (err) - return err; - - for_each_ethrxq(s, ethqidx) { - err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0, - adap->msix_info[msi].desc, - &s->ethrxq[ethqidx].rspq); - if (err) - goto unwind; - msi++; - } - for_each_ofldrxq(s, ofldqidx) { - err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0, - adap->msix_info[msi].desc, - &s->ofldrxq[ofldqidx].rspq); - if (err) - goto unwind; - msi++; - } - for_each_rdmarxq(s, rdmaqidx) { - err = request_irq(adap->msix_info[msi].vec, t4_sge_intr_msix, 0, - adap->msix_info[msi].desc, - &s->rdmarxq[rdmaqidx].rspq); - if (err) - goto unwind; - msi++; - } - return 0; - -unwind: - while (--rdmaqidx >= 0) - free_irq(adap->msix_info[--msi].vec, - &s->rdmarxq[rdmaqidx].rspq); - while (--ofldqidx >= 0) - free_irq(adap->msix_info[--msi].vec, - &s->ofldrxq[ofldqidx].rspq); - while (--ethqidx >= 0) - free_irq(adap->msix_info[--msi].vec, &s->ethrxq[ethqidx].rspq); - free_irq(adap->msix_info[1].vec, &s->fw_evtq); - return err; -} - -static void free_msix_queue_irqs(struct adapter *adap) -{ - int i, msi = 2; - struct sge *s = &adap->sge; - - free_irq(adap->msix_info[1].vec, &s->fw_evtq); - for_each_ethrxq(s, i) - free_irq(adap->msix_info[msi++].vec, &s->ethrxq[i].rspq); - for_each_ofldrxq(s, i) - free_irq(adap->msix_info[msi++].vec, &s->ofldrxq[i].rspq); - for_each_rdmarxq(s, i) - free_irq(adap->msix_info[msi++].vec, &s->rdmarxq[i].rspq); -} - -/** - * setup_rss - configure RSS - * @adap: the adapter - * - * Sets up RSS to distribute packets to multiple receive queues. We - * configure the RSS CPU lookup table to distribute to the number of HW - * receive queues, and the response queue lookup table to narrow that - * down to the response queues actually configured for each port. - * We always configure the RSS mapping for all ports since the mapping - * table has plenty of entries. - */ -static int setup_rss(struct adapter *adap) -{ - int i, j, err; - u16 rss[MAX_ETH_QSETS]; - - for_each_port(adap, i) { - const struct port_info *pi = adap2pinfo(adap, i); - const struct sge_eth_rxq *q = &adap->sge.ethrxq[pi->first_qset]; - - for (j = 0; j < pi->nqsets; j++) - rss[j] = q[j].rspq.abs_id; - - err = t4_config_rss_range(adap, 0, pi->viid, 0, pi->rss_size, - rss, pi->nqsets); - if (err) - return err; - } - return 0; -} - -/* - * Wait until all NAPI handlers are descheduled. - */ -static void quiesce_rx(struct adapter *adap) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(adap->sge.ingr_map); i++) { - struct sge_rspq *q = adap->sge.ingr_map[i]; - - if (q && q->handler) - napi_disable(&q->napi); - } -} - -/* - * Enable NAPI scheduling and interrupt generation for all Rx queues. - */ -static void enable_rx(struct adapter *adap) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(adap->sge.ingr_map); i++) { - struct sge_rspq *q = adap->sge.ingr_map[i]; - - if (!q) - continue; - if (q->handler) - napi_enable(&q->napi); - /* 0-increment GTS to start the timer and enable interrupts */ - t4_write_reg(adap, MYPF_REG(SGE_PF_GTS), - SEINTARM(q->intr_params) | - INGRESSQID(q->cntxt_id)); - } -} - -/** - * setup_sge_queues - configure SGE Tx/Rx/response queues - * @adap: the adapter - * - * Determines how many sets of SGE queues to use and initializes them. - * We support multiple queue sets per port if we have MSI-X, otherwise - * just one queue set per port. - */ -static int setup_sge_queues(struct adapter *adap) -{ - int err, msi_idx, i, j; - struct sge *s = &adap->sge; - - bitmap_zero(s->starving_fl, MAX_EGRQ); - bitmap_zero(s->txq_maperr, MAX_EGRQ); - - if (adap->flags & USING_MSIX) - msi_idx = 1; /* vector 0 is for non-queue interrupts */ - else { - err = t4_sge_alloc_rxq(adap, &s->intrq, false, adap->port[0], 0, - NULL, NULL); - if (err) - return err; - msi_idx = -((int)s->intrq.abs_id + 1); - } - - err = t4_sge_alloc_rxq(adap, &s->fw_evtq, true, adap->port[0], - msi_idx, NULL, fwevtq_handler); - if (err) { -freeout: t4_free_sge_resources(adap); - return err; - } - - for_each_port(adap, i) { - struct net_device *dev = adap->port[i]; - struct port_info *pi = netdev_priv(dev); - struct sge_eth_rxq *q = &s->ethrxq[pi->first_qset]; - struct sge_eth_txq *t = &s->ethtxq[pi->first_qset]; - - for (j = 0; j < pi->nqsets; j++, q++) { - if (msi_idx > 0) - msi_idx++; - err = t4_sge_alloc_rxq(adap, &q->rspq, false, dev, - msi_idx, &q->fl, - t4_ethrx_handler); - if (err) - goto freeout; - q->rspq.idx = j; - memset(&q->stats, 0, sizeof(q->stats)); - } - for (j = 0; j < pi->nqsets; j++, t++) { - err = t4_sge_alloc_eth_txq(adap, t, dev, - netdev_get_tx_queue(dev, j), - s->fw_evtq.cntxt_id); - if (err) - goto freeout; - } - } - - j = s->ofldqsets / adap->params.nports; /* ofld queues per channel */ - for_each_ofldrxq(s, i) { - struct sge_ofld_rxq *q = &s->ofldrxq[i]; - struct net_device *dev = adap->port[i / j]; - - if (msi_idx > 0) - msi_idx++; - err = t4_sge_alloc_rxq(adap, &q->rspq, false, dev, msi_idx, - &q->fl, uldrx_handler); - if (err) - goto freeout; - memset(&q->stats, 0, sizeof(q->stats)); - s->ofld_rxq[i] = q->rspq.abs_id; - err = t4_sge_alloc_ofld_txq(adap, &s->ofldtxq[i], dev, - s->fw_evtq.cntxt_id); - if (err) - goto freeout; - } - - for_each_rdmarxq(s, i) { - struct sge_ofld_rxq *q = &s->rdmarxq[i]; - - if (msi_idx > 0) - msi_idx++; - err = t4_sge_alloc_rxq(adap, &q->rspq, false, adap->port[i], - msi_idx, &q->fl, uldrx_handler); - if (err) - goto freeout; - memset(&q->stats, 0, sizeof(q->stats)); - s->rdma_rxq[i] = q->rspq.abs_id; - } - - for_each_port(adap, i) { - /* - * Note that ->rdmarxq[i].rspq.cntxt_id below is 0 if we don't - * have RDMA queues, and that's the right value. - */ - err = t4_sge_alloc_ctrl_txq(adap, &s->ctrlq[i], adap->port[i], - s->fw_evtq.cntxt_id, - s->rdmarxq[i].rspq.cntxt_id); - if (err) - goto freeout; - } - - t4_write_reg(adap, MPS_TRC_RSS_CONTROL, - RSSCONTROL(netdev2pinfo(adap->port[0])->tx_chan) | - QUEUENUMBER(s->ethrxq[0].rspq.abs_id)); - return 0; -} - -/* - * Returns 0 if new FW was successfully loaded, a positive errno if a load was - * started but failed, and a negative errno if flash load couldn't start. - */ -static int upgrade_fw(struct adapter *adap) -{ - int ret; - u32 vers; - const struct fw_hdr *hdr; - const struct firmware *fw; - struct device *dev = adap->pdev_dev; - - ret = request_firmware(&fw, FW_FNAME, dev); - if (ret < 0) { - dev_err(dev, "unable to load firmware image " FW_FNAME - ", error %d\n", ret); - return ret; - } - - hdr = (const struct fw_hdr *)fw->data; - vers = ntohl(hdr->fw_ver); - if (FW_HDR_FW_VER_MAJOR_GET(vers) != FW_VERSION_MAJOR) { - ret = -EINVAL; /* wrong major version, won't do */ - goto out; - } - - /* - * If the flash FW is unusable or we found something newer, load it. - */ - if (FW_HDR_FW_VER_MAJOR_GET(adap->params.fw_vers) != FW_VERSION_MAJOR || - vers > adap->params.fw_vers) { - ret = -t4_load_fw(adap, fw->data, fw->size); - if (!ret) - dev_info(dev, "firmware upgraded to version %pI4 from " - FW_FNAME "\n", &hdr->fw_ver); - } -out: release_firmware(fw); - return ret; -} - -/* - * Allocate a chunk of memory using kmalloc or, if that fails, vmalloc. - * The allocated memory is cleared. - */ -void *t4_alloc_mem(size_t size) -{ - void *p = kmalloc(size, GFP_KERNEL); - - if (!p) - p = vmalloc(size); - if (p) - memset(p, 0, size); - return p; -} - -/* - * Free memory allocated through alloc_mem(). - */ -void t4_free_mem(void *addr) -{ - if (is_vmalloc_addr(addr)) - vfree(addr); - else - kfree(addr); -} - -static inline int is_offload(const struct adapter *adap) -{ - return adap->params.offload; -} - -/* - * Implementation of ethtool operations. - */ - -static u32 get_msglevel(struct net_device *dev) -{ - return netdev2adap(dev)->msg_enable; -} - -static void set_msglevel(struct net_device *dev, u32 val) -{ - netdev2adap(dev)->msg_enable = val; -} - -static char stats_strings[][ETH_GSTRING_LEN] = { - "TxOctetsOK ", - "TxFramesOK ", - "TxBroadcastFrames ", - "TxMulticastFrames ", - "TxUnicastFrames ", - "TxErrorFrames ", - - "TxFrames64 ", - "TxFrames65To127 ", - "TxFrames128To255 ", - "TxFrames256To511 ", - "TxFrames512To1023 ", - "TxFrames1024To1518 ", - "TxFrames1519ToMax ", - - "TxFramesDropped ", - "TxPauseFrames ", - "TxPPP0Frames ", - "TxPPP1Frames ", - "TxPPP2Frames ", - "TxPPP3Frames ", - "TxPPP4Frames ", - "TxPPP5Frames ", - "TxPPP6Frames ", - "TxPPP7Frames ", - - "RxOctetsOK ", - "RxFramesOK ", - "RxBroadcastFrames ", - "RxMulticastFrames ", - "RxUnicastFrames ", - - "RxFramesTooLong ", - "RxJabberErrors ", - "RxFCSErrors ", - "RxLengthErrors ", - "RxSymbolErrors ", - "RxRuntFrames ", - - "RxFrames64 ", - "RxFrames65To127 ", - "RxFrames128To255 ", - "RxFrames256To511 ", - "RxFrames512To1023 ", - "RxFrames1024To1518 ", - "RxFrames1519ToMax ", - - "RxPauseFrames ", - "RxPPP0Frames ", - "RxPPP1Frames ", - "RxPPP2Frames ", - "RxPPP3Frames ", - "RxPPP4Frames ", - "RxPPP5Frames ", - "RxPPP6Frames ", - "RxPPP7Frames ", - - "RxBG0FramesDropped ", - "RxBG1FramesDropped ", - "RxBG2FramesDropped ", - "RxBG3FramesDropped ", - "RxBG0FramesTrunc ", - "RxBG1FramesTrunc ", - "RxBG2FramesTrunc ", - "RxBG3FramesTrunc ", - - "TSO ", - "TxCsumOffload ", - "RxCsumGood ", - "VLANextractions ", - "VLANinsertions ", -}; - -static int get_sset_count(struct net_device *dev, int sset) -{ - switch (sset) { - case ETH_SS_STATS: - return ARRAY_SIZE(stats_strings); - default: - return -EOPNOTSUPP; - } -} - -#define T4_REGMAP_SIZE (160 * 1024) - -static int get_regs_len(struct net_device *dev) -{ - return T4_REGMAP_SIZE; -} - -static int get_eeprom_len(struct net_device *dev) -{ - return EEPROMSIZE; -} - -static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) -{ - struct adapter *adapter = netdev2adap(dev); - - strcpy(info->driver, KBUILD_MODNAME); - strcpy(info->version, DRV_VERSION); - strcpy(info->bus_info, pci_name(adapter->pdev)); - - if (!adapter->params.fw_vers) - strcpy(info->fw_version, "N/A"); - else - snprintf(info->fw_version, sizeof(info->fw_version), - "%u.%u.%u.%u, TP %u.%u.%u.%u", - FW_HDR_FW_VER_MAJOR_GET(adapter->params.fw_vers), - FW_HDR_FW_VER_MINOR_GET(adapter->params.fw_vers), - FW_HDR_FW_VER_MICRO_GET(adapter->params.fw_vers), - FW_HDR_FW_VER_BUILD_GET(adapter->params.fw_vers), - FW_HDR_FW_VER_MAJOR_GET(adapter->params.tp_vers), - FW_HDR_FW_VER_MINOR_GET(adapter->params.tp_vers), - FW_HDR_FW_VER_MICRO_GET(adapter->params.tp_vers), - FW_HDR_FW_VER_BUILD_GET(adapter->params.tp_vers)); -} - -static void get_strings(struct net_device *dev, u32 stringset, u8 *data) -{ - if (stringset == ETH_SS_STATS) - memcpy(data, stats_strings, sizeof(stats_strings)); -} - -/* - * port stats maintained per queue of the port. They should be in the same - * order as in stats_strings above. - */ -struct queue_port_stats { - u64 tso; - u64 tx_csum; - u64 rx_csum; - u64 vlan_ex; - u64 vlan_ins; -}; - -static void collect_sge_port_stats(const struct adapter *adap, - const struct port_info *p, struct queue_port_stats *s) -{ - int i; - const struct sge_eth_txq *tx = &adap->sge.ethtxq[p->first_qset]; - const struct sge_eth_rxq *rx = &adap->sge.ethrxq[p->first_qset]; - - memset(s, 0, sizeof(*s)); - for (i = 0; i < p->nqsets; i++, rx++, tx++) { - s->tso += tx->tso; - s->tx_csum += tx->tx_cso; - s->rx_csum += rx->stats.rx_cso; - s->vlan_ex += rx->stats.vlan_ex; - s->vlan_ins += tx->vlan_ins; - } -} - -static void get_stats(struct net_device *dev, struct ethtool_stats *stats, - u64 *data) -{ - struct port_info *pi = netdev_priv(dev); - struct adapter *adapter = pi->adapter; - - t4_get_port_stats(adapter, pi->tx_chan, (struct port_stats *)data); - - data += sizeof(struct port_stats) / sizeof(u64); - collect_sge_port_stats(adapter, pi, (struct queue_port_stats *)data); -} - -/* - * Return a version number to identify the type of adapter. The scheme is: - * - bits 0..9: chip version - * - bits 10..15: chip revision - */ -static inline unsigned int mk_adap_vers(const struct adapter *ap) -{ - return 4 | (ap->params.rev << 10); -} - -static void reg_block_dump(struct adapter *ap, void *buf, unsigned int start, - unsigned int end) -{ - u32 *p = buf + start; - - for ( ; start <= end; start += sizeof(u32)) - *p++ = t4_read_reg(ap, start); -} - -static void get_regs(struct net_device *dev, struct ethtool_regs *regs, - void *buf) -{ - static const unsigned int reg_ranges[] = { - 0x1008, 0x1108, - 0x1180, 0x11b4, - 0x11fc, 0x123c, - 0x1300, 0x173c, - 0x1800, 0x18fc, - 0x3000, 0x30d8, - 0x30e0, 0x5924, - 0x5960, 0x59d4, - 0x5a00, 0x5af8, - 0x6000, 0x6098, - 0x6100, 0x6150, - 0x6200, 0x6208, - 0x6240, 0x6248, - 0x6280, 0x6338, - 0x6370, 0x638c, - 0x6400, 0x643c, - 0x6500, 0x6524, - 0x6a00, 0x6a38, - 0x6a60, 0x6a78, - 0x6b00, 0x6b84, - 0x6bf0, 0x6c84, - 0x6cf0, 0x6d84, - 0x6df0, 0x6e84, - 0x6ef0, 0x6f84, - 0x6ff0, 0x7084, - 0x70f0, 0x7184, - 0x71f0, 0x7284, - 0x72f0, 0x7384, - 0x73f0, 0x7450, - 0x7500, 0x7530, - 0x7600, 0x761c, - 0x7680, 0x76cc, - 0x7700, 0x7798, - 0x77c0, 0x77fc, - 0x7900, 0x79fc, - 0x7b00, 0x7c38, - 0x7d00, 0x7efc, - 0x8dc0, 0x8e1c, - 0x8e30, 0x8e78, - 0x8ea0, 0x8f6c, - 0x8fc0, 0x9074, - 0x90fc, 0x90fc, - 0x9400, 0x9458, - 0x9600, 0x96bc, - 0x9800, 0x9808, - 0x9820, 0x983c, - 0x9850, 0x9864, - 0x9c00, 0x9c6c, - 0x9c80, 0x9cec, - 0x9d00, 0x9d6c, - 0x9d80, 0x9dec, - 0x9e00, 0x9e6c, - 0x9e80, 0x9eec, - 0x9f00, 0x9f6c, - 0x9f80, 0x9fec, - 0xd004, 0xd03c, - 0xdfc0, 0xdfe0, - 0xe000, 0xea7c, - 0xf000, 0x11190, - 0x19040, 0x19124, - 0x19150, 0x191b0, - 0x191d0, 0x191e8, - 0x19238, 0x1924c, - 0x193f8, 0x19474, - 0x19490, 0x194f8, - 0x19800, 0x19f30, - 0x1a000, 0x1a06c, - 0x1a0b0, 0x1a120, - 0x1a128, 0x1a138, - 0x1a190, 0x1a1c4, - 0x1a1fc, 0x1a1fc, - 0x1e040, 0x1e04c, - 0x1e240, 0x1e28c, - 0x1e2c0, 0x1e2c0, - 0x1e2e0, 0x1e2e0, - 0x1e300, 0x1e384, - 0x1e3c0, 0x1e3c8, - 0x1e440, 0x1e44c, - 0x1e640, 0x1e68c, - 0x1e6c0, 0x1e6c0, - 0x1e6e0, 0x1e6e0, - 0x1e700, 0x1e784, - 0x1e7c0, 0x1e7c8, - 0x1e840, 0x1e84c, - 0x1ea40, 0x1ea8c, - 0x1eac0, 0x1eac0, - 0x1eae0, 0x1eae0, - 0x1eb00, 0x1eb84, - 0x1ebc0, 0x1ebc8, - 0x1ec40, 0x1ec4c, - 0x1ee40, 0x1ee8c, - 0x1eec0, 0x1eec0, - 0x1eee0, 0x1eee0, - 0x1ef00, 0x1ef84, - 0x1efc0, 0x1efc8, - 0x1f040, 0x1f04c, - 0x1f240, 0x1f28c, - 0x1f2c0, 0x1f2c0, - 0x1f2e0, 0x1f2e0, - 0x1f300, 0x1f384, - 0x1f3c0, 0x1f3c8, - 0x1f440, 0x1f44c, - 0x1f640, 0x1f68c, - 0x1f6c0, 0x1f6c0, - 0x1f6e0, 0x1f6e0, - 0x1f700, 0x1f784, - 0x1f7c0, 0x1f7c8, - 0x1f840, 0x1f84c, - 0x1fa40, 0x1fa8c, - 0x1fac0, 0x1fac0, - 0x1fae0, 0x1fae0, - 0x1fb00, 0x1fb84, - 0x1fbc0, 0x1fbc8, - 0x1fc40, 0x1fc4c, - 0x1fe40, 0x1fe8c, - 0x1fec0, 0x1fec0, - 0x1fee0, 0x1fee0, - 0x1ff00, 0x1ff84, - 0x1ffc0, 0x1ffc8, - 0x20000, 0x2002c, - 0x20100, 0x2013c, - 0x20190, 0x201c8, - 0x20200, 0x20318, - 0x20400, 0x20528, - 0x20540, 0x20614, - 0x21000, 0x21040, - 0x2104c, 0x21060, - 0x210c0, 0x210ec, - 0x21200, 0x21268, - 0x21270, 0x21284, - 0x212fc, 0x21388, - 0x21400, 0x21404, - 0x21500, 0x21518, - 0x2152c, 0x2153c, - 0x21550, 0x21554, - 0x21600, 0x21600, - 0x21608, 0x21628, - 0x21630, 0x2163c, - 0x21700, 0x2171c, - 0x21780, 0x2178c, - 0x21800, 0x21c38, - 0x21c80, 0x21d7c, - 0x21e00, 0x21e04, - 0x22000, 0x2202c, - 0x22100, 0x2213c, - 0x22190, 0x221c8, - 0x22200, 0x22318, - 0x22400, 0x22528, - 0x22540, 0x22614, - 0x23000, 0x23040, - 0x2304c, 0x23060, - 0x230c0, 0x230ec, - 0x23200, 0x23268, - 0x23270, 0x23284, - 0x232fc, 0x23388, - 0x23400, 0x23404, - 0x23500, 0x23518, - 0x2352c, 0x2353c, - 0x23550, 0x23554, - 0x23600, 0x23600, - 0x23608, 0x23628, - 0x23630, 0x2363c, - 0x23700, 0x2371c, - 0x23780, 0x2378c, - 0x23800, 0x23c38, - 0x23c80, 0x23d7c, - 0x23e00, 0x23e04, - 0x24000, 0x2402c, - 0x24100, 0x2413c, - 0x24190, 0x241c8, - 0x24200, 0x24318, - 0x24400, 0x24528, - 0x24540, 0x24614, - 0x25000, 0x25040, - 0x2504c, 0x25060, - 0x250c0, 0x250ec, - 0x25200, 0x25268, - 0x25270, 0x25284, - 0x252fc, 0x25388, - 0x25400, 0x25404, - 0x25500, 0x25518, - 0x2552c, 0x2553c, - 0x25550, 0x25554, - 0x25600, 0x25600, - 0x25608, 0x25628, - 0x25630, 0x2563c, - 0x25700, 0x2571c, - 0x25780, 0x2578c, - 0x25800, 0x25c38, - 0x25c80, 0x25d7c, - 0x25e00, 0x25e04, - 0x26000, 0x2602c, - 0x26100, 0x2613c, - 0x26190, 0x261c8, - 0x26200, 0x26318, - 0x26400, 0x26528, - 0x26540, 0x26614, - 0x27000, 0x27040, - 0x2704c, 0x27060, - 0x270c0, 0x270ec, - 0x27200, 0x27268, - 0x27270, 0x27284, - 0x272fc, 0x27388, - 0x27400, 0x27404, - 0x27500, 0x27518, - 0x2752c, 0x2753c, - 0x27550, 0x27554, - 0x27600, 0x27600, - 0x27608, 0x27628, - 0x27630, 0x2763c, - 0x27700, 0x2771c, - 0x27780, 0x2778c, - 0x27800, 0x27c38, - 0x27c80, 0x27d7c, - 0x27e00, 0x27e04 - }; - - int i; - struct adapter *ap = netdev2adap(dev); - - regs->version = mk_adap_vers(ap); - - memset(buf, 0, T4_REGMAP_SIZE); - for (i = 0; i < ARRAY_SIZE(reg_ranges); i += 2) - reg_block_dump(ap, buf, reg_ranges[i], reg_ranges[i + 1]); -} - -static int restart_autoneg(struct net_device *dev) -{ - struct port_info *p = netdev_priv(dev); - - if (!netif_running(dev)) - return -EAGAIN; - if (p->link_cfg.autoneg != AUTONEG_ENABLE) - return -EINVAL; - t4_restart_aneg(p->adapter, 0, p->tx_chan); - return 0; -} - -static int identify_port(struct net_device *dev, u32 data) -{ - if (data == 0) - data = 2; /* default to 2 seconds */ - - return t4_identify_port(netdev2adap(dev), 0, netdev2pinfo(dev)->viid, - data * 5); -} - -static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps) -{ - unsigned int v = 0; - - if (type == FW_PORT_TYPE_BT_SGMII || type == FW_PORT_TYPE_BT_XAUI) { - v |= SUPPORTED_TP; - if (caps & FW_PORT_CAP_SPEED_100M) - v |= SUPPORTED_100baseT_Full; - if (caps & FW_PORT_CAP_SPEED_1G) - v |= SUPPORTED_1000baseT_Full; - if (caps & FW_PORT_CAP_SPEED_10G) - v |= SUPPORTED_10000baseT_Full; - } else if (type == FW_PORT_TYPE_KX4 || type == FW_PORT_TYPE_KX) { - v |= SUPPORTED_Backplane; - if (caps & FW_PORT_CAP_SPEED_1G) - v |= SUPPORTED_1000baseKX_Full; - if (caps & FW_PORT_CAP_SPEED_10G) - v |= SUPPORTED_10000baseKX4_Full; - } else if (type == FW_PORT_TYPE_KR) - v |= SUPPORTED_Backplane | SUPPORTED_10000baseKR_Full; - else if (type == FW_PORT_TYPE_FIBER) - v |= SUPPORTED_FIBRE; - - if (caps & FW_PORT_CAP_ANEG) - v |= SUPPORTED_Autoneg; - return v; -} - -static unsigned int to_fw_linkcaps(unsigned int caps) -{ - unsigned int v = 0; - - if (caps & ADVERTISED_100baseT_Full) - v |= FW_PORT_CAP_SPEED_100M; - if (caps & ADVERTISED_1000baseT_Full) - v |= FW_PORT_CAP_SPEED_1G; - if (caps & ADVERTISED_10000baseT_Full) - v |= FW_PORT_CAP_SPEED_10G; - return v; -} - -static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - const struct port_info *p = netdev_priv(dev); - - if (p->port_type == FW_PORT_TYPE_BT_SGMII || - p->port_type == FW_PORT_TYPE_BT_XAUI) - cmd->port = PORT_TP; - else if (p->port_type == FW_PORT_TYPE_FIBER) - cmd->port = PORT_FIBRE; - else if (p->port_type == FW_PORT_TYPE_TWINAX) - cmd->port = PORT_DA; - else - cmd->port = PORT_OTHER; - - if (p->mdio_addr >= 0) { - cmd->phy_address = p->mdio_addr; - cmd->transceiver = XCVR_EXTERNAL; - cmd->mdio_support = p->port_type == FW_PORT_TYPE_BT_SGMII ? - MDIO_SUPPORTS_C22 : MDIO_SUPPORTS_C45; - } else { - cmd->phy_address = 0; /* not really, but no better option */ - cmd->transceiver = XCVR_INTERNAL; - cmd->mdio_support = 0; - } - - cmd->supported = from_fw_linkcaps(p->port_type, p->link_cfg.supported); - cmd->advertising = from_fw_linkcaps(p->port_type, - p->link_cfg.advertising); - cmd->speed = netif_carrier_ok(dev) ? p->link_cfg.speed : 0; - cmd->duplex = DUPLEX_FULL; - cmd->autoneg = p->link_cfg.autoneg; - cmd->maxtxpkt = 0; - cmd->maxrxpkt = 0; - return 0; -} - -static unsigned int speed_to_caps(int speed) -{ - if (speed == SPEED_100) - return FW_PORT_CAP_SPEED_100M; - if (speed == SPEED_1000) - return FW_PORT_CAP_SPEED_1G; - if (speed == SPEED_10000) - return FW_PORT_CAP_SPEED_10G; - return 0; -} - -static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - unsigned int cap; - struct port_info *p = netdev_priv(dev); - struct link_config *lc = &p->link_cfg; - - if (cmd->duplex != DUPLEX_FULL) /* only full-duplex supported */ - return -EINVAL; - - if (!(lc->supported & FW_PORT_CAP_ANEG)) { - /* - * PHY offers a single speed. See if that's what's - * being requested. - */ - if (cmd->autoneg == AUTONEG_DISABLE && - (lc->supported & speed_to_caps(cmd->speed))) - return 0; - return -EINVAL; - } - - if (cmd->autoneg == AUTONEG_DISABLE) { - cap = speed_to_caps(cmd->speed); - - if (!(lc->supported & cap) || cmd->speed == SPEED_1000 || - cmd->speed == SPEED_10000) - return -EINVAL; - lc->requested_speed = cap; - lc->advertising = 0; - } else { - cap = to_fw_linkcaps(cmd->advertising); - if (!(lc->supported & cap)) - return -EINVAL; - lc->requested_speed = 0; - lc->advertising = cap | FW_PORT_CAP_ANEG; - } - lc->autoneg = cmd->autoneg; - - if (netif_running(dev)) - return t4_link_start(p->adapter, 0, p->tx_chan, lc); - return 0; -} - -static void get_pauseparam(struct net_device *dev, - struct ethtool_pauseparam *epause) -{ - struct port_info *p = netdev_priv(dev); - - epause->autoneg = (p->link_cfg.requested_fc & PAUSE_AUTONEG) != 0; - epause->rx_pause = (p->link_cfg.fc & PAUSE_RX) != 0; - epause->tx_pause = (p->link_cfg.fc & PAUSE_TX) != 0; -} - -static int set_pauseparam(struct net_device *dev, - struct ethtool_pauseparam *epause) -{ - struct port_info *p = netdev_priv(dev); - struct link_config *lc = &p->link_cfg; - - if (epause->autoneg == AUTONEG_DISABLE) - lc->requested_fc = 0; - else if (lc->supported & FW_PORT_CAP_ANEG) - lc->requested_fc = PAUSE_AUTONEG; - else - return -EINVAL; - - if (epause->rx_pause) - lc->requested_fc |= PAUSE_RX; - if (epause->tx_pause) - lc->requested_fc |= PAUSE_TX; - if (netif_running(dev)) - return t4_link_start(p->adapter, 0, p->tx_chan, lc); - return 0; -} - -static u32 get_rx_csum(struct net_device *dev) -{ - struct port_info *p = netdev_priv(dev); - - return p->rx_offload & RX_CSO; -} - -static int set_rx_csum(struct net_device *dev, u32 data) -{ - struct port_info *p = netdev_priv(dev); - - if (data) - p->rx_offload |= RX_CSO; - else - p->rx_offload &= ~RX_CSO; - return 0; -} - -static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) -{ - const struct port_info *pi = netdev_priv(dev); - const struct sge *s = &pi->adapter->sge; - - e->rx_max_pending = MAX_RX_BUFFERS; - e->rx_mini_max_pending = MAX_RSPQ_ENTRIES; - e->rx_jumbo_max_pending = 0; - e->tx_max_pending = MAX_TXQ_ENTRIES; - - e->rx_pending = s->ethrxq[pi->first_qset].fl.size - 8; - e->rx_mini_pending = s->ethrxq[pi->first_qset].rspq.size; - e->rx_jumbo_pending = 0; - e->tx_pending = s->ethtxq[pi->first_qset].q.size; -} - -static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) -{ - int i; - const struct port_info *pi = netdev_priv(dev); - struct adapter *adapter = pi->adapter; - struct sge *s = &adapter->sge; - - if (e->rx_pending > MAX_RX_BUFFERS || e->rx_jumbo_pending || - e->tx_pending > MAX_TXQ_ENTRIES || - e->rx_mini_pending > MAX_RSPQ_ENTRIES || - e->rx_mini_pending < MIN_RSPQ_ENTRIES || - e->rx_pending < MIN_FL_ENTRIES || e->tx_pending < MIN_TXQ_ENTRIES) - return -EINVAL; - - if (adapter->flags & FULL_INIT_DONE) - return -EBUSY; - - for (i = 0; i < pi->nqsets; ++i) { - s->ethtxq[pi->first_qset + i].q.size = e->tx_pending; - s->ethrxq[pi->first_qset + i].fl.size = e->rx_pending + 8; - s->ethrxq[pi->first_qset + i].rspq.size = e->rx_mini_pending; - } - return 0; -} - -static int closest_timer(const struct sge *s, int time) -{ - int i, delta, match = 0, min_delta = INT_MAX; - - for (i = 0; i < ARRAY_SIZE(s->timer_val); i++) { - delta = time - s->timer_val[i]; - if (delta < 0) - delta = -delta; - if (delta < min_delta) { - min_delta = delta; - match = i; - } - } - return match; -} - -static int closest_thres(const struct sge *s, int thres) -{ - int i, delta, match = 0, min_delta = INT_MAX; - - for (i = 0; i < ARRAY_SIZE(s->counter_val); i++) { - delta = thres - s->counter_val[i]; - if (delta < 0) - delta = -delta; - if (delta < min_delta) { - min_delta = delta; - match = i; - } - } - return match; -} - -/* - * Return a queue's interrupt hold-off time in us. 0 means no timer. - */ -static unsigned int qtimer_val(const struct adapter *adap, - const struct sge_rspq *q) -{ - unsigned int idx = q->intr_params >> 1; - - return idx < SGE_NTIMERS ? adap->sge.timer_val[idx] : 0; -} - -/** - * set_rxq_intr_params - set a queue's interrupt holdoff parameters - * @adap: the adapter - * @q: the Rx queue - * @us: the hold-off time in us, or 0 to disable timer - * @cnt: the hold-off packet count, or 0 to disable counter - * - * Sets an Rx queue's interrupt hold-off time and packet count. At least - * one of the two needs to be enabled for the queue to generate interrupts. - */ -static int set_rxq_intr_params(struct adapter *adap, struct sge_rspq *q, - unsigned int us, unsigned int cnt) -{ - if ((us | cnt) == 0) - cnt = 1; - - if (cnt) { - int err; - u32 v, new_idx; - - new_idx = closest_thres(&adap->sge, cnt); - if (q->desc && q->pktcnt_idx != new_idx) { - /* the queue has already been created, update it */ - v = FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH) | - FW_PARAMS_PARAM_YZ(q->cntxt_id); - err = t4_set_params(adap, 0, 0, 0, 1, &v, &new_idx); - if (err) - return err; - } - q->pktcnt_idx = new_idx; - } - - us = us == 0 ? 6 : closest_timer(&adap->sge, us); - q->intr_params = QINTR_TIMER_IDX(us) | (cnt > 0 ? QINTR_CNT_EN : 0); - return 0; -} - -static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c) -{ - const struct port_info *pi = netdev_priv(dev); - struct adapter *adap = pi->adapter; - - return set_rxq_intr_params(adap, &adap->sge.ethrxq[pi->first_qset].rspq, - c->rx_coalesce_usecs, c->rx_max_coalesced_frames); -} - -static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c) -{ - const struct port_info *pi = netdev_priv(dev); - const struct adapter *adap = pi->adapter; - const struct sge_rspq *rq = &adap->sge.ethrxq[pi->first_qset].rspq; - - c->rx_coalesce_usecs = qtimer_val(adap, rq); - c->rx_max_coalesced_frames = (rq->intr_params & QINTR_CNT_EN) ? - adap->sge.counter_val[rq->pktcnt_idx] : 0; - return 0; -} - -/* - * Translate a physical EEPROM address to virtual. The first 1K is accessed - * through virtual addresses starting at 31K, the rest is accessed through - * virtual addresses starting at 0. This mapping is correct only for PF0. - */ -static int eeprom_ptov(unsigned int phys_addr) -{ - if (phys_addr < 1024) - return phys_addr + (31 << 10); - if (phys_addr < EEPROMSIZE) - return phys_addr - 1024; - return -EINVAL; -} - -/* - * The next two routines implement eeprom read/write from physical addresses. - * The physical->virtual translation is correct only for PF0. - */ -static int eeprom_rd_phys(struct adapter *adap, unsigned int phys_addr, u32 *v) -{ - int vaddr = eeprom_ptov(phys_addr); - - if (vaddr >= 0) - vaddr = pci_read_vpd(adap->pdev, vaddr, sizeof(u32), v); - return vaddr < 0 ? vaddr : 0; -} - -static int eeprom_wr_phys(struct adapter *adap, unsigned int phys_addr, u32 v) -{ - int vaddr = eeprom_ptov(phys_addr); - - if (vaddr >= 0) - vaddr = pci_write_vpd(adap->pdev, vaddr, sizeof(u32), &v); - return vaddr < 0 ? vaddr : 0; -} - -#define EEPROM_MAGIC 0x38E2F10C - -static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e, - u8 *data) -{ - int i, err = 0; - struct adapter *adapter = netdev2adap(dev); - - u8 *buf = kmalloc(EEPROMSIZE, GFP_KERNEL); - if (!buf) - return -ENOMEM; - - e->magic = EEPROM_MAGIC; - for (i = e->offset & ~3; !err && i < e->offset + e->len; i += 4) - err = eeprom_rd_phys(adapter, i, (u32 *)&buf[i]); - - if (!err) - memcpy(data, buf + e->offset, e->len); - kfree(buf); - return err; -} - -static int set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, - u8 *data) -{ - u8 *buf; - int err = 0; - u32 aligned_offset, aligned_len, *p; - struct adapter *adapter = netdev2adap(dev); - - if (eeprom->magic != EEPROM_MAGIC) - return -EINVAL; - - aligned_offset = eeprom->offset & ~3; - aligned_len = (eeprom->len + (eeprom->offset & 3) + 3) & ~3; - - if (aligned_offset != eeprom->offset || aligned_len != eeprom->len) { - /* - * RMW possibly needed for first or last words. - */ - buf = kmalloc(aligned_len, GFP_KERNEL); - if (!buf) - return -ENOMEM; - err = eeprom_rd_phys(adapter, aligned_offset, (u32 *)buf); - if (!err && aligned_len > 4) - err = eeprom_rd_phys(adapter, - aligned_offset + aligned_len - 4, - (u32 *)&buf[aligned_len - 4]); - if (err) - goto out; - memcpy(buf + (eeprom->offset & 3), data, eeprom->len); - } else - buf = data; - - err = t4_seeprom_wp(adapter, false); - if (err) - goto out; - - for (p = (u32 *)buf; !err && aligned_len; aligned_len -= 4, p++) { - err = eeprom_wr_phys(adapter, aligned_offset, *p); - aligned_offset += 4; - } - - if (!err) - err = t4_seeprom_wp(adapter, true); -out: - if (buf != data) - kfree(buf); - return err; -} - -static int set_flash(struct net_device *netdev, struct ethtool_flash *ef) -{ - int ret; - const struct firmware *fw; - struct adapter *adap = netdev2adap(netdev); - - ef->data[sizeof(ef->data) - 1] = '\0'; - ret = request_firmware(&fw, ef->data, adap->pdev_dev); - if (ret < 0) - return ret; - - ret = t4_load_fw(adap, fw->data, fw->size); - release_firmware(fw); - if (!ret) - dev_info(adap->pdev_dev, "loaded firmware %s\n", ef->data); - return ret; -} - -#define WOL_SUPPORTED (WAKE_BCAST | WAKE_MAGIC) -#define BCAST_CRC 0xa0ccc1a6 - -static void get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) -{ - wol->supported = WAKE_BCAST | WAKE_MAGIC; - wol->wolopts = netdev2adap(dev)->wol; - memset(&wol->sopass, 0, sizeof(wol->sopass)); -} - -static int set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) -{ - int err = 0; - struct port_info *pi = netdev_priv(dev); - - if (wol->wolopts & ~WOL_SUPPORTED) - return -EINVAL; - t4_wol_magic_enable(pi->adapter, pi->tx_chan, - (wol->wolopts & WAKE_MAGIC) ? dev->dev_addr : NULL); - if (wol->wolopts & WAKE_BCAST) { - err = t4_wol_pat_enable(pi->adapter, pi->tx_chan, 0xfe, ~0ULL, - ~0ULL, 0, false); - if (!err) - err = t4_wol_pat_enable(pi->adapter, pi->tx_chan, 1, - ~6ULL, ~0ULL, BCAST_CRC, true); - } else - t4_wol_pat_enable(pi->adapter, pi->tx_chan, 0, 0, 0, 0, false); - return err; -} - -static int set_tso(struct net_device *dev, u32 value) -{ - if (value) - dev->features |= NETIF_F_TSO | NETIF_F_TSO6; - else - dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6); - return 0; -} - -static struct ethtool_ops cxgb_ethtool_ops = { - .get_settings = get_settings, - .set_settings = set_settings, - .get_drvinfo = get_drvinfo, - .get_msglevel = get_msglevel, - .set_msglevel = set_msglevel, - .get_ringparam = get_sge_param, - .set_ringparam = set_sge_param, - .get_coalesce = get_coalesce, - .set_coalesce = set_coalesce, - .get_eeprom_len = get_eeprom_len, - .get_eeprom = get_eeprom, - .set_eeprom = set_eeprom, - .get_pauseparam = get_pauseparam, - .set_pauseparam = set_pauseparam, - .get_rx_csum = get_rx_csum, - .set_rx_csum = set_rx_csum, - .set_tx_csum = ethtool_op_set_tx_ipv6_csum, - .set_sg = ethtool_op_set_sg, - .get_link = ethtool_op_get_link, - .get_strings = get_strings, - .phys_id = identify_port, - .nway_reset = restart_autoneg, - .get_sset_count = get_sset_count, - .get_ethtool_stats = get_stats, - .get_regs_len = get_regs_len, - .get_regs = get_regs, - .get_wol = get_wol, - .set_wol = set_wol, - .set_tso = set_tso, - .flash_device = set_flash, -}; - -/* - * debugfs support - */ - -static int mem_open(struct inode *inode, struct file *file) -{ - file->private_data = inode->i_private; - return 0; -} - -static ssize_t mem_read(struct file *file, char __user *buf, size_t count, - loff_t *ppos) -{ - loff_t pos = *ppos; - loff_t avail = file->f_path.dentry->d_inode->i_size; - unsigned int mem = (uintptr_t)file->private_data & 3; - struct adapter *adap = file->private_data - mem; - - if (pos < 0) - return -EINVAL; - if (pos >= avail) - return 0; - if (count > avail - pos) - count = avail - pos; - - while (count) { - size_t len; - int ret, ofst; - __be32 data[16]; - - if (mem == MEM_MC) - ret = t4_mc_read(adap, pos, data, NULL); - else - ret = t4_edc_read(adap, mem, pos, data, NULL); - if (ret) - return ret; - - ofst = pos % sizeof(data); - len = min(count, sizeof(data) - ofst); - if (copy_to_user(buf, (u8 *)data + ofst, len)) - return -EFAULT; - - buf += len; - pos += len; - count -= len; - } - count = pos - *ppos; - *ppos = pos; - return count; -} - -static const struct file_operations mem_debugfs_fops = { - .owner = THIS_MODULE, - .open = mem_open, - .read = mem_read, -}; - -static void __devinit add_debugfs_mem(struct adapter *adap, const char *name, - unsigned int idx, unsigned int size_mb) -{ - struct dentry *de; - - de = debugfs_create_file(name, S_IRUSR, adap->debugfs_root, - (void *)adap + idx, &mem_debugfs_fops); - if (de && de->d_inode) - de->d_inode->i_size = size_mb << 20; -} - -static int __devinit setup_debugfs(struct adapter *adap) -{ - int i; - - if (IS_ERR_OR_NULL(adap->debugfs_root)) - return -1; - - i = t4_read_reg(adap, MA_TARGET_MEM_ENABLE); - if (i & EDRAM0_ENABLE) - add_debugfs_mem(adap, "edc0", MEM_EDC0, 5); - if (i & EDRAM1_ENABLE) - add_debugfs_mem(adap, "edc1", MEM_EDC1, 5); - if (i & EXT_MEM_ENABLE) - add_debugfs_mem(adap, "mc", MEM_MC, - EXT_MEM_SIZE_GET(t4_read_reg(adap, MA_EXT_MEMORY_BAR))); - if (adap->l2t) - debugfs_create_file("l2t", S_IRUSR, adap->debugfs_root, adap, - &t4_l2t_fops); - return 0; -} - -/* - * upper-layer driver support - */ - -/* - * Allocate an active-open TID and set it to the supplied value. - */ -int cxgb4_alloc_atid(struct tid_info *t, void *data) -{ - int atid = -1; - - spin_lock_bh(&t->atid_lock); - if (t->afree) { - union aopen_entry *p = t->afree; - - atid = p - t->atid_tab; - t->afree = p->next; - p->data = data; - t->atids_in_use++; - } - spin_unlock_bh(&t->atid_lock); - return atid; -} -EXPORT_SYMBOL(cxgb4_alloc_atid); - -/* - * Release an active-open TID. - */ -void cxgb4_free_atid(struct tid_info *t, unsigned int atid) -{ - union aopen_entry *p = &t->atid_tab[atid]; - - spin_lock_bh(&t->atid_lock); - p->next = t->afree; - t->afree = p; - t->atids_in_use--; - spin_unlock_bh(&t->atid_lock); -} -EXPORT_SYMBOL(cxgb4_free_atid); - -/* - * Allocate a server TID and set it to the supplied value. - */ -int cxgb4_alloc_stid(struct tid_info *t, int family, void *data) -{ - int stid; - - spin_lock_bh(&t->stid_lock); - if (family == PF_INET) { - stid = find_first_zero_bit(t->stid_bmap, t->nstids); - if (stid < t->nstids) - __set_bit(stid, t->stid_bmap); - else - stid = -1; - } else { - stid = bitmap_find_free_region(t->stid_bmap, t->nstids, 2); - if (stid < 0) - stid = -1; - } - if (stid >= 0) { - t->stid_tab[stid].data = data; - stid += t->stid_base; - t->stids_in_use++; - } - spin_unlock_bh(&t->stid_lock); - return stid; -} -EXPORT_SYMBOL(cxgb4_alloc_stid); - -/* - * Release a server TID. - */ -void cxgb4_free_stid(struct tid_info *t, unsigned int stid, int family) -{ - stid -= t->stid_base; - spin_lock_bh(&t->stid_lock); - if (family == PF_INET) - __clear_bit(stid, t->stid_bmap); - else - bitmap_release_region(t->stid_bmap, stid, 2); - t->stid_tab[stid].data = NULL; - t->stids_in_use--; - spin_unlock_bh(&t->stid_lock); -} -EXPORT_SYMBOL(cxgb4_free_stid); - -/* - * Populate a TID_RELEASE WR. Caller must properly size the skb. - */ -static void mk_tid_release(struct sk_buff *skb, unsigned int chan, - unsigned int tid) -{ - struct cpl_tid_release *req; - - set_wr_txq(skb, CPL_PRIORITY_SETUP, chan); - req = (struct cpl_tid_release *)__skb_put(skb, sizeof(*req)); - INIT_TP_WR(req, tid); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_TID_RELEASE, tid)); -} - -/* - * Queue a TID release request and if necessary schedule a work queue to - * process it. - */ -void cxgb4_queue_tid_release(struct tid_info *t, unsigned int chan, - unsigned int tid) -{ - void **p = &t->tid_tab[tid]; - struct adapter *adap = container_of(t, struct adapter, tids); - - spin_lock_bh(&adap->tid_release_lock); - *p = adap->tid_release_head; - /* Low 2 bits encode the Tx channel number */ - adap->tid_release_head = (void **)((uintptr_t)p | chan); - if (!adap->tid_release_task_busy) { - adap->tid_release_task_busy = true; - schedule_work(&adap->tid_release_task); - } - spin_unlock_bh(&adap->tid_release_lock); -} -EXPORT_SYMBOL(cxgb4_queue_tid_release); - -/* - * Process the list of pending TID release requests. - */ -static void process_tid_release_list(struct work_struct *work) -{ - struct sk_buff *skb; - struct adapter *adap; - - adap = container_of(work, struct adapter, tid_release_task); - - spin_lock_bh(&adap->tid_release_lock); - while (adap->tid_release_head) { - void **p = adap->tid_release_head; - unsigned int chan = (uintptr_t)p & 3; - p = (void *)p - chan; - - adap->tid_release_head = *p; - *p = NULL; - spin_unlock_bh(&adap->tid_release_lock); - - while (!(skb = alloc_skb(sizeof(struct cpl_tid_release), - GFP_KERNEL))) - schedule_timeout_uninterruptible(1); - - mk_tid_release(skb, chan, p - adap->tids.tid_tab); - t4_ofld_send(adap, skb); - spin_lock_bh(&adap->tid_release_lock); - } - adap->tid_release_task_busy = false; - spin_unlock_bh(&adap->tid_release_lock); -} - -/* - * Release a TID and inform HW. If we are unable to allocate the release - * message we defer to a work queue. - */ -void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid) -{ - void *old; - struct sk_buff *skb; - struct adapter *adap = container_of(t, struct adapter, tids); - - old = t->tid_tab[tid]; - skb = alloc_skb(sizeof(struct cpl_tid_release), GFP_ATOMIC); - if (likely(skb)) { - t->tid_tab[tid] = NULL; - mk_tid_release(skb, chan, tid); - t4_ofld_send(adap, skb); - } else - cxgb4_queue_tid_release(t, chan, tid); - if (old) - atomic_dec(&t->tids_in_use); -} -EXPORT_SYMBOL(cxgb4_remove_tid); - -/* - * Allocate and initialize the TID tables. Returns 0 on success. - */ -static int tid_init(struct tid_info *t) -{ - size_t size; - unsigned int natids = t->natids; - - size = t->ntids * sizeof(*t->tid_tab) + natids * sizeof(*t->atid_tab) + - t->nstids * sizeof(*t->stid_tab) + - BITS_TO_LONGS(t->nstids) * sizeof(long); - t->tid_tab = t4_alloc_mem(size); - if (!t->tid_tab) - return -ENOMEM; - - t->atid_tab = (union aopen_entry *)&t->tid_tab[t->ntids]; - t->stid_tab = (struct serv_entry *)&t->atid_tab[natids]; - t->stid_bmap = (unsigned long *)&t->stid_tab[t->nstids]; - spin_lock_init(&t->stid_lock); - spin_lock_init(&t->atid_lock); - - t->stids_in_use = 0; - t->afree = NULL; - t->atids_in_use = 0; - atomic_set(&t->tids_in_use, 0); - - /* Setup the free list for atid_tab and clear the stid bitmap. */ - if (natids) { - while (--natids) - t->atid_tab[natids - 1].next = &t->atid_tab[natids]; - t->afree = t->atid_tab; - } - bitmap_zero(t->stid_bmap, t->nstids); - return 0; -} - -/** - * cxgb4_create_server - create an IP server - * @dev: the device - * @stid: the server TID - * @sip: local IP address to bind server to - * @sport: the server's TCP port - * @queue: queue to direct messages from this server to - * - * Create an IP server for the given port and address. - * Returns <0 on error and one of the %NET_XMIT_* values on success. - */ -int cxgb4_create_server(const struct net_device *dev, unsigned int stid, - __be32 sip, __be16 sport, unsigned int queue) -{ - unsigned int chan; - struct sk_buff *skb; - struct adapter *adap; - struct cpl_pass_open_req *req; - - skb = alloc_skb(sizeof(*req), GFP_KERNEL); - if (!skb) - return -ENOMEM; - - adap = netdev2adap(dev); - req = (struct cpl_pass_open_req *)__skb_put(skb, sizeof(*req)); - INIT_TP_WR(req, 0); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_PASS_OPEN_REQ, stid)); - req->local_port = sport; - req->peer_port = htons(0); - req->local_ip = sip; - req->peer_ip = htonl(0); - chan = netdev2pinfo(adap->sge.ingr_map[queue]->netdev)->tx_chan; - req->opt0 = cpu_to_be64(TX_CHAN(chan)); - req->opt1 = cpu_to_be64(CONN_POLICY_ASK | - SYN_RSS_ENABLE | SYN_RSS_QUEUE(queue)); - return t4_mgmt_tx(adap, skb); -} -EXPORT_SYMBOL(cxgb4_create_server); - -/** - * cxgb4_create_server6 - create an IPv6 server - * @dev: the device - * @stid: the server TID - * @sip: local IPv6 address to bind server to - * @sport: the server's TCP port - * @queue: queue to direct messages from this server to - * - * Create an IPv6 server for the given port and address. - * Returns <0 on error and one of the %NET_XMIT_* values on success. - */ -int cxgb4_create_server6(const struct net_device *dev, unsigned int stid, - const struct in6_addr *sip, __be16 sport, - unsigned int queue) -{ - unsigned int chan; - struct sk_buff *skb; - struct adapter *adap; - struct cpl_pass_open_req6 *req; - - skb = alloc_skb(sizeof(*req), GFP_KERNEL); - if (!skb) - return -ENOMEM; - - adap = netdev2adap(dev); - req = (struct cpl_pass_open_req6 *)__skb_put(skb, sizeof(*req)); - INIT_TP_WR(req, 0); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_PASS_OPEN_REQ6, stid)); - req->local_port = sport; - req->peer_port = htons(0); - req->local_ip_hi = *(__be64 *)(sip->s6_addr); - req->local_ip_lo = *(__be64 *)(sip->s6_addr + 8); - req->peer_ip_hi = cpu_to_be64(0); - req->peer_ip_lo = cpu_to_be64(0); - chan = netdev2pinfo(adap->sge.ingr_map[queue]->netdev)->tx_chan; - req->opt0 = cpu_to_be64(TX_CHAN(chan)); - req->opt1 = cpu_to_be64(CONN_POLICY_ASK | - SYN_RSS_ENABLE | SYN_RSS_QUEUE(queue)); - return t4_mgmt_tx(adap, skb); -} -EXPORT_SYMBOL(cxgb4_create_server6); - -/** - * cxgb4_best_mtu - find the entry in the MTU table closest to an MTU - * @mtus: the HW MTU table - * @mtu: the target MTU - * @idx: index of selected entry in the MTU table - * - * Returns the index and the value in the HW MTU table that is closest to - * but does not exceed @mtu, unless @mtu is smaller than any value in the - * table, in which case that smallest available value is selected. - */ -unsigned int cxgb4_best_mtu(const unsigned short *mtus, unsigned short mtu, - unsigned int *idx) -{ - unsigned int i = 0; - - while (i < NMTUS - 1 && mtus[i + 1] <= mtu) - ++i; - if (idx) - *idx = i; - return mtus[i]; -} -EXPORT_SYMBOL(cxgb4_best_mtu); - -/** - * cxgb4_port_chan - get the HW channel of a port - * @dev: the net device for the port - * - * Return the HW Tx channel of the given port. - */ -unsigned int cxgb4_port_chan(const struct net_device *dev) -{ - return netdev2pinfo(dev)->tx_chan; -} -EXPORT_SYMBOL(cxgb4_port_chan); - -/** - * cxgb4_port_viid - get the VI id of a port - * @dev: the net device for the port - * - * Return the VI id of the given port. - */ -unsigned int cxgb4_port_viid(const struct net_device *dev) -{ - return netdev2pinfo(dev)->viid; -} -EXPORT_SYMBOL(cxgb4_port_viid); - -/** - * cxgb4_port_idx - get the index of a port - * @dev: the net device for the port - * - * Return the index of the given port. - */ -unsigned int cxgb4_port_idx(const struct net_device *dev) -{ - return netdev2pinfo(dev)->port_id; -} -EXPORT_SYMBOL(cxgb4_port_idx); - -/** - * cxgb4_netdev_by_hwid - return the net device of a HW port - * @pdev: identifies the adapter - * @id: the HW port id - * - * Return the net device associated with the interface with the given HW - * id. - */ -struct net_device *cxgb4_netdev_by_hwid(struct pci_dev *pdev, unsigned int id) -{ - const struct adapter *adap = pci_get_drvdata(pdev); - - if (!adap || id >= NCHAN) - return NULL; - id = adap->chan_map[id]; - return id < MAX_NPORTS ? adap->port[id] : NULL; -} -EXPORT_SYMBOL(cxgb4_netdev_by_hwid); - -void cxgb4_get_tcp_stats(struct pci_dev *pdev, struct tp_tcp_stats *v4, - struct tp_tcp_stats *v6) -{ - struct adapter *adap = pci_get_drvdata(pdev); - - spin_lock(&adap->stats_lock); - t4_tp_get_tcp_stats(adap, v4, v6); - spin_unlock(&adap->stats_lock); -} -EXPORT_SYMBOL(cxgb4_get_tcp_stats); - -void cxgb4_iscsi_init(struct net_device *dev, unsigned int tag_mask, - const unsigned int *pgsz_order) -{ - struct adapter *adap = netdev2adap(dev); - - t4_write_reg(adap, ULP_RX_ISCSI_TAGMASK, tag_mask); - t4_write_reg(adap, ULP_RX_ISCSI_PSZ, HPZ0(pgsz_order[0]) | - HPZ1(pgsz_order[1]) | HPZ2(pgsz_order[2]) | - HPZ3(pgsz_order[3])); -} -EXPORT_SYMBOL(cxgb4_iscsi_init); - -static struct pci_driver cxgb4_driver; - -static void check_neigh_update(struct neighbour *neigh) -{ - const struct device *parent; - const struct net_device *netdev = neigh->dev; - - if (netdev->priv_flags & IFF_802_1Q_VLAN) - netdev = vlan_dev_real_dev(netdev); - parent = netdev->dev.parent; - if (parent && parent->driver == &cxgb4_driver.driver) - t4_l2t_update(dev_get_drvdata(parent), neigh); -} - -static int netevent_cb(struct notifier_block *nb, unsigned long event, - void *data) -{ - switch (event) { - case NETEVENT_NEIGH_UPDATE: - check_neigh_update(data); - break; - case NETEVENT_PMTU_UPDATE: - case NETEVENT_REDIRECT: - default: - break; - } - return 0; -} - -static bool netevent_registered; -static struct notifier_block cxgb4_netevent_nb = { - .notifier_call = netevent_cb -}; - -static void uld_attach(struct adapter *adap, unsigned int uld) -{ - void *handle; - struct cxgb4_lld_info lli; - - lli.pdev = adap->pdev; - lli.l2t = adap->l2t; - lli.tids = &adap->tids; - lli.ports = adap->port; - lli.vr = &adap->vres; - lli.mtus = adap->params.mtus; - if (uld == CXGB4_ULD_RDMA) { - lli.rxq_ids = adap->sge.rdma_rxq; - lli.nrxq = adap->sge.rdmaqs; - } else if (uld == CXGB4_ULD_ISCSI) { - lli.rxq_ids = adap->sge.ofld_rxq; - lli.nrxq = adap->sge.ofldqsets; - } - lli.ntxq = adap->sge.ofldqsets; - lli.nchan = adap->params.nports; - lli.nports = adap->params.nports; - lli.wr_cred = adap->params.ofldq_wr_cred; - lli.adapter_type = adap->params.rev; - lli.iscsi_iolen = MAXRXDATA_GET(t4_read_reg(adap, TP_PARA_REG2)); - lli.udb_density = 1 << QUEUESPERPAGEPF0_GET( - t4_read_reg(adap, SGE_EGRESS_QUEUES_PER_PAGE_PF)); - lli.ucq_density = 1 << QUEUESPERPAGEPF0_GET( - t4_read_reg(adap, SGE_INGRESS_QUEUES_PER_PAGE_PF)); - lli.gts_reg = adap->regs + MYPF_REG(SGE_PF_GTS); - lli.db_reg = adap->regs + MYPF_REG(SGE_PF_KDOORBELL); - lli.fw_vers = adap->params.fw_vers; - - handle = ulds[uld].add(&lli); - if (IS_ERR(handle)) { - dev_warn(adap->pdev_dev, - "could not attach to the %s driver, error %ld\n", - uld_str[uld], PTR_ERR(handle)); - return; - } - - adap->uld_handle[uld] = handle; - - if (!netevent_registered) { - register_netevent_notifier(&cxgb4_netevent_nb); - netevent_registered = true; - } -} - -static void attach_ulds(struct adapter *adap) -{ - unsigned int i; - - mutex_lock(&uld_mutex); - list_add_tail(&adap->list_node, &adapter_list); - for (i = 0; i < CXGB4_ULD_MAX; i++) - if (ulds[i].add) - uld_attach(adap, i); - mutex_unlock(&uld_mutex); -} - -static void detach_ulds(struct adapter *adap) -{ - unsigned int i; - - mutex_lock(&uld_mutex); - list_del(&adap->list_node); - for (i = 0; i < CXGB4_ULD_MAX; i++) - if (adap->uld_handle[i]) { - ulds[i].state_change(adap->uld_handle[i], - CXGB4_STATE_DETACH); - adap->uld_handle[i] = NULL; - } - if (netevent_registered && list_empty(&adapter_list)) { - unregister_netevent_notifier(&cxgb4_netevent_nb); - netevent_registered = false; - } - mutex_unlock(&uld_mutex); -} - -static void notify_ulds(struct adapter *adap, enum cxgb4_state new_state) -{ - unsigned int i; - - mutex_lock(&uld_mutex); - for (i = 0; i < CXGB4_ULD_MAX; i++) - if (adap->uld_handle[i]) - ulds[i].state_change(adap->uld_handle[i], new_state); - mutex_unlock(&uld_mutex); -} - -/** - * cxgb4_register_uld - register an upper-layer driver - * @type: the ULD type - * @p: the ULD methods - * - * Registers an upper-layer driver with this driver and notifies the ULD - * about any presently available devices that support its type. Returns - * %-EBUSY if a ULD of the same type is already registered. - */ -int cxgb4_register_uld(enum cxgb4_uld type, const struct cxgb4_uld_info *p) -{ - int ret = 0; - struct adapter *adap; - - if (type >= CXGB4_ULD_MAX) - return -EINVAL; - mutex_lock(&uld_mutex); - if (ulds[type].add) { - ret = -EBUSY; - goto out; - } - ulds[type] = *p; - list_for_each_entry(adap, &adapter_list, list_node) - uld_attach(adap, type); -out: mutex_unlock(&uld_mutex); - return ret; -} -EXPORT_SYMBOL(cxgb4_register_uld); - -/** - * cxgb4_unregister_uld - unregister an upper-layer driver - * @type: the ULD type - * - * Unregisters an existing upper-layer driver. - */ -int cxgb4_unregister_uld(enum cxgb4_uld type) -{ - struct adapter *adap; - - if (type >= CXGB4_ULD_MAX) - return -EINVAL; - mutex_lock(&uld_mutex); - list_for_each_entry(adap, &adapter_list, list_node) - adap->uld_handle[type] = NULL; - ulds[type].add = NULL; - mutex_unlock(&uld_mutex); - return 0; -} -EXPORT_SYMBOL(cxgb4_unregister_uld); - -/** - * cxgb_up - enable the adapter - * @adap: adapter being enabled - * - * Called when the first port is enabled, this function performs the - * actions necessary to make an adapter operational, such as completing - * the initialization of HW modules, and enabling interrupts. - * - * Must be called with the rtnl lock held. - */ -static int cxgb_up(struct adapter *adap) -{ - int err = 0; - - if (!(adap->flags & FULL_INIT_DONE)) { - err = setup_sge_queues(adap); - if (err) - goto out; - err = setup_rss(adap); - if (err) { - t4_free_sge_resources(adap); - goto out; - } - if (adap->flags & USING_MSIX) - name_msix_vecs(adap); - adap->flags |= FULL_INIT_DONE; - } - - if (adap->flags & USING_MSIX) { - err = request_irq(adap->msix_info[0].vec, t4_nondata_intr, 0, - adap->msix_info[0].desc, adap); - if (err) - goto irq_err; - - err = request_msix_queue_irqs(adap); - if (err) { - free_irq(adap->msix_info[0].vec, adap); - goto irq_err; - } - } else { - err = request_irq(adap->pdev->irq, t4_intr_handler(adap), - (adap->flags & USING_MSI) ? 0 : IRQF_SHARED, - adap->name, adap); - if (err) - goto irq_err; - } - enable_rx(adap); - t4_sge_start(adap); - t4_intr_enable(adap); - notify_ulds(adap, CXGB4_STATE_UP); - out: - return err; - irq_err: - dev_err(adap->pdev_dev, "request_irq failed, err %d\n", err); - goto out; -} - -static void cxgb_down(struct adapter *adapter) -{ - t4_intr_disable(adapter); - cancel_work_sync(&adapter->tid_release_task); - adapter->tid_release_task_busy = false; - - if (adapter->flags & USING_MSIX) { - free_msix_queue_irqs(adapter); - free_irq(adapter->msix_info[0].vec, adapter); - } else - free_irq(adapter->pdev->irq, adapter); - quiesce_rx(adapter); -} - -/* - * net_device operations - */ -static int cxgb_open(struct net_device *dev) -{ - int err; - struct port_info *pi = netdev_priv(dev); - struct adapter *adapter = pi->adapter; - - if (!adapter->open_device_map && (err = cxgb_up(adapter)) < 0) - return err; - - dev->real_num_tx_queues = pi->nqsets; - set_bit(pi->tx_chan, &adapter->open_device_map); - link_start(dev); - netif_tx_start_all_queues(dev); - return 0; -} - -static int cxgb_close(struct net_device *dev) -{ - int ret; - struct port_info *pi = netdev_priv(dev); - struct adapter *adapter = pi->adapter; - - netif_tx_stop_all_queues(dev); - netif_carrier_off(dev); - ret = t4_enable_vi(adapter, 0, pi->viid, false, false); - - clear_bit(pi->tx_chan, &adapter->open_device_map); - - if (!adapter->open_device_map) - cxgb_down(adapter); - return 0; -} - -static struct net_device_stats *cxgb_get_stats(struct net_device *dev) -{ - struct port_stats stats; - struct port_info *p = netdev_priv(dev); - struct adapter *adapter = p->adapter; - struct net_device_stats *ns = &dev->stats; - - spin_lock(&adapter->stats_lock); - t4_get_port_stats(adapter, p->tx_chan, &stats); - spin_unlock(&adapter->stats_lock); - - ns->tx_bytes = stats.tx_octets; - ns->tx_packets = stats.tx_frames; - ns->rx_bytes = stats.rx_octets; - ns->rx_packets = stats.rx_frames; - ns->multicast = stats.rx_mcast_frames; - - /* detailed rx_errors */ - ns->rx_length_errors = stats.rx_jabber + stats.rx_too_long + - stats.rx_runt; - ns->rx_over_errors = 0; - ns->rx_crc_errors = stats.rx_fcs_err; - ns->rx_frame_errors = stats.rx_symbol_err; - ns->rx_fifo_errors = stats.rx_ovflow0 + stats.rx_ovflow1 + - stats.rx_ovflow2 + stats.rx_ovflow3 + - stats.rx_trunc0 + stats.rx_trunc1 + - stats.rx_trunc2 + stats.rx_trunc3; - ns->rx_missed_errors = 0; - - /* detailed tx_errors */ - ns->tx_aborted_errors = 0; - ns->tx_carrier_errors = 0; - ns->tx_fifo_errors = 0; - ns->tx_heartbeat_errors = 0; - ns->tx_window_errors = 0; - - ns->tx_errors = stats.tx_error_frames; - ns->rx_errors = stats.rx_symbol_err + stats.rx_fcs_err + - ns->rx_length_errors + stats.rx_len_err + ns->rx_fifo_errors; - return ns; -} - -static int cxgb_ioctl(struct net_device *dev, struct ifreq *req, int cmd) -{ - int ret = 0, prtad, devad; - struct port_info *pi = netdev_priv(dev); - struct mii_ioctl_data *data = (struct mii_ioctl_data *)&req->ifr_data; - - switch (cmd) { - case SIOCGMIIPHY: - if (pi->mdio_addr < 0) - return -EOPNOTSUPP; - data->phy_id = pi->mdio_addr; - break; - case SIOCGMIIREG: - case SIOCSMIIREG: - if (mdio_phy_id_is_c45(data->phy_id)) { - prtad = mdio_phy_id_prtad(data->phy_id); - devad = mdio_phy_id_devad(data->phy_id); - } else if (data->phy_id < 32) { - prtad = data->phy_id; - devad = 0; - data->reg_num &= 0x1f; - } else - return -EINVAL; - - if (cmd == SIOCGMIIREG) - ret = t4_mdio_rd(pi->adapter, 0, prtad, devad, - data->reg_num, &data->val_out); - else - ret = t4_mdio_wr(pi->adapter, 0, prtad, devad, - data->reg_num, data->val_in); - break; - default: - return -EOPNOTSUPP; - } - return ret; -} - -static void cxgb_set_rxmode(struct net_device *dev) -{ - /* unfortunately we can't return errors to the stack */ - set_rxmode(dev, -1, false); -} - -static int cxgb_change_mtu(struct net_device *dev, int new_mtu) -{ - int ret; - struct port_info *pi = netdev_priv(dev); - - if (new_mtu < 81 || new_mtu > MAX_MTU) /* accommodate SACK */ - return -EINVAL; - ret = t4_set_rxmode(pi->adapter, 0, pi->viid, new_mtu, -1, -1, -1, - true); - if (!ret) - dev->mtu = new_mtu; - return ret; -} - -static int cxgb_set_mac_addr(struct net_device *dev, void *p) -{ - int ret; - struct sockaddr *addr = p; - struct port_info *pi = netdev_priv(dev); - - if (!is_valid_ether_addr(addr->sa_data)) - return -EINVAL; - - ret = t4_change_mac(pi->adapter, 0, pi->viid, pi->xact_addr_filt, - addr->sa_data, true, true); - if (ret < 0) - return ret; - - memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); - pi->xact_addr_filt = ret; - return 0; -} - -static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp) -{ - struct port_info *pi = netdev_priv(dev); - - pi->vlan_grp = grp; - t4_set_vlan_accel(pi->adapter, 1 << pi->tx_chan, grp != NULL); -} - -#ifdef CONFIG_NET_POLL_CONTROLLER -static void cxgb_netpoll(struct net_device *dev) -{ - struct port_info *pi = netdev_priv(dev); - struct adapter *adap = pi->adapter; - - if (adap->flags & USING_MSIX) { - int i; - struct sge_eth_rxq *rx = &adap->sge.ethrxq[pi->first_qset]; - - for (i = pi->nqsets; i; i--, rx++) - t4_sge_intr_msix(0, &rx->rspq); - } else - t4_intr_handler(adap)(0, adap); -} -#endif - -static const struct net_device_ops cxgb4_netdev_ops = { - .ndo_open = cxgb_open, - .ndo_stop = cxgb_close, - .ndo_start_xmit = t4_eth_xmit, - .ndo_get_stats = cxgb_get_stats, - .ndo_set_rx_mode = cxgb_set_rxmode, - .ndo_set_mac_address = cxgb_set_mac_addr, - .ndo_validate_addr = eth_validate_addr, - .ndo_do_ioctl = cxgb_ioctl, - .ndo_change_mtu = cxgb_change_mtu, - .ndo_vlan_rx_register = vlan_rx_register, -#ifdef CONFIG_NET_POLL_CONTROLLER - .ndo_poll_controller = cxgb_netpoll, -#endif -}; - -void t4_fatal_err(struct adapter *adap) -{ - t4_set_reg_field(adap, SGE_CONTROL, GLOBALENABLE, 0); - t4_intr_disable(adap); - dev_alert(adap->pdev_dev, "encountered fatal error, adapter stopped\n"); -} - -static void setup_memwin(struct adapter *adap) -{ - u32 bar0; - - bar0 = pci_resource_start(adap->pdev, 0); /* truncation intentional */ - t4_write_reg(adap, PCIE_MEM_ACCESS_REG(PCIE_MEM_ACCESS_BASE_WIN, 0), - (bar0 + MEMWIN0_BASE) | BIR(0) | - WINDOW(ilog2(MEMWIN0_APERTURE) - 10)); - t4_write_reg(adap, PCIE_MEM_ACCESS_REG(PCIE_MEM_ACCESS_BASE_WIN, 1), - (bar0 + MEMWIN1_BASE) | BIR(0) | - WINDOW(ilog2(MEMWIN1_APERTURE) - 10)); - t4_write_reg(adap, PCIE_MEM_ACCESS_REG(PCIE_MEM_ACCESS_BASE_WIN, 2), - (bar0 + MEMWIN2_BASE) | BIR(0) | - WINDOW(ilog2(MEMWIN2_APERTURE) - 10)); -} - -/* - * Max # of ATIDs. The absolute HW max is 16K but we keep it lower. - */ -#define MAX_ATIDS 8192U - -/* - * Phase 0 of initialization: contact FW, obtain config, perform basic init. - */ -static int adap_init0(struct adapter *adap) -{ - int ret; - u32 v, port_vec; - enum dev_state state; - u32 params[7], val[7]; - struct fw_caps_config_cmd c; - - ret = t4_check_fw_version(adap); - if (ret == -EINVAL || ret > 0) { - if (upgrade_fw(adap) >= 0) /* recache FW version */ - ret = t4_check_fw_version(adap); - } - if (ret < 0) - return ret; - - /* contact FW, request master */ - ret = t4_fw_hello(adap, 0, 0, MASTER_MUST, &state); - if (ret < 0) { - dev_err(adap->pdev_dev, "could not connect to FW, error %d\n", - ret); - return ret; - } - - /* reset device */ - ret = t4_fw_reset(adap, 0, PIORSTMODE | PIORST); - if (ret < 0) - goto bye; - - /* get device capabilities */ - memset(&c, 0, sizeof(c)); - c.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | - FW_CMD_REQUEST | FW_CMD_READ); - c.retval_len16 = htonl(FW_LEN16(c)); - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), &c); - if (ret < 0) - goto bye; - - /* select capabilities we'll be using */ - if (c.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) { - if (!vf_acls) - c.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM); - else - c.niccaps = htons(FW_CAPS_CONFIG_NIC_VM); - } else if (vf_acls) { - dev_err(adap->pdev_dev, "virtualization ACLs not supported"); - goto bye; - } - c.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | - FW_CMD_REQUEST | FW_CMD_WRITE); - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), NULL); - if (ret < 0) - goto bye; - - ret = t4_config_glbl_rss(adap, 0, - FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL, - FW_RSS_GLB_CONFIG_CMD_TNLMAPEN | - FW_RSS_GLB_CONFIG_CMD_TNLALLLKP); - if (ret < 0) - goto bye; - - ret = t4_cfg_pfvf(adap, 0, 0, 0, 64, 64, 64, 0, 0, 4, 0xf, 0xf, 16, - FW_CMD_CAP_PF, FW_CMD_CAP_PF); - if (ret < 0) - goto bye; - - for (v = 0; v < SGE_NTIMERS - 1; v++) - adap->sge.timer_val[v] = min(intr_holdoff[v], MAX_SGE_TIMERVAL); - adap->sge.timer_val[SGE_NTIMERS - 1] = MAX_SGE_TIMERVAL; - adap->sge.counter_val[0] = 1; - for (v = 1; v < SGE_NCOUNTERS; v++) - adap->sge.counter_val[v] = min(intr_cnt[v - 1], - THRESHOLD_3_MASK); - t4_sge_init(adap); - - /* get basic stuff going */ - ret = t4_early_init(adap, 0); - if (ret < 0) - goto bye; - -#define FW_PARAM_DEV(param) \ - (FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | \ - FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param)) - -#define FW_PARAM_PFVF(param) \ - (FW_PARAMS_MNEM(FW_PARAMS_MNEM_PFVF) | \ - FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_PFVF_##param)) - - params[0] = FW_PARAM_DEV(PORTVEC); - params[1] = FW_PARAM_PFVF(L2T_START); - params[2] = FW_PARAM_PFVF(L2T_END); - params[3] = FW_PARAM_PFVF(FILTER_START); - params[4] = FW_PARAM_PFVF(FILTER_END); - ret = t4_query_params(adap, 0, 0, 0, 5, params, val); - if (ret < 0) - goto bye; - port_vec = val[0]; - adap->tids.ftid_base = val[3]; - adap->tids.nftids = val[4] - val[3] + 1; - - if (c.ofldcaps) { - /* query offload-related parameters */ - params[0] = FW_PARAM_DEV(NTID); - params[1] = FW_PARAM_PFVF(SERVER_START); - params[2] = FW_PARAM_PFVF(SERVER_END); - params[3] = FW_PARAM_PFVF(TDDP_START); - params[4] = FW_PARAM_PFVF(TDDP_END); - params[5] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ); - ret = t4_query_params(adap, 0, 0, 0, 6, params, val); - if (ret < 0) - goto bye; - adap->tids.ntids = val[0]; - adap->tids.natids = min(adap->tids.ntids / 2, MAX_ATIDS); - adap->tids.stid_base = val[1]; - adap->tids.nstids = val[2] - val[1] + 1; - adap->vres.ddp.start = val[3]; - adap->vres.ddp.size = val[4] - val[3] + 1; - adap->params.ofldq_wr_cred = val[5]; - adap->params.offload = 1; - } - if (c.rdmacaps) { - params[0] = FW_PARAM_PFVF(STAG_START); - params[1] = FW_PARAM_PFVF(STAG_END); - params[2] = FW_PARAM_PFVF(RQ_START); - params[3] = FW_PARAM_PFVF(RQ_END); - params[4] = FW_PARAM_PFVF(PBL_START); - params[5] = FW_PARAM_PFVF(PBL_END); - ret = t4_query_params(adap, 0, 0, 0, 6, params, val); - if (ret < 0) - goto bye; - adap->vres.stag.start = val[0]; - adap->vres.stag.size = val[1] - val[0] + 1; - adap->vres.rq.start = val[2]; - adap->vres.rq.size = val[3] - val[2] + 1; - adap->vres.pbl.start = val[4]; - adap->vres.pbl.size = val[5] - val[4] + 1; - } - if (c.iscsicaps) { - params[0] = FW_PARAM_PFVF(ISCSI_START); - params[1] = FW_PARAM_PFVF(ISCSI_END); - ret = t4_query_params(adap, 0, 0, 0, 2, params, val); - if (ret < 0) - goto bye; - adap->vres.iscsi.start = val[0]; - adap->vres.iscsi.size = val[1] - val[0] + 1; - } -#undef FW_PARAM_PFVF -#undef FW_PARAM_DEV - - adap->params.nports = hweight32(port_vec); - adap->params.portvec = port_vec; - adap->flags |= FW_OK; - - /* These are finalized by FW initialization, load their values now */ - v = t4_read_reg(adap, TP_TIMER_RESOLUTION); - adap->params.tp.tre = TIMERRESOLUTION_GET(v); - t4_read_mtu_tbl(adap, adap->params.mtus, NULL); - t4_load_mtus(adap, adap->params.mtus, adap->params.a_wnd, - adap->params.b_wnd); - - /* tweak some settings */ - t4_write_reg(adap, TP_SHIFT_CNT, 0x64f8849); - t4_write_reg(adap, ULP_RX_TDDP_PSZ, HPZ0(PAGE_SHIFT - 12)); - t4_write_reg(adap, TP_PIO_ADDR, TP_INGRESS_CONFIG); - v = t4_read_reg(adap, TP_PIO_DATA); - t4_write_reg(adap, TP_PIO_DATA, v & ~CSUM_HAS_PSEUDO_HDR); - setup_memwin(adap); - return 0; - - /* - * If a command timed out or failed with EIO FW does not operate within - * its spec or something catastrophic happened to HW/FW, stop issuing - * commands. - */ -bye: if (ret != -ETIMEDOUT && ret != -EIO) - t4_fw_bye(adap, 0); - return ret; -} - -static inline bool is_10g_port(const struct link_config *lc) -{ - return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0; -} - -static inline void init_rspq(struct sge_rspq *q, u8 timer_idx, u8 pkt_cnt_idx, - unsigned int size, unsigned int iqe_size) -{ - q->intr_params = QINTR_TIMER_IDX(timer_idx) | - (pkt_cnt_idx < SGE_NCOUNTERS ? QINTR_CNT_EN : 0); - q->pktcnt_idx = pkt_cnt_idx < SGE_NCOUNTERS ? pkt_cnt_idx : 0; - q->iqe_len = iqe_size; - q->size = size; -} - -/* - * Perform default configuration of DMA queues depending on the number and type - * of ports we found and the number of available CPUs. Most settings can be - * modified by the admin prior to actual use. - */ -static void __devinit cfg_queues(struct adapter *adap) -{ - struct sge *s = &adap->sge; - int i, q10g = 0, n10g = 0, qidx = 0; - - for_each_port(adap, i) - n10g += is_10g_port(&adap2pinfo(adap, i)->link_cfg); - - /* - * We default to 1 queue per non-10G port and up to # of cores queues - * per 10G port. - */ - if (n10g) - q10g = (MAX_ETH_QSETS - (adap->params.nports - n10g)) / n10g; - if (q10g > num_online_cpus()) - q10g = num_online_cpus(); - - for_each_port(adap, i) { - struct port_info *pi = adap2pinfo(adap, i); - - pi->first_qset = qidx; - pi->nqsets = is_10g_port(&pi->link_cfg) ? q10g : 1; - qidx += pi->nqsets; - } - - s->ethqsets = qidx; - s->max_ethqsets = qidx; /* MSI-X may lower it later */ - - if (is_offload(adap)) { - /* - * For offload we use 1 queue/channel if all ports are up to 1G, - * otherwise we divide all available queues amongst the channels - * capped by the number of available cores. - */ - if (n10g) { - i = min_t(int, ARRAY_SIZE(s->ofldrxq), - num_online_cpus()); - s->ofldqsets = roundup(i, adap->params.nports); - } else - s->ofldqsets = adap->params.nports; - /* For RDMA one Rx queue per channel suffices */ - s->rdmaqs = adap->params.nports; - } - - for (i = 0; i < ARRAY_SIZE(s->ethrxq); i++) { - struct sge_eth_rxq *r = &s->ethrxq[i]; - - init_rspq(&r->rspq, 0, 0, 1024, 64); - r->fl.size = 72; - } - - for (i = 0; i < ARRAY_SIZE(s->ethtxq); i++) - s->ethtxq[i].q.size = 1024; - - for (i = 0; i < ARRAY_SIZE(s->ctrlq); i++) - s->ctrlq[i].q.size = 512; - - for (i = 0; i < ARRAY_SIZE(s->ofldtxq); i++) - s->ofldtxq[i].q.size = 1024; - - for (i = 0; i < ARRAY_SIZE(s->ofldrxq); i++) { - struct sge_ofld_rxq *r = &s->ofldrxq[i]; - - init_rspq(&r->rspq, 0, 0, 1024, 64); - r->rspq.uld = CXGB4_ULD_ISCSI; - r->fl.size = 72; - } - - for (i = 0; i < ARRAY_SIZE(s->rdmarxq); i++) { - struct sge_ofld_rxq *r = &s->rdmarxq[i]; - - init_rspq(&r->rspq, 0, 0, 511, 64); - r->rspq.uld = CXGB4_ULD_RDMA; - r->fl.size = 72; - } - - init_rspq(&s->fw_evtq, 6, 0, 512, 64); - init_rspq(&s->intrq, 6, 0, 2 * MAX_INGQ, 64); -} - -/* - * Reduce the number of Ethernet queues across all ports to at most n. - * n provides at least one queue per port. - */ -static void __devinit reduce_ethqs(struct adapter *adap, int n) -{ - int i; - struct port_info *pi; - - while (n < adap->sge.ethqsets) - for_each_port(adap, i) { - pi = adap2pinfo(adap, i); - if (pi->nqsets > 1) { - pi->nqsets--; - adap->sge.ethqsets--; - if (adap->sge.ethqsets <= n) - break; - } - } - - n = 0; - for_each_port(adap, i) { - pi = adap2pinfo(adap, i); - pi->first_qset = n; - n += pi->nqsets; - } -} - -/* 2 MSI-X vectors needed for the FW queue and non-data interrupts */ -#define EXTRA_VECS 2 - -static int __devinit enable_msix(struct adapter *adap) -{ - int ofld_need = 0; - int i, err, want, need; - struct sge *s = &adap->sge; - unsigned int nchan = adap->params.nports; - struct msix_entry entries[MAX_INGQ + 1]; - - for (i = 0; i < ARRAY_SIZE(entries); ++i) - entries[i].entry = i; - - want = s->max_ethqsets + EXTRA_VECS; - if (is_offload(adap)) { - want += s->rdmaqs + s->ofldqsets; - /* need nchan for each possible ULD */ - ofld_need = 2 * nchan; - } - need = adap->params.nports + EXTRA_VECS + ofld_need; - - while ((err = pci_enable_msix(adap->pdev, entries, want)) >= need) - want = err; - - if (!err) { - /* - * Distribute available vectors to the various queue groups. - * Every group gets its minimum requirement and NIC gets top - * priority for leftovers. - */ - i = want - EXTRA_VECS - ofld_need; - if (i < s->max_ethqsets) { - s->max_ethqsets = i; - if (i < s->ethqsets) - reduce_ethqs(adap, i); - } - if (is_offload(adap)) { - i = want - EXTRA_VECS - s->max_ethqsets; - i -= ofld_need - nchan; - s->ofldqsets = (i / nchan) * nchan; /* round down */ - } - for (i = 0; i < want; ++i) - adap->msix_info[i].vec = entries[i].vector; - } else if (err > 0) - dev_info(adap->pdev_dev, - "only %d MSI-X vectors left, not using MSI-X\n", err); - return err; -} - -#undef EXTRA_VECS - -static void __devinit print_port_info(struct adapter *adap) -{ - static const char *base[] = { - "R", "KX4", "T", "KX", "T", "KR", "CX4" - }; - - int i; - char buf[80]; - - for_each_port(adap, i) { - struct net_device *dev = adap->port[i]; - const struct port_info *pi = netdev_priv(dev); - char *bufp = buf; - - if (!test_bit(i, &adap->registered_device_map)) - continue; - - if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100M) - bufp += sprintf(bufp, "100/"); - if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) - bufp += sprintf(bufp, "1000/"); - if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) - bufp += sprintf(bufp, "10G/"); - if (bufp != buf) - --bufp; - sprintf(bufp, "BASE-%s", base[pi->port_type]); - - netdev_info(dev, "Chelsio %s rev %d %s %sNIC PCIe x%d%s\n", - adap->params.vpd.id, adap->params.rev, - buf, is_offload(adap) ? "R" : "", - adap->params.pci.width, - (adap->flags & USING_MSIX) ? " MSI-X" : - (adap->flags & USING_MSI) ? " MSI" : ""); - if (adap->name == dev->name) - netdev_info(dev, "S/N: %s, E/C: %s\n", - adap->params.vpd.sn, adap->params.vpd.ec); - } -} - -#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO | NETIF_F_TSO6 |\ - NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA) - -static int __devinit init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - int func, i, err; - struct port_info *pi; - unsigned int highdma = 0; - struct adapter *adapter = NULL; - - printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION); - - err = pci_request_regions(pdev, KBUILD_MODNAME); - if (err) { - /* Just info, some other driver may have claimed the device. */ - dev_info(&pdev->dev, "cannot obtain PCI resources\n"); - return err; - } - - /* We control everything through PF 0 */ - func = PCI_FUNC(pdev->devfn); - if (func > 0) - goto sriov; - - err = pci_enable_device(pdev); - if (err) { - dev_err(&pdev->dev, "cannot enable PCI device\n"); - goto out_release_regions; - } - - if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { - highdma = NETIF_F_HIGHDMA; - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (err) { - dev_err(&pdev->dev, "unable to obtain 64-bit DMA for " - "coherent allocations\n"); - goto out_disable_device; - } - } else { - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (err) { - dev_err(&pdev->dev, "no usable DMA configuration\n"); - goto out_disable_device; - } - } - - pci_enable_pcie_error_reporting(pdev); - pci_set_master(pdev); - pci_save_state(pdev); - - adapter = kzalloc(sizeof(*adapter), GFP_KERNEL); - if (!adapter) { - err = -ENOMEM; - goto out_disable_device; - } - - adapter->regs = pci_ioremap_bar(pdev, 0); - if (!adapter->regs) { - dev_err(&pdev->dev, "cannot map device registers\n"); - err = -ENOMEM; - goto out_free_adapter; - } - - adapter->pdev = pdev; - adapter->pdev_dev = &pdev->dev; - adapter->name = pci_name(pdev); - adapter->msg_enable = dflt_msg_enable; - memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map)); - - spin_lock_init(&adapter->stats_lock); - spin_lock_init(&adapter->tid_release_lock); - - INIT_WORK(&adapter->tid_release_task, process_tid_release_list); - - err = t4_prep_adapter(adapter); - if (err) - goto out_unmap_bar; - err = adap_init0(adapter); - if (err) - goto out_unmap_bar; - - for_each_port(adapter, i) { - struct net_device *netdev; - - netdev = alloc_etherdev_mq(sizeof(struct port_info), - MAX_ETH_QSETS); - if (!netdev) { - err = -ENOMEM; - goto out_free_dev; - } - - SET_NETDEV_DEV(netdev, &pdev->dev); - - adapter->port[i] = netdev; - pi = netdev_priv(netdev); - pi->adapter = adapter; - pi->xact_addr_filt = -1; - pi->rx_offload = RX_CSO; - pi->port_id = i; - netif_carrier_off(netdev); - netif_tx_stop_all_queues(netdev); - netdev->irq = pdev->irq; - - netdev->features |= NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6; - netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; - netdev->features |= NETIF_F_GRO | highdma; - netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; - netdev->vlan_features = netdev->features & VLAN_FEAT; - - netdev->netdev_ops = &cxgb4_netdev_ops; - SET_ETHTOOL_OPS(netdev, &cxgb_ethtool_ops); - } - - pci_set_drvdata(pdev, adapter); - - if (adapter->flags & FW_OK) { - err = t4_port_init(adapter, 0, 0, 0); - if (err) - goto out_free_dev; - } - - /* - * Configure queues and allocate tables now, they can be needed as - * soon as the first register_netdev completes. - */ - cfg_queues(adapter); - - adapter->l2t = t4_init_l2t(); - if (!adapter->l2t) { - /* We tolerate a lack of L2T, giving up some functionality */ - dev_warn(&pdev->dev, "could not allocate L2T, continuing\n"); - adapter->params.offload = 0; - } - - if (is_offload(adapter) && tid_init(&adapter->tids) < 0) { - dev_warn(&pdev->dev, "could not allocate TID table, " - "continuing\n"); - adapter->params.offload = 0; - } - - /* - * The card is now ready to go. If any errors occur during device - * registration we do not fail the whole card but rather proceed only - * with the ports we manage to register successfully. However we must - * register at least one net device. - */ - for_each_port(adapter, i) { - err = register_netdev(adapter->port[i]); - if (err) - dev_warn(&pdev->dev, - "cannot register net device %s, skipping\n", - adapter->port[i]->name); - else { - /* - * Change the name we use for messages to the name of - * the first successfully registered interface. - */ - if (!adapter->registered_device_map) - adapter->name = adapter->port[i]->name; - - __set_bit(i, &adapter->registered_device_map); - adapter->chan_map[adap2pinfo(adapter, i)->tx_chan] = i; - } - } - if (!adapter->registered_device_map) { - dev_err(&pdev->dev, "could not register any net devices\n"); - goto out_free_dev; - } - - if (cxgb4_debugfs_root) { - adapter->debugfs_root = debugfs_create_dir(pci_name(pdev), - cxgb4_debugfs_root); - setup_debugfs(adapter); - } - - /* See what interrupts we'll be using */ - if (msi > 1 && enable_msix(adapter) == 0) - adapter->flags |= USING_MSIX; - else if (msi > 0 && pci_enable_msi(pdev) == 0) - adapter->flags |= USING_MSI; - - if (is_offload(adapter)) - attach_ulds(adapter); - - print_port_info(adapter); - -sriov: -#ifdef CONFIG_PCI_IOV - if (func < ARRAY_SIZE(num_vf) && num_vf[func] > 0) - if (pci_enable_sriov(pdev, num_vf[func]) == 0) - dev_info(&pdev->dev, - "instantiated %u virtual functions\n", - num_vf[func]); -#endif - return 0; - - out_free_dev: - t4_free_mem(adapter->tids.tid_tab); - t4_free_mem(adapter->l2t); - for_each_port(adapter, i) - if (adapter->port[i]) - free_netdev(adapter->port[i]); - if (adapter->flags & FW_OK) - t4_fw_bye(adapter, 0); - out_unmap_bar: - iounmap(adapter->regs); - out_free_adapter: - kfree(adapter); - out_disable_device: - pci_disable_pcie_error_reporting(pdev); - pci_disable_device(pdev); - out_release_regions: - pci_release_regions(pdev); - pci_set_drvdata(pdev, NULL); - return err; -} - -static void __devexit remove_one(struct pci_dev *pdev) -{ - struct adapter *adapter = pci_get_drvdata(pdev); - - pci_disable_sriov(pdev); - - if (adapter) { - int i; - - if (is_offload(adapter)) - detach_ulds(adapter); - - for_each_port(adapter, i) - if (test_bit(i, &adapter->registered_device_map)) - unregister_netdev(adapter->port[i]); - - if (adapter->debugfs_root) - debugfs_remove_recursive(adapter->debugfs_root); - - t4_sge_stop(adapter); - t4_free_sge_resources(adapter); - t4_free_mem(adapter->l2t); - t4_free_mem(adapter->tids.tid_tab); - disable_msi(adapter); - - for_each_port(adapter, i) - if (adapter->port[i]) - free_netdev(adapter->port[i]); - - if (adapter->flags & FW_OK) - t4_fw_bye(adapter, 0); - iounmap(adapter->regs); - kfree(adapter); - pci_disable_pcie_error_reporting(pdev); - pci_disable_device(pdev); - pci_release_regions(pdev); - pci_set_drvdata(pdev, NULL); - } else if (PCI_FUNC(pdev->devfn) > 0) - pci_release_regions(pdev); -} - -static struct pci_driver cxgb4_driver = { - .name = KBUILD_MODNAME, - .id_table = cxgb4_pci_tbl, - .probe = init_one, - .remove = __devexit_p(remove_one), -}; - -static int __init cxgb4_init_module(void) -{ - int ret; - - /* Debugfs support is optional, just warn if this fails */ - cxgb4_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); - if (!cxgb4_debugfs_root) - pr_warning("could not create debugfs entry, continuing\n"); - - ret = pci_register_driver(&cxgb4_driver); - if (ret < 0) - debugfs_remove(cxgb4_debugfs_root); - return ret; -} - -static void __exit cxgb4_cleanup_module(void) -{ - pci_unregister_driver(&cxgb4_driver); - debugfs_remove(cxgb4_debugfs_root); /* NULL ok */ -} - -module_init(cxgb4_init_module); -module_exit(cxgb4_cleanup_module); diff --git a/trunk/drivers/net/cxgb4/cxgb4_uld.h b/trunk/drivers/net/cxgb4/cxgb4_uld.h deleted file mode 100644 index 5b98546ac92d..000000000000 --- a/trunk/drivers/net/cxgb4/cxgb4_uld.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __CXGB4_OFLD_H -#define __CXGB4_OFLD_H - -#include -#include -#include -#include - -/* CPL message priority levels */ -enum { - CPL_PRIORITY_DATA = 0, /* data messages */ - CPL_PRIORITY_SETUP = 1, /* connection setup messages */ - CPL_PRIORITY_TEARDOWN = 0, /* connection teardown messages */ - CPL_PRIORITY_LISTEN = 1, /* listen start/stop messages */ - CPL_PRIORITY_ACK = 1, /* RX ACK messages */ - CPL_PRIORITY_CONTROL = 1 /* control messages */ -}; - -#define INIT_TP_WR(w, tid) do { \ - (w)->wr.wr_hi = htonl(FW_WR_OP(FW_TP_WR) | \ - FW_WR_IMMDLEN(sizeof(*w) - sizeof(w->wr))); \ - (w)->wr.wr_mid = htonl(FW_WR_LEN16(DIV_ROUND_UP(sizeof(*w), 16)) | \ - FW_WR_FLOWID(tid)); \ - (w)->wr.wr_lo = cpu_to_be64(0); \ -} while (0) - -#define INIT_TP_WR_CPL(w, cpl, tid) do { \ - INIT_TP_WR(w, tid); \ - OPCODE_TID(w) = htonl(MK_OPCODE_TID(cpl, tid)); \ -} while (0) - -#define INIT_ULPTX_WR(w, wrlen, atomic, tid) do { \ - (w)->wr.wr_hi = htonl(FW_WR_OP(FW_ULPTX_WR) | FW_WR_ATOMIC(atomic)); \ - (w)->wr.wr_mid = htonl(FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \ - FW_WR_FLOWID(tid)); \ - (w)->wr.wr_lo = cpu_to_be64(0); \ -} while (0) - -/* Special asynchronous notification message */ -#define CXGB4_MSG_AN ((void *)1) - -struct serv_entry { - void *data; -}; - -union aopen_entry { - void *data; - union aopen_entry *next; -}; - -/* - * Holds the size, base address, free list start, etc of the TID, server TID, - * and active-open TID tables. The tables themselves are allocated dynamically. - */ -struct tid_info { - void **tid_tab; - unsigned int ntids; - - struct serv_entry *stid_tab; - unsigned long *stid_bmap; - unsigned int nstids; - unsigned int stid_base; - - union aopen_entry *atid_tab; - unsigned int natids; - - unsigned int nftids; - unsigned int ftid_base; - - spinlock_t atid_lock ____cacheline_aligned_in_smp; - union aopen_entry *afree; - unsigned int atids_in_use; - - spinlock_t stid_lock; - unsigned int stids_in_use; - - atomic_t tids_in_use; -}; - -static inline void *lookup_tid(const struct tid_info *t, unsigned int tid) -{ - return tid < t->ntids ? t->tid_tab[tid] : NULL; -} - -static inline void *lookup_atid(const struct tid_info *t, unsigned int atid) -{ - return atid < t->natids ? t->atid_tab[atid].data : NULL; -} - -static inline void *lookup_stid(const struct tid_info *t, unsigned int stid) -{ - stid -= t->stid_base; - return stid < t->nstids ? t->stid_tab[stid].data : NULL; -} - -static inline void cxgb4_insert_tid(struct tid_info *t, void *data, - unsigned int tid) -{ - t->tid_tab[tid] = data; - atomic_inc(&t->tids_in_use); -} - -int cxgb4_alloc_atid(struct tid_info *t, void *data); -int cxgb4_alloc_stid(struct tid_info *t, int family, void *data); -void cxgb4_free_atid(struct tid_info *t, unsigned int atid); -void cxgb4_free_stid(struct tid_info *t, unsigned int stid, int family); -void cxgb4_remove_tid(struct tid_info *t, unsigned int qid, unsigned int tid); -void cxgb4_queue_tid_release(struct tid_info *t, unsigned int chan, - unsigned int tid); - -struct in6_addr; - -int cxgb4_create_server(const struct net_device *dev, unsigned int stid, - __be32 sip, __be16 sport, unsigned int queue); -int cxgb4_create_server6(const struct net_device *dev, unsigned int stid, - const struct in6_addr *sip, __be16 sport, - unsigned int queue); - -static inline void set_wr_txq(struct sk_buff *skb, int prio, int queue) -{ - skb_set_queue_mapping(skb, (queue << 1) | prio); -} - -enum cxgb4_uld { - CXGB4_ULD_RDMA, - CXGB4_ULD_ISCSI, - CXGB4_ULD_MAX -}; - -enum cxgb4_state { - CXGB4_STATE_UP, - CXGB4_STATE_START_RECOVERY, - CXGB4_STATE_DOWN, - CXGB4_STATE_DETACH -}; - -struct pci_dev; -struct l2t_data; -struct net_device; -struct pkt_gl; -struct tp_tcp_stats; - -struct cxgb4_range { - unsigned int start; - unsigned int size; -}; - -struct cxgb4_virt_res { /* virtualized HW resources */ - struct cxgb4_range ddp; - struct cxgb4_range iscsi; - struct cxgb4_range stag; - struct cxgb4_range rq; - struct cxgb4_range pbl; -}; - -/* - * Block of information the LLD provides to ULDs attaching to a device. - */ -struct cxgb4_lld_info { - struct pci_dev *pdev; /* associated PCI device */ - struct l2t_data *l2t; /* L2 table */ - struct tid_info *tids; /* TID table */ - struct net_device **ports; /* device ports */ - const struct cxgb4_virt_res *vr; /* assorted HW resources */ - const unsigned short *mtus; /* MTU table */ - const unsigned short *rxq_ids; /* the ULD's Rx queue ids */ - unsigned short nrxq; /* # of Rx queues */ - unsigned short ntxq; /* # of Tx queues */ - unsigned char nchan:4; /* # of channels */ - unsigned char nports:4; /* # of ports */ - unsigned char wr_cred; /* WR 16-byte credits */ - unsigned char adapter_type; /* type of adapter */ - unsigned char fw_api_ver; /* FW API version */ - unsigned int fw_vers; /* FW version */ - unsigned int iscsi_iolen; /* iSCSI max I/O length */ - unsigned short udb_density; /* # of user DB/page */ - unsigned short ucq_density; /* # of user CQs/page */ - void __iomem *gts_reg; /* address of GTS register */ - void __iomem *db_reg; /* address of kernel doorbell */ -}; - -struct cxgb4_uld_info { - const char *name; - void *(*add)(const struct cxgb4_lld_info *p); - int (*rx_handler)(void *handle, const __be64 *rsp, - const struct pkt_gl *gl); - int (*state_change)(void *handle, enum cxgb4_state new_state); -}; - -int cxgb4_register_uld(enum cxgb4_uld type, const struct cxgb4_uld_info *p); -int cxgb4_unregister_uld(enum cxgb4_uld type); -int cxgb4_ofld_send(struct net_device *dev, struct sk_buff *skb); -unsigned int cxgb4_port_chan(const struct net_device *dev); -unsigned int cxgb4_port_viid(const struct net_device *dev); -unsigned int cxgb4_port_idx(const struct net_device *dev); -struct net_device *cxgb4_netdev_by_hwid(struct pci_dev *pdev, unsigned int id); -unsigned int cxgb4_best_mtu(const unsigned short *mtus, unsigned short mtu, - unsigned int *idx); -void cxgb4_get_tcp_stats(struct pci_dev *pdev, struct tp_tcp_stats *v4, - struct tp_tcp_stats *v6); -void cxgb4_iscsi_init(struct net_device *dev, unsigned int tag_mask, - const unsigned int *pgsz_order); -struct sk_buff *cxgb4_pktgl_to_skb(const struct pkt_gl *gl, - unsigned int skb_len, unsigned int pull_len); -#endif /* !__CXGB4_OFLD_H */ diff --git a/trunk/drivers/net/cxgb4/l2t.c b/trunk/drivers/net/cxgb4/l2t.c deleted file mode 100644 index 9f96724a133a..000000000000 --- a/trunk/drivers/net/cxgb4/l2t.c +++ /dev/null @@ -1,624 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include -#include "cxgb4.h" -#include "l2t.h" -#include "t4_msg.h" -#include "t4fw_api.h" - -#define VLAN_NONE 0xfff - -/* identifies sync vs async L2T_WRITE_REQs */ -#define F_SYNC_WR (1 << 12) - -enum { - L2T_STATE_VALID, /* entry is up to date */ - L2T_STATE_STALE, /* entry may be used but needs revalidation */ - L2T_STATE_RESOLVING, /* entry needs address resolution */ - L2T_STATE_SYNC_WRITE, /* synchronous write of entry underway */ - - /* when state is one of the below the entry is not hashed */ - L2T_STATE_SWITCHING, /* entry is being used by a switching filter */ - L2T_STATE_UNUSED /* entry not in use */ -}; - -struct l2t_data { - rwlock_t lock; - atomic_t nfree; /* number of free entries */ - struct l2t_entry *rover; /* starting point for next allocation */ - struct l2t_entry l2tab[L2T_SIZE]; -}; - -static inline unsigned int vlan_prio(const struct l2t_entry *e) -{ - return e->vlan >> 13; -} - -static inline void l2t_hold(struct l2t_data *d, struct l2t_entry *e) -{ - if (atomic_add_return(1, &e->refcnt) == 1) /* 0 -> 1 transition */ - atomic_dec(&d->nfree); -} - -/* - * To avoid having to check address families we do not allow v4 and v6 - * neighbors to be on the same hash chain. We keep v4 entries in the first - * half of available hash buckets and v6 in the second. - */ -enum { - L2T_SZ_HALF = L2T_SIZE / 2, - L2T_HASH_MASK = L2T_SZ_HALF - 1 -}; - -static inline unsigned int arp_hash(const u32 *key, int ifindex) -{ - return jhash_2words(*key, ifindex, 0) & L2T_HASH_MASK; -} - -static inline unsigned int ipv6_hash(const u32 *key, int ifindex) -{ - u32 xor = key[0] ^ key[1] ^ key[2] ^ key[3]; - - return L2T_SZ_HALF + (jhash_2words(xor, ifindex, 0) & L2T_HASH_MASK); -} - -static unsigned int addr_hash(const u32 *addr, int addr_len, int ifindex) -{ - return addr_len == 4 ? arp_hash(addr, ifindex) : - ipv6_hash(addr, ifindex); -} - -/* - * Checks if an L2T entry is for the given IP/IPv6 address. It does not check - * whether the L2T entry and the address are of the same address family. - * Callers ensure an address is only checked against L2T entries of the same - * family, something made trivial by the separation of IP and IPv6 hash chains - * mentioned above. Returns 0 if there's a match, - */ -static int addreq(const struct l2t_entry *e, const u32 *addr) -{ - if (e->v6) - return (e->addr[0] ^ addr[0]) | (e->addr[1] ^ addr[1]) | - (e->addr[2] ^ addr[2]) | (e->addr[3] ^ addr[3]); - return e->addr[0] ^ addr[0]; -} - -static void neigh_replace(struct l2t_entry *e, struct neighbour *n) -{ - neigh_hold(n); - if (e->neigh) - neigh_release(e->neigh); - e->neigh = n; -} - -/* - * Write an L2T entry. Must be called with the entry locked. - * The write may be synchronous or asynchronous. - */ -static int write_l2e(struct adapter *adap, struct l2t_entry *e, int sync) -{ - struct sk_buff *skb; - struct cpl_l2t_write_req *req; - - skb = alloc_skb(sizeof(*req), GFP_ATOMIC); - if (!skb) - return -ENOMEM; - - req = (struct cpl_l2t_write_req *)__skb_put(skb, sizeof(*req)); - INIT_TP_WR(req, 0); - - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, - e->idx | (sync ? F_SYNC_WR : 0) | - TID_QID(adap->sge.fw_evtq.abs_id))); - req->params = htons(L2T_W_PORT(e->lport) | L2T_W_NOREPLY(!sync)); - req->l2t_idx = htons(e->idx); - req->vlan = htons(e->vlan); - if (e->neigh) - memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac)); - memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); - - set_wr_txq(skb, CPL_PRIORITY_CONTROL, 0); - t4_ofld_send(adap, skb); - - if (sync && e->state != L2T_STATE_SWITCHING) - e->state = L2T_STATE_SYNC_WRITE; - return 0; -} - -/* - * Send packets waiting in an L2T entry's ARP queue. Must be called with the - * entry locked. - */ -static void send_pending(struct adapter *adap, struct l2t_entry *e) -{ - while (e->arpq_head) { - struct sk_buff *skb = e->arpq_head; - - e->arpq_head = skb->next; - skb->next = NULL; - t4_ofld_send(adap, skb); - } - e->arpq_tail = NULL; -} - -/* - * Process a CPL_L2T_WRITE_RPL. Wake up the ARP queue if it completes a - * synchronous L2T_WRITE. Note that the TID in the reply is really the L2T - * index it refers to. - */ -void do_l2t_write_rpl(struct adapter *adap, const struct cpl_l2t_write_rpl *rpl) -{ - unsigned int tid = GET_TID(rpl); - unsigned int idx = tid & (L2T_SIZE - 1); - - if (unlikely(rpl->status != CPL_ERR_NONE)) { - dev_err(adap->pdev_dev, - "Unexpected L2T_WRITE_RPL status %u for entry %u\n", - rpl->status, idx); - return; - } - - if (tid & F_SYNC_WR) { - struct l2t_entry *e = &adap->l2t->l2tab[idx]; - - spin_lock(&e->lock); - if (e->state != L2T_STATE_SWITCHING) { - send_pending(adap, e); - e->state = (e->neigh->nud_state & NUD_STALE) ? - L2T_STATE_STALE : L2T_STATE_VALID; - } - spin_unlock(&e->lock); - } -} - -/* - * Add a packet to an L2T entry's queue of packets awaiting resolution. - * Must be called with the entry's lock held. - */ -static inline void arpq_enqueue(struct l2t_entry *e, struct sk_buff *skb) -{ - skb->next = NULL; - if (e->arpq_head) - e->arpq_tail->next = skb; - else - e->arpq_head = skb; - e->arpq_tail = skb; -} - -int cxgb4_l2t_send(struct net_device *dev, struct sk_buff *skb, - struct l2t_entry *e) -{ - struct adapter *adap = netdev2adap(dev); - -again: - switch (e->state) { - case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ - neigh_event_send(e->neigh, NULL); - spin_lock_bh(&e->lock); - if (e->state == L2T_STATE_STALE) - e->state = L2T_STATE_VALID; - spin_unlock_bh(&e->lock); - case L2T_STATE_VALID: /* fast-path, send the packet on */ - return t4_ofld_send(adap, skb); - case L2T_STATE_RESOLVING: - case L2T_STATE_SYNC_WRITE: - spin_lock_bh(&e->lock); - if (e->state != L2T_STATE_SYNC_WRITE && - e->state != L2T_STATE_RESOLVING) { - spin_unlock_bh(&e->lock); - goto again; - } - arpq_enqueue(e, skb); - spin_unlock_bh(&e->lock); - - if (e->state == L2T_STATE_RESOLVING && - !neigh_event_send(e->neigh, NULL)) { - spin_lock_bh(&e->lock); - if (e->state == L2T_STATE_RESOLVING && e->arpq_head) - write_l2e(adap, e, 1); - spin_unlock_bh(&e->lock); - } - } - return 0; -} -EXPORT_SYMBOL(cxgb4_l2t_send); - -/* - * Allocate a free L2T entry. Must be called with l2t_data.lock held. - */ -static struct l2t_entry *alloc_l2e(struct l2t_data *d) -{ - struct l2t_entry *end, *e, **p; - - if (!atomic_read(&d->nfree)) - return NULL; - - /* there's definitely a free entry */ - for (e = d->rover, end = &d->l2tab[L2T_SIZE]; e != end; ++e) - if (atomic_read(&e->refcnt) == 0) - goto found; - - for (e = d->l2tab; atomic_read(&e->refcnt); ++e) - ; -found: - d->rover = e + 1; - atomic_dec(&d->nfree); - - /* - * The entry we found may be an inactive entry that is - * presently in the hash table. We need to remove it. - */ - if (e->state < L2T_STATE_SWITCHING) - for (p = &d->l2tab[e->hash].first; *p; p = &(*p)->next) - if (*p == e) { - *p = e->next; - e->next = NULL; - break; - } - - e->state = L2T_STATE_UNUSED; - return e; -} - -/* - * Called when an L2T entry has no more users. - */ -static void t4_l2e_free(struct l2t_entry *e) -{ - struct l2t_data *d; - - spin_lock_bh(&e->lock); - if (atomic_read(&e->refcnt) == 0) { /* hasn't been recycled */ - if (e->neigh) { - neigh_release(e->neigh); - e->neigh = NULL; - } - } - spin_unlock_bh(&e->lock); - - d = container_of(e, struct l2t_data, l2tab[e->idx]); - atomic_inc(&d->nfree); -} - -void cxgb4_l2t_release(struct l2t_entry *e) -{ - if (atomic_dec_and_test(&e->refcnt)) - t4_l2e_free(e); -} -EXPORT_SYMBOL(cxgb4_l2t_release); - -/* - * Update an L2T entry that was previously used for the same next hop as neigh. - * Must be called with softirqs disabled. - */ -static void reuse_entry(struct l2t_entry *e, struct neighbour *neigh) -{ - unsigned int nud_state; - - spin_lock(&e->lock); /* avoid race with t4_l2t_free */ - if (neigh != e->neigh) - neigh_replace(e, neigh); - nud_state = neigh->nud_state; - if (memcmp(e->dmac, neigh->ha, sizeof(e->dmac)) || - !(nud_state & NUD_VALID)) - e->state = L2T_STATE_RESOLVING; - else if (nud_state & NUD_CONNECTED) - e->state = L2T_STATE_VALID; - else - e->state = L2T_STATE_STALE; - spin_unlock(&e->lock); -} - -struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d, struct neighbour *neigh, - const struct net_device *physdev, - unsigned int priority) -{ - u8 lport; - u16 vlan; - struct l2t_entry *e; - int addr_len = neigh->tbl->key_len; - u32 *addr = (u32 *)neigh->primary_key; - int ifidx = neigh->dev->ifindex; - int hash = addr_hash(addr, addr_len, ifidx); - - if (neigh->dev->flags & IFF_LOOPBACK) - lport = netdev2pinfo(physdev)->tx_chan + 4; - else - lport = netdev2pinfo(physdev)->lport; - - if (neigh->dev->priv_flags & IFF_802_1Q_VLAN) - vlan = vlan_dev_vlan_id(neigh->dev); - else - vlan = VLAN_NONE; - - write_lock_bh(&d->lock); - for (e = d->l2tab[hash].first; e; e = e->next) - if (!addreq(e, addr) && e->ifindex == ifidx && - e->vlan == vlan && e->lport == lport) { - l2t_hold(d, e); - if (atomic_read(&e->refcnt) == 1) - reuse_entry(e, neigh); - goto done; - } - - /* Need to allocate a new entry */ - e = alloc_l2e(d); - if (e) { - spin_lock(&e->lock); /* avoid race with t4_l2t_free */ - e->state = L2T_STATE_RESOLVING; - memcpy(e->addr, addr, addr_len); - e->ifindex = ifidx; - e->hash = hash; - e->lport = lport; - e->v6 = addr_len == 16; - atomic_set(&e->refcnt, 1); - neigh_replace(e, neigh); - e->vlan = vlan; - e->next = d->l2tab[hash].first; - d->l2tab[hash].first = e; - spin_unlock(&e->lock); - } -done: - write_unlock_bh(&d->lock); - return e; -} -EXPORT_SYMBOL(cxgb4_l2t_get); - -/* - * Called when address resolution fails for an L2T entry to handle packets - * on the arpq head. If a packet specifies a failure handler it is invoked, - * otherwise the packet is sent to the device. - */ -static void handle_failed_resolution(struct adapter *adap, struct sk_buff *arpq) -{ - while (arpq) { - struct sk_buff *skb = arpq; - const struct l2t_skb_cb *cb = L2T_SKB_CB(skb); - - arpq = skb->next; - skb->next = NULL; - if (cb->arp_err_handler) - cb->arp_err_handler(cb->handle, skb); - else - t4_ofld_send(adap, skb); - } -} - -/* - * Called when the host's neighbor layer makes a change to some entry that is - * loaded into the HW L2 table. - */ -void t4_l2t_update(struct adapter *adap, struct neighbour *neigh) -{ - struct l2t_entry *e; - struct sk_buff *arpq = NULL; - struct l2t_data *d = adap->l2t; - int addr_len = neigh->tbl->key_len; - u32 *addr = (u32 *) neigh->primary_key; - int ifidx = neigh->dev->ifindex; - int hash = addr_hash(addr, addr_len, ifidx); - - read_lock_bh(&d->lock); - for (e = d->l2tab[hash].first; e; e = e->next) - if (!addreq(e, addr) && e->ifindex == ifidx) { - spin_lock(&e->lock); - if (atomic_read(&e->refcnt)) - goto found; - spin_unlock(&e->lock); - break; - } - read_unlock_bh(&d->lock); - return; - - found: - read_unlock(&d->lock); - - if (neigh != e->neigh) - neigh_replace(e, neigh); - - if (e->state == L2T_STATE_RESOLVING) { - if (neigh->nud_state & NUD_FAILED) { - arpq = e->arpq_head; - e->arpq_head = e->arpq_tail = NULL; - } else if ((neigh->nud_state & (NUD_CONNECTED | NUD_STALE)) && - e->arpq_head) { - write_l2e(adap, e, 1); - } - } else { - e->state = neigh->nud_state & NUD_CONNECTED ? - L2T_STATE_VALID : L2T_STATE_STALE; - if (memcmp(e->dmac, neigh->ha, sizeof(e->dmac))) - write_l2e(adap, e, 0); - } - - spin_unlock_bh(&e->lock); - - if (arpq) - handle_failed_resolution(adap, arpq); -} - -/* - * Allocate an L2T entry for use by a switching rule. Such entries need to be - * explicitly freed and while busy they are not on any hash chain, so normal - * address resolution updates do not see them. - */ -struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *d) -{ - struct l2t_entry *e; - - write_lock_bh(&d->lock); - e = alloc_l2e(d); - if (e) { - spin_lock(&e->lock); /* avoid race with t4_l2t_free */ - e->state = L2T_STATE_SWITCHING; - atomic_set(&e->refcnt, 1); - spin_unlock(&e->lock); - } - write_unlock_bh(&d->lock); - return e; -} - -/* - * Sets/updates the contents of a switching L2T entry that has been allocated - * with an earlier call to @t4_l2t_alloc_switching. - */ -int t4_l2t_set_switching(struct adapter *adap, struct l2t_entry *e, u16 vlan, - u8 port, u8 *eth_addr) -{ - e->vlan = vlan; - e->lport = port; - memcpy(e->dmac, eth_addr, ETH_ALEN); - return write_l2e(adap, e, 0); -} - -struct l2t_data *t4_init_l2t(void) -{ - int i; - struct l2t_data *d; - - d = t4_alloc_mem(sizeof(*d)); - if (!d) - return NULL; - - d->rover = d->l2tab; - atomic_set(&d->nfree, L2T_SIZE); - rwlock_init(&d->lock); - - for (i = 0; i < L2T_SIZE; ++i) { - d->l2tab[i].idx = i; - d->l2tab[i].state = L2T_STATE_UNUSED; - spin_lock_init(&d->l2tab[i].lock); - atomic_set(&d->l2tab[i].refcnt, 0); - } - return d; -} - -#include -#include -#include - -static inline void *l2t_get_idx(struct seq_file *seq, loff_t pos) -{ - struct l2t_entry *l2tab = seq->private; - - return pos >= L2T_SIZE ? NULL : &l2tab[pos]; -} - -static void *l2t_seq_start(struct seq_file *seq, loff_t *pos) -{ - return *pos ? l2t_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; -} - -static void *l2t_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - v = l2t_get_idx(seq, *pos); - if (v) - ++*pos; - return v; -} - -static void l2t_seq_stop(struct seq_file *seq, void *v) -{ -} - -static char l2e_state(const struct l2t_entry *e) -{ - switch (e->state) { - case L2T_STATE_VALID: return 'V'; - case L2T_STATE_STALE: return 'S'; - case L2T_STATE_SYNC_WRITE: return 'W'; - case L2T_STATE_RESOLVING: return e->arpq_head ? 'A' : 'R'; - case L2T_STATE_SWITCHING: return 'X'; - default: - return 'U'; - } -} - -static int l2t_seq_show(struct seq_file *seq, void *v) -{ - if (v == SEQ_START_TOKEN) - seq_puts(seq, " Idx IP address " - "Ethernet address VLAN/P LP State Users Port\n"); - else { - char ip[60]; - struct l2t_entry *e = v; - - spin_lock_bh(&e->lock); - if (e->state == L2T_STATE_SWITCHING) - ip[0] = '\0'; - else - sprintf(ip, e->v6 ? "%pI6c" : "%pI4", e->addr); - seq_printf(seq, "%4u %-25s %17pM %4d %u %2u %c %5u %s\n", - e->idx, ip, e->dmac, - e->vlan & VLAN_VID_MASK, vlan_prio(e), e->lport, - l2e_state(e), atomic_read(&e->refcnt), - e->neigh ? e->neigh->dev->name : ""); - spin_unlock_bh(&e->lock); - } - return 0; -} - -static const struct seq_operations l2t_seq_ops = { - .start = l2t_seq_start, - .next = l2t_seq_next, - .stop = l2t_seq_stop, - .show = l2t_seq_show -}; - -static int l2t_seq_open(struct inode *inode, struct file *file) -{ - int rc = seq_open(file, &l2t_seq_ops); - - if (!rc) { - struct adapter *adap = inode->i_private; - struct seq_file *seq = file->private_data; - - seq->private = adap->l2t->l2tab; - } - return rc; -} - -const struct file_operations t4_l2t_fops = { - .owner = THIS_MODULE, - .open = l2t_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; diff --git a/trunk/drivers/net/cxgb4/l2t.h b/trunk/drivers/net/cxgb4/l2t.h deleted file mode 100644 index 643f27ed3cf4..000000000000 --- a/trunk/drivers/net/cxgb4/l2t.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __CXGB4_L2T_H -#define __CXGB4_L2T_H - -#include -#include -#include - -struct adapter; -struct l2t_data; -struct neighbour; -struct net_device; -struct file_operations; -struct cpl_l2t_write_rpl; - -/* - * Each L2T entry plays multiple roles. First of all, it keeps state for the - * corresponding entry of the HW L2 table and maintains a queue of offload - * packets awaiting address resolution. Second, it is a node of a hash table - * chain, where the nodes of the chain are linked together through their next - * pointer. Finally, each node is a bucket of a hash table, pointing to the - * first element in its chain through its first pointer. - */ -struct l2t_entry { - u16 state; /* entry state */ - u16 idx; /* entry index */ - u32 addr[4]; /* next hop IP or IPv6 address */ - int ifindex; /* neighbor's net_device's ifindex */ - struct neighbour *neigh; /* associated neighbour */ - struct l2t_entry *first; /* start of hash chain */ - struct l2t_entry *next; /* next l2t_entry on chain */ - struct sk_buff *arpq_head; /* queue of packets awaiting resolution */ - struct sk_buff *arpq_tail; - spinlock_t lock; - atomic_t refcnt; /* entry reference count */ - u16 hash; /* hash bucket the entry is on */ - u16 vlan; /* VLAN TCI (id: bits 0-11, prio: 13-15 */ - u8 v6; /* whether entry is for IPv6 */ - u8 lport; /* associated offload logical interface */ - u8 dmac[ETH_ALEN]; /* neighbour's MAC address */ -}; - -typedef void (*arp_err_handler_t)(void *handle, struct sk_buff *skb); - -/* - * Callback stored in an skb to handle address resolution failure. - */ -struct l2t_skb_cb { - void *handle; - arp_err_handler_t arp_err_handler; -}; - -#define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb) - -static inline void t4_set_arp_err_handler(struct sk_buff *skb, void *handle, - arp_err_handler_t handler) -{ - L2T_SKB_CB(skb)->handle = handle; - L2T_SKB_CB(skb)->arp_err_handler = handler; -} - -void cxgb4_l2t_release(struct l2t_entry *e); -int cxgb4_l2t_send(struct net_device *dev, struct sk_buff *skb, - struct l2t_entry *e); -struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d, struct neighbour *neigh, - const struct net_device *physdev, - unsigned int priority); - -void t4_l2t_update(struct adapter *adap, struct neighbour *neigh); -struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *d); -int t4_l2t_set_switching(struct adapter *adap, struct l2t_entry *e, u16 vlan, - u8 port, u8 *eth_addr); -struct l2t_data *t4_init_l2t(void); -void do_l2t_write_rpl(struct adapter *p, const struct cpl_l2t_write_rpl *rpl); - -extern const struct file_operations t4_l2t_fops; -#endif /* __CXGB4_L2T_H */ diff --git a/trunk/drivers/net/cxgb4/sge.c b/trunk/drivers/net/cxgb4/sge.c deleted file mode 100644 index 14adc58e71c3..000000000000 --- a/trunk/drivers/net/cxgb4/sge.c +++ /dev/null @@ -1,2431 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cxgb4.h" -#include "t4_regs.h" -#include "t4_msg.h" -#include "t4fw_api.h" - -/* - * Rx buffer size. We use largish buffers if possible but settle for single - * pages under memory shortage. - */ -#if PAGE_SHIFT >= 16 -# define FL_PG_ORDER 0 -#else -# define FL_PG_ORDER (16 - PAGE_SHIFT) -#endif - -/* RX_PULL_LEN should be <= RX_COPY_THRES */ -#define RX_COPY_THRES 256 -#define RX_PULL_LEN 128 - -/* - * Main body length for sk_buffs used for Rx Ethernet packets with fragments. - * Should be >= RX_PULL_LEN but possibly bigger to give pskb_may_pull some room. - */ -#define RX_PKT_SKB_LEN 512 - -/* Ethernet header padding prepended to RX_PKTs */ -#define RX_PKT_PAD 2 - -/* - * Max number of Tx descriptors we clean up at a time. Should be modest as - * freeing skbs isn't cheap and it happens while holding locks. We just need - * to free packets faster than they arrive, we eventually catch up and keep - * the amortized cost reasonable. Must be >= 2 * TXQ_STOP_THRES. - */ -#define MAX_TX_RECLAIM 16 - -/* - * Max number of Rx buffers we replenish at a time. Again keep this modest, - * allocating buffers isn't cheap either. - */ -#define MAX_RX_REFILL 16U - -/* - * Period of the Rx queue check timer. This timer is infrequent as it has - * something to do only when the system experiences severe memory shortage. - */ -#define RX_QCHECK_PERIOD (HZ / 2) - -/* - * Period of the Tx queue check timer. - */ -#define TX_QCHECK_PERIOD (HZ / 2) - -/* - * Max number of Tx descriptors to be reclaimed by the Tx timer. - */ -#define MAX_TIMER_TX_RECLAIM 100 - -/* - * Timer index used when backing off due to memory shortage. - */ -#define NOMEM_TMR_IDX (SGE_NTIMERS - 1) - -/* - * An FL with <= FL_STARVE_THRES buffers is starving and a periodic timer will - * attempt to refill it. - */ -#define FL_STARVE_THRES 4 - -/* - * Suspend an Ethernet Tx queue with fewer available descriptors than this. - * This is the same as calc_tx_descs() for a TSO packet with - * nr_frags == MAX_SKB_FRAGS. - */ -#define ETHTXQ_STOP_THRES \ - (1 + DIV_ROUND_UP((3 * MAX_SKB_FRAGS) / 2 + (MAX_SKB_FRAGS & 1), 8)) - -/* - * Suspension threshold for non-Ethernet Tx queues. We require enough room - * for a full sized WR. - */ -#define TXQ_STOP_THRES (SGE_MAX_WR_LEN / sizeof(struct tx_desc)) - -/* - * Max Tx descriptor space we allow for an Ethernet packet to be inlined - * into a WR. - */ -#define MAX_IMM_TX_PKT_LEN 128 - -/* - * Max size of a WR sent through a control Tx queue. - */ -#define MAX_CTRL_WR_LEN SGE_MAX_WR_LEN - -enum { - /* packet alignment in FL buffers */ - FL_ALIGN = L1_CACHE_BYTES < 32 ? 32 : L1_CACHE_BYTES, - /* egress status entry size */ - STAT_LEN = L1_CACHE_BYTES > 64 ? 128 : 64 -}; - -struct tx_sw_desc { /* SW state per Tx descriptor */ - struct sk_buff *skb; - struct ulptx_sgl *sgl; -}; - -struct rx_sw_desc { /* SW state per Rx descriptor */ - struct page *page; - dma_addr_t dma_addr; -}; - -/* - * The low bits of rx_sw_desc.dma_addr have special meaning. - */ -enum { - RX_LARGE_BUF = 1 << 0, /* buffer is larger than PAGE_SIZE */ - RX_UNMAPPED_BUF = 1 << 1, /* buffer is not mapped */ -}; - -static inline dma_addr_t get_buf_addr(const struct rx_sw_desc *d) -{ - return d->dma_addr & ~(dma_addr_t)(RX_LARGE_BUF | RX_UNMAPPED_BUF); -} - -static inline bool is_buf_mapped(const struct rx_sw_desc *d) -{ - return !(d->dma_addr & RX_UNMAPPED_BUF); -} - -/** - * txq_avail - return the number of available slots in a Tx queue - * @q: the Tx queue - * - * Returns the number of descriptors in a Tx queue available to write new - * packets. - */ -static inline unsigned int txq_avail(const struct sge_txq *q) -{ - return q->size - 1 - q->in_use; -} - -/** - * fl_cap - return the capacity of a free-buffer list - * @fl: the FL - * - * Returns the capacity of a free-buffer list. The capacity is less than - * the size because one descriptor needs to be left unpopulated, otherwise - * HW will think the FL is empty. - */ -static inline unsigned int fl_cap(const struct sge_fl *fl) -{ - return fl->size - 8; /* 1 descriptor = 8 buffers */ -} - -static inline bool fl_starving(const struct sge_fl *fl) -{ - return fl->avail - fl->pend_cred <= FL_STARVE_THRES; -} - -static int map_skb(struct device *dev, const struct sk_buff *skb, - dma_addr_t *addr) -{ - const skb_frag_t *fp, *end; - const struct skb_shared_info *si; - - *addr = dma_map_single(dev, skb->data, skb_headlen(skb), DMA_TO_DEVICE); - if (dma_mapping_error(dev, *addr)) - goto out_err; - - si = skb_shinfo(skb); - end = &si->frags[si->nr_frags]; - - for (fp = si->frags; fp < end; fp++) { - *++addr = dma_map_page(dev, fp->page, fp->page_offset, fp->size, - DMA_TO_DEVICE); - if (dma_mapping_error(dev, *addr)) - goto unwind; - } - return 0; - -unwind: - while (fp-- > si->frags) - dma_unmap_page(dev, *--addr, fp->size, DMA_TO_DEVICE); - - dma_unmap_single(dev, addr[-1], skb_headlen(skb), DMA_TO_DEVICE); -out_err: - return -ENOMEM; -} - -#ifdef CONFIG_NEED_DMA_MAP_STATE -static void unmap_skb(struct device *dev, const struct sk_buff *skb, - const dma_addr_t *addr) -{ - const skb_frag_t *fp, *end; - const struct skb_shared_info *si; - - dma_unmap_single(dev, *addr++, skb_headlen(skb), DMA_TO_DEVICE); - - si = skb_shinfo(skb); - end = &si->frags[si->nr_frags]; - for (fp = si->frags; fp < end; fp++) - dma_unmap_page(dev, *addr++, fp->size, DMA_TO_DEVICE); -} - -/** - * deferred_unmap_destructor - unmap a packet when it is freed - * @skb: the packet - * - * This is the packet destructor used for Tx packets that need to remain - * mapped until they are freed rather than until their Tx descriptors are - * freed. - */ -static void deferred_unmap_destructor(struct sk_buff *skb) -{ - unmap_skb(skb->dev->dev.parent, skb, (dma_addr_t *)skb->head); -} -#endif - -static void unmap_sgl(struct device *dev, const struct sk_buff *skb, - const struct ulptx_sgl *sgl, const struct sge_txq *q) -{ - const struct ulptx_sge_pair *p; - unsigned int nfrags = skb_shinfo(skb)->nr_frags; - - if (likely(skb_headlen(skb))) - dma_unmap_single(dev, be64_to_cpu(sgl->addr0), ntohl(sgl->len0), - DMA_TO_DEVICE); - else { - dma_unmap_page(dev, be64_to_cpu(sgl->addr0), ntohl(sgl->len0), - DMA_TO_DEVICE); - nfrags--; - } - - /* - * the complexity below is because of the possibility of a wrap-around - * in the middle of an SGL - */ - for (p = sgl->sge; nfrags >= 2; nfrags -= 2) { - if (likely((u8 *)(p + 1) <= (u8 *)q->stat)) { -unmap: dma_unmap_page(dev, be64_to_cpu(p->addr[0]), - ntohl(p->len[0]), DMA_TO_DEVICE); - dma_unmap_page(dev, be64_to_cpu(p->addr[1]), - ntohl(p->len[1]), DMA_TO_DEVICE); - p++; - } else if ((u8 *)p == (u8 *)q->stat) { - p = (const struct ulptx_sge_pair *)q->desc; - goto unmap; - } else if ((u8 *)p + 8 == (u8 *)q->stat) { - const __be64 *addr = (const __be64 *)q->desc; - - dma_unmap_page(dev, be64_to_cpu(addr[0]), - ntohl(p->len[0]), DMA_TO_DEVICE); - dma_unmap_page(dev, be64_to_cpu(addr[1]), - ntohl(p->len[1]), DMA_TO_DEVICE); - p = (const struct ulptx_sge_pair *)&addr[2]; - } else { - const __be64 *addr = (const __be64 *)q->desc; - - dma_unmap_page(dev, be64_to_cpu(p->addr[0]), - ntohl(p->len[0]), DMA_TO_DEVICE); - dma_unmap_page(dev, be64_to_cpu(addr[0]), - ntohl(p->len[1]), DMA_TO_DEVICE); - p = (const struct ulptx_sge_pair *)&addr[1]; - } - } - if (nfrags) { - __be64 addr; - - if ((u8 *)p == (u8 *)q->stat) - p = (const struct ulptx_sge_pair *)q->desc; - addr = (u8 *)p + 16 <= (u8 *)q->stat ? p->addr[0] : - *(const __be64 *)q->desc; - dma_unmap_page(dev, be64_to_cpu(addr), ntohl(p->len[0]), - DMA_TO_DEVICE); - } -} - -/** - * free_tx_desc - reclaims Tx descriptors and their buffers - * @adapter: the adapter - * @q: the Tx queue to reclaim descriptors from - * @n: the number of descriptors to reclaim - * @unmap: whether the buffers should be unmapped for DMA - * - * Reclaims Tx descriptors from an SGE Tx queue and frees the associated - * Tx buffers. Called with the Tx queue lock held. - */ -static void free_tx_desc(struct adapter *adap, struct sge_txq *q, - unsigned int n, bool unmap) -{ - struct tx_sw_desc *d; - unsigned int cidx = q->cidx; - struct device *dev = adap->pdev_dev; - - d = &q->sdesc[cidx]; - while (n--) { - if (d->skb) { /* an SGL is present */ - if (unmap) - unmap_sgl(dev, d->skb, d->sgl, q); - kfree_skb(d->skb); - d->skb = NULL; - } - ++d; - if (++cidx == q->size) { - cidx = 0; - d = q->sdesc; - } - } - q->cidx = cidx; -} - -/* - * Return the number of reclaimable descriptors in a Tx queue. - */ -static inline int reclaimable(const struct sge_txq *q) -{ - int hw_cidx = ntohs(q->stat->cidx); - hw_cidx -= q->cidx; - return hw_cidx < 0 ? hw_cidx + q->size : hw_cidx; -} - -/** - * reclaim_completed_tx - reclaims completed Tx descriptors - * @adap: the adapter - * @q: the Tx queue to reclaim completed descriptors from - * @unmap: whether the buffers should be unmapped for DMA - * - * Reclaims Tx descriptors that the SGE has indicated it has processed, - * and frees the associated buffers if possible. Called with the Tx - * queue locked. - */ -static inline void reclaim_completed_tx(struct adapter *adap, struct sge_txq *q, - bool unmap) -{ - int avail = reclaimable(q); - - if (avail) { - /* - * Limit the amount of clean up work we do at a time to keep - * the Tx lock hold time O(1). - */ - if (avail > MAX_TX_RECLAIM) - avail = MAX_TX_RECLAIM; - - free_tx_desc(adap, q, avail, unmap); - q->in_use -= avail; - } -} - -static inline int get_buf_size(const struct rx_sw_desc *d) -{ -#if FL_PG_ORDER > 0 - return (d->dma_addr & RX_LARGE_BUF) ? (PAGE_SIZE << FL_PG_ORDER) : - PAGE_SIZE; -#else - return PAGE_SIZE; -#endif -} - -/** - * free_rx_bufs - free the Rx buffers on an SGE free list - * @adap: the adapter - * @q: the SGE free list to free buffers from - * @n: how many buffers to free - * - * Release the next @n buffers on an SGE free-buffer Rx queue. The - * buffers must be made inaccessible to HW before calling this function. - */ -static void free_rx_bufs(struct adapter *adap, struct sge_fl *q, int n) -{ - while (n--) { - struct rx_sw_desc *d = &q->sdesc[q->cidx]; - - if (is_buf_mapped(d)) - dma_unmap_page(adap->pdev_dev, get_buf_addr(d), - get_buf_size(d), PCI_DMA_FROMDEVICE); - put_page(d->page); - d->page = NULL; - if (++q->cidx == q->size) - q->cidx = 0; - q->avail--; - } -} - -/** - * unmap_rx_buf - unmap the current Rx buffer on an SGE free list - * @adap: the adapter - * @q: the SGE free list - * - * Unmap the current buffer on an SGE free-buffer Rx queue. The - * buffer must be made inaccessible to HW before calling this function. - * - * This is similar to @free_rx_bufs above but does not free the buffer. - * Do note that the FL still loses any further access to the buffer. - */ -static void unmap_rx_buf(struct adapter *adap, struct sge_fl *q) -{ - struct rx_sw_desc *d = &q->sdesc[q->cidx]; - - if (is_buf_mapped(d)) - dma_unmap_page(adap->pdev_dev, get_buf_addr(d), - get_buf_size(d), PCI_DMA_FROMDEVICE); - d->page = NULL; - if (++q->cidx == q->size) - q->cidx = 0; - q->avail--; -} - -static inline void ring_fl_db(struct adapter *adap, struct sge_fl *q) -{ - if (q->pend_cred >= 8) { - wmb(); - t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL), DBPRIO | - QID(q->cntxt_id) | PIDX(q->pend_cred / 8)); - q->pend_cred &= 7; - } -} - -static inline void set_rx_sw_desc(struct rx_sw_desc *sd, struct page *pg, - dma_addr_t mapping) -{ - sd->page = pg; - sd->dma_addr = mapping; /* includes size low bits */ -} - -/** - * refill_fl - refill an SGE Rx buffer ring - * @adap: the adapter - * @q: the ring to refill - * @n: the number of new buffers to allocate - * @gfp: the gfp flags for the allocations - * - * (Re)populate an SGE free-buffer queue with up to @n new packet buffers, - * allocated with the supplied gfp flags. The caller must assure that - * @n does not exceed the queue's capacity. If afterwards the queue is - * found critically low mark it as starving in the bitmap of starving FLs. - * - * Returns the number of buffers allocated. - */ -static unsigned int refill_fl(struct adapter *adap, struct sge_fl *q, int n, - gfp_t gfp) -{ - struct page *pg; - dma_addr_t mapping; - unsigned int cred = q->avail; - __be64 *d = &q->desc[q->pidx]; - struct rx_sw_desc *sd = &q->sdesc[q->pidx]; - - gfp |= __GFP_NOWARN; /* failures are expected */ - -#if FL_PG_ORDER > 0 - /* - * Prefer large buffers - */ - while (n) { - pg = alloc_pages(gfp | __GFP_COMP, FL_PG_ORDER); - if (unlikely(!pg)) { - q->large_alloc_failed++; - break; /* fall back to single pages */ - } - - mapping = dma_map_page(adap->pdev_dev, pg, 0, - PAGE_SIZE << FL_PG_ORDER, - PCI_DMA_FROMDEVICE); - if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { - __free_pages(pg, FL_PG_ORDER); - goto out; /* do not try small pages for this error */ - } - mapping |= RX_LARGE_BUF; - *d++ = cpu_to_be64(mapping); - - set_rx_sw_desc(sd, pg, mapping); - sd++; - - q->avail++; - if (++q->pidx == q->size) { - q->pidx = 0; - sd = q->sdesc; - d = q->desc; - } - n--; - } -#endif - - while (n--) { - pg = __netdev_alloc_page(adap->port[0], gfp); - if (unlikely(!pg)) { - q->alloc_failed++; - break; - } - - mapping = dma_map_page(adap->pdev_dev, pg, 0, PAGE_SIZE, - PCI_DMA_FROMDEVICE); - if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { - netdev_free_page(adap->port[0], pg); - goto out; - } - *d++ = cpu_to_be64(mapping); - - set_rx_sw_desc(sd, pg, mapping); - sd++; - - q->avail++; - if (++q->pidx == q->size) { - q->pidx = 0; - sd = q->sdesc; - d = q->desc; - } - } - -out: cred = q->avail - cred; - q->pend_cred += cred; - ring_fl_db(adap, q); - - if (unlikely(fl_starving(q))) { - smp_wmb(); - set_bit(q->cntxt_id, adap->sge.starving_fl); - } - - return cred; -} - -static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) -{ - refill_fl(adap, fl, min(MAX_RX_REFILL, fl_cap(fl) - fl->avail), - GFP_ATOMIC); -} - -/** - * alloc_ring - allocate resources for an SGE descriptor ring - * @dev: the PCI device's core device - * @nelem: the number of descriptors - * @elem_size: the size of each descriptor - * @sw_size: the size of the SW state associated with each ring element - * @phys: the physical address of the allocated ring - * @metadata: address of the array holding the SW state for the ring - * @stat_size: extra space in HW ring for status information - * - * Allocates resources for an SGE descriptor ring, such as Tx queues, - * free buffer lists, or response queues. Each SGE ring requires - * space for its HW descriptors plus, optionally, space for the SW state - * associated with each HW entry (the metadata). The function returns - * three values: the virtual address for the HW ring (the return value - * of the function), the bus address of the HW ring, and the address - * of the SW ring. - */ -static void *alloc_ring(struct device *dev, size_t nelem, size_t elem_size, - size_t sw_size, dma_addr_t *phys, void *metadata, - size_t stat_size) -{ - size_t len = nelem * elem_size + stat_size; - void *s = NULL; - void *p = dma_alloc_coherent(dev, len, phys, GFP_KERNEL); - - if (!p) - return NULL; - if (sw_size) { - s = kcalloc(nelem, sw_size, GFP_KERNEL); - - if (!s) { - dma_free_coherent(dev, len, p, *phys); - return NULL; - } - } - if (metadata) - *(void **)metadata = s; - memset(p, 0, len); - return p; -} - -/** - * sgl_len - calculates the size of an SGL of the given capacity - * @n: the number of SGL entries - * - * Calculates the number of flits needed for a scatter/gather list that - * can hold the given number of entries. - */ -static inline unsigned int sgl_len(unsigned int n) -{ - n--; - return (3 * n) / 2 + (n & 1) + 2; -} - -/** - * flits_to_desc - returns the num of Tx descriptors for the given flits - * @n: the number of flits - * - * Returns the number of Tx descriptors needed for the supplied number - * of flits. - */ -static inline unsigned int flits_to_desc(unsigned int n) -{ - BUG_ON(n > SGE_MAX_WR_LEN / 8); - return DIV_ROUND_UP(n, 8); -} - -/** - * is_eth_imm - can an Ethernet packet be sent as immediate data? - * @skb: the packet - * - * Returns whether an Ethernet packet is small enough to fit as - * immediate data. - */ -static inline int is_eth_imm(const struct sk_buff *skb) -{ - return skb->len <= MAX_IMM_TX_PKT_LEN - sizeof(struct cpl_tx_pkt); -} - -/** - * calc_tx_flits - calculate the number of flits for a packet Tx WR - * @skb: the packet - * - * Returns the number of flits needed for a Tx WR for the given Ethernet - * packet, including the needed WR and CPL headers. - */ -static inline unsigned int calc_tx_flits(const struct sk_buff *skb) -{ - unsigned int flits; - - if (is_eth_imm(skb)) - return DIV_ROUND_UP(skb->len + sizeof(struct cpl_tx_pkt), 8); - - flits = sgl_len(skb_shinfo(skb)->nr_frags + 1) + 4; - if (skb_shinfo(skb)->gso_size) - flits += 2; - return flits; -} - -/** - * calc_tx_descs - calculate the number of Tx descriptors for a packet - * @skb: the packet - * - * Returns the number of Tx descriptors needed for the given Ethernet - * packet, including the needed WR and CPL headers. - */ -static inline unsigned int calc_tx_descs(const struct sk_buff *skb) -{ - return flits_to_desc(calc_tx_flits(skb)); -} - -/** - * write_sgl - populate a scatter/gather list for a packet - * @skb: the packet - * @q: the Tx queue we are writing into - * @sgl: starting location for writing the SGL - * @end: points right after the end of the SGL - * @start: start offset into skb main-body data to include in the SGL - * @addr: the list of bus addresses for the SGL elements - * - * Generates a gather list for the buffers that make up a packet. - * The caller must provide adequate space for the SGL that will be written. - * The SGL includes all of the packet's page fragments and the data in its - * main body except for the first @start bytes. @sgl must be 16-byte - * aligned and within a Tx descriptor with available space. @end points - * right after the end of the SGL but does not account for any potential - * wrap around, i.e., @end > @sgl. - */ -static void write_sgl(const struct sk_buff *skb, struct sge_txq *q, - struct ulptx_sgl *sgl, u64 *end, unsigned int start, - const dma_addr_t *addr) -{ - unsigned int i, len; - struct ulptx_sge_pair *to; - const struct skb_shared_info *si = skb_shinfo(skb); - unsigned int nfrags = si->nr_frags; - struct ulptx_sge_pair buf[MAX_SKB_FRAGS / 2 + 1]; - - len = skb_headlen(skb) - start; - if (likely(len)) { - sgl->len0 = htonl(len); - sgl->addr0 = cpu_to_be64(addr[0] + start); - nfrags++; - } else { - sgl->len0 = htonl(si->frags[0].size); - sgl->addr0 = cpu_to_be64(addr[1]); - } - - sgl->cmd_nsge = htonl(ULPTX_CMD(ULP_TX_SC_DSGL) | ULPTX_NSGE(nfrags)); - if (likely(--nfrags == 0)) - return; - /* - * Most of the complexity below deals with the possibility we hit the - * end of the queue in the middle of writing the SGL. For this case - * only we create the SGL in a temporary buffer and then copy it. - */ - to = (u8 *)end > (u8 *)q->stat ? buf : sgl->sge; - - for (i = (nfrags != si->nr_frags); nfrags >= 2; nfrags -= 2, to++) { - to->len[0] = cpu_to_be32(si->frags[i].size); - to->len[1] = cpu_to_be32(si->frags[++i].size); - to->addr[0] = cpu_to_be64(addr[i]); - to->addr[1] = cpu_to_be64(addr[++i]); - } - if (nfrags) { - to->len[0] = cpu_to_be32(si->frags[i].size); - to->len[1] = cpu_to_be32(0); - to->addr[0] = cpu_to_be64(addr[i + 1]); - } - if (unlikely((u8 *)end > (u8 *)q->stat)) { - unsigned int part0 = (u8 *)q->stat - (u8 *)sgl->sge, part1; - - if (likely(part0)) - memcpy(sgl->sge, buf, part0); - part1 = (u8 *)end - (u8 *)q->stat; - memcpy(q->desc, (u8 *)buf + part0, part1); - end = (void *)q->desc + part1; - } - if ((uintptr_t)end & 8) /* 0-pad to multiple of 16 */ - *(u64 *)end = 0; -} - -/** - * ring_tx_db - check and potentially ring a Tx queue's doorbell - * @adap: the adapter - * @q: the Tx queue - * @n: number of new descriptors to give to HW - * - * Ring the doorbel for a Tx queue. - */ -static inline void ring_tx_db(struct adapter *adap, struct sge_txq *q, int n) -{ - wmb(); /* write descriptors before telling HW */ - t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL), - QID(q->cntxt_id) | PIDX(n)); -} - -/** - * inline_tx_skb - inline a packet's data into Tx descriptors - * @skb: the packet - * @q: the Tx queue where the packet will be inlined - * @pos: starting position in the Tx queue where to inline the packet - * - * Inline a packet's contents directly into Tx descriptors, starting at - * the given position within the Tx DMA ring. - * Most of the complexity of this operation is dealing with wrap arounds - * in the middle of the packet we want to inline. - */ -static void inline_tx_skb(const struct sk_buff *skb, const struct sge_txq *q, - void *pos) -{ - u64 *p; - int left = (void *)q->stat - pos; - - if (likely(skb->len <= left)) { - if (likely(!skb->data_len)) - skb_copy_from_linear_data(skb, pos, skb->len); - else - skb_copy_bits(skb, 0, pos, skb->len); - pos += skb->len; - } else { - skb_copy_bits(skb, 0, pos, left); - skb_copy_bits(skb, left, q->desc, skb->len - left); - pos = (void *)q->desc + (skb->len - left); - } - - /* 0-pad to multiple of 16 */ - p = PTR_ALIGN(pos, 8); - if ((uintptr_t)p & 8) - *p = 0; -} - -/* - * Figure out what HW csum a packet wants and return the appropriate control - * bits. - */ -static u64 hwcsum(const struct sk_buff *skb) -{ - int csum_type; - const struct iphdr *iph = ip_hdr(skb); - - if (iph->version == 4) { - if (iph->protocol == IPPROTO_TCP) - csum_type = TX_CSUM_TCPIP; - else if (iph->protocol == IPPROTO_UDP) - csum_type = TX_CSUM_UDPIP; - else { -nocsum: /* - * unknown protocol, disable HW csum - * and hope a bad packet is detected - */ - return TXPKT_L4CSUM_DIS; - } - } else { - /* - * this doesn't work with extension headers - */ - const struct ipv6hdr *ip6h = (const struct ipv6hdr *)iph; - - if (ip6h->nexthdr == IPPROTO_TCP) - csum_type = TX_CSUM_TCPIP6; - else if (ip6h->nexthdr == IPPROTO_UDP) - csum_type = TX_CSUM_UDPIP6; - else - goto nocsum; - } - - if (likely(csum_type >= TX_CSUM_TCPIP)) - return TXPKT_CSUM_TYPE(csum_type) | - TXPKT_IPHDR_LEN(skb_network_header_len(skb)) | - TXPKT_ETHHDR_LEN(skb_network_offset(skb) - ETH_HLEN); - else { - int start = skb_transport_offset(skb); - - return TXPKT_CSUM_TYPE(csum_type) | TXPKT_CSUM_START(start) | - TXPKT_CSUM_LOC(start + skb->csum_offset); - } -} - -static void eth_txq_stop(struct sge_eth_txq *q) -{ - netif_tx_stop_queue(q->txq); - q->q.stops++; -} - -static inline void txq_advance(struct sge_txq *q, unsigned int n) -{ - q->in_use += n; - q->pidx += n; - if (q->pidx >= q->size) - q->pidx -= q->size; -} - -/** - * t4_eth_xmit - add a packet to an Ethernet Tx queue - * @skb: the packet - * @dev: the egress net device - * - * Add a packet to an SGE Ethernet Tx queue. Runs with softirqs disabled. - */ -netdev_tx_t t4_eth_xmit(struct sk_buff *skb, struct net_device *dev) -{ - u32 wr_mid; - u64 cntrl, *end; - int qidx, credits; - unsigned int flits, ndesc; - struct adapter *adap; - struct sge_eth_txq *q; - const struct port_info *pi; - struct fw_eth_tx_pkt_wr *wr; - struct cpl_tx_pkt_core *cpl; - const struct skb_shared_info *ssi; - dma_addr_t addr[MAX_SKB_FRAGS + 1]; - - /* - * The chip min packet length is 10 octets but play safe and reject - * anything shorter than an Ethernet header. - */ - if (unlikely(skb->len < ETH_HLEN)) { -out_free: dev_kfree_skb(skb); - return NETDEV_TX_OK; - } - - pi = netdev_priv(dev); - adap = pi->adapter; - qidx = skb_get_queue_mapping(skb); - q = &adap->sge.ethtxq[qidx + pi->first_qset]; - - reclaim_completed_tx(adap, &q->q, true); - - flits = calc_tx_flits(skb); - ndesc = flits_to_desc(flits); - credits = txq_avail(&q->q) - ndesc; - - if (unlikely(credits < 0)) { - eth_txq_stop(q); - dev_err(adap->pdev_dev, - "%s: Tx ring %u full while queue awake!\n", - dev->name, qidx); - return NETDEV_TX_BUSY; - } - - if (!is_eth_imm(skb) && - unlikely(map_skb(adap->pdev_dev, skb, addr) < 0)) { - q->mapping_err++; - goto out_free; - } - - wr_mid = FW_WR_LEN16(DIV_ROUND_UP(flits, 2)); - if (unlikely(credits < ETHTXQ_STOP_THRES)) { - eth_txq_stop(q); - wr_mid |= FW_WR_EQUEQ | FW_WR_EQUIQ; - } - - wr = (void *)&q->q.desc[q->q.pidx]; - wr->equiq_to_len16 = htonl(wr_mid); - wr->r3 = cpu_to_be64(0); - end = (u64 *)wr + flits; - - ssi = skb_shinfo(skb); - if (ssi->gso_size) { - struct cpl_tx_pkt_lso *lso = (void *)wr; - bool v6 = (ssi->gso_type & SKB_GSO_TCPV6) != 0; - int l3hdr_len = skb_network_header_len(skb); - int eth_xtra_len = skb_network_offset(skb) - ETH_HLEN; - - wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) | - FW_WR_IMMDLEN(sizeof(*lso))); - lso->lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) | - LSO_FIRST_SLICE | LSO_LAST_SLICE | - LSO_IPV6(v6) | - LSO_ETHHDR_LEN(eth_xtra_len / 4) | - LSO_IPHDR_LEN(l3hdr_len / 4) | - LSO_TCPHDR_LEN(tcp_hdr(skb)->doff)); - lso->ipid_ofst = htons(0); - lso->mss = htons(ssi->gso_size); - lso->seqno_offset = htonl(0); - lso->len = htonl(skb->len); - cpl = (void *)(lso + 1); - cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) | - TXPKT_IPHDR_LEN(l3hdr_len) | - TXPKT_ETHHDR_LEN(eth_xtra_len); - q->tso++; - q->tx_cso += ssi->gso_segs; - } else { - int len; - - len = is_eth_imm(skb) ? skb->len + sizeof(*cpl) : sizeof(*cpl); - wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) | - FW_WR_IMMDLEN(len)); - cpl = (void *)(wr + 1); - if (skb->ip_summed == CHECKSUM_PARTIAL) { - cntrl = hwcsum(skb) | TXPKT_IPCSUM_DIS; - q->tx_cso++; - } else - cntrl = TXPKT_L4CSUM_DIS | TXPKT_IPCSUM_DIS; - } - - if (vlan_tx_tag_present(skb)) { - q->vlan_ins++; - cntrl |= TXPKT_VLAN_VLD | TXPKT_VLAN(vlan_tx_tag_get(skb)); - } - - cpl->ctrl0 = htonl(TXPKT_OPCODE(CPL_TX_PKT_XT) | - TXPKT_INTF(pi->tx_chan) | TXPKT_PF(0)); - cpl->pack = htons(0); - cpl->len = htons(skb->len); - cpl->ctrl1 = cpu_to_be64(cntrl); - - if (is_eth_imm(skb)) { - inline_tx_skb(skb, &q->q, cpl + 1); - dev_kfree_skb(skb); - } else { - int last_desc; - - write_sgl(skb, &q->q, (struct ulptx_sgl *)(cpl + 1), end, 0, - addr); - skb_orphan(skb); - - last_desc = q->q.pidx + ndesc - 1; - if (last_desc >= q->q.size) - last_desc -= q->q.size; - q->q.sdesc[last_desc].skb = skb; - q->q.sdesc[last_desc].sgl = (struct ulptx_sgl *)(cpl + 1); - } - - txq_advance(&q->q, ndesc); - - ring_tx_db(adap, &q->q, ndesc); - return NETDEV_TX_OK; -} - -/** - * reclaim_completed_tx_imm - reclaim completed control-queue Tx descs - * @q: the SGE control Tx queue - * - * This is a variant of reclaim_completed_tx() that is used for Tx queues - * that send only immediate data (presently just the control queues) and - * thus do not have any sk_buffs to release. - */ -static inline void reclaim_completed_tx_imm(struct sge_txq *q) -{ - int hw_cidx = ntohs(q->stat->cidx); - int reclaim = hw_cidx - q->cidx; - - if (reclaim < 0) - reclaim += q->size; - - q->in_use -= reclaim; - q->cidx = hw_cidx; -} - -/** - * is_imm - check whether a packet can be sent as immediate data - * @skb: the packet - * - * Returns true if a packet can be sent as a WR with immediate data. - */ -static inline int is_imm(const struct sk_buff *skb) -{ - return skb->len <= MAX_CTRL_WR_LEN; -} - -/** - * ctrlq_check_stop - check if a control queue is full and should stop - * @q: the queue - * @wr: most recent WR written to the queue - * - * Check if a control queue has become full and should be stopped. - * We clean up control queue descriptors very lazily, only when we are out. - * If the queue is still full after reclaiming any completed descriptors - * we suspend it and have the last WR wake it up. - */ -static void ctrlq_check_stop(struct sge_ctrl_txq *q, struct fw_wr_hdr *wr) -{ - reclaim_completed_tx_imm(&q->q); - if (unlikely(txq_avail(&q->q) < TXQ_STOP_THRES)) { - wr->lo |= htonl(FW_WR_EQUEQ | FW_WR_EQUIQ); - q->q.stops++; - q->full = 1; - } -} - -/** - * ctrl_xmit - send a packet through an SGE control Tx queue - * @q: the control queue - * @skb: the packet - * - * Send a packet through an SGE control Tx queue. Packets sent through - * a control queue must fit entirely as immediate data. - */ -static int ctrl_xmit(struct sge_ctrl_txq *q, struct sk_buff *skb) -{ - unsigned int ndesc; - struct fw_wr_hdr *wr; - - if (unlikely(!is_imm(skb))) { - WARN_ON(1); - dev_kfree_skb(skb); - return NET_XMIT_DROP; - } - - ndesc = DIV_ROUND_UP(skb->len, sizeof(struct tx_desc)); - spin_lock(&q->sendq.lock); - - if (unlikely(q->full)) { - skb->priority = ndesc; /* save for restart */ - __skb_queue_tail(&q->sendq, skb); - spin_unlock(&q->sendq.lock); - return NET_XMIT_CN; - } - - wr = (struct fw_wr_hdr *)&q->q.desc[q->q.pidx]; - inline_tx_skb(skb, &q->q, wr); - - txq_advance(&q->q, ndesc); - if (unlikely(txq_avail(&q->q) < TXQ_STOP_THRES)) - ctrlq_check_stop(q, wr); - - ring_tx_db(q->adap, &q->q, ndesc); - spin_unlock(&q->sendq.lock); - - kfree_skb(skb); - return NET_XMIT_SUCCESS; -} - -/** - * restart_ctrlq - restart a suspended control queue - * @data: the control queue to restart - * - * Resumes transmission on a suspended Tx control queue. - */ -static void restart_ctrlq(unsigned long data) -{ - struct sk_buff *skb; - unsigned int written = 0; - struct sge_ctrl_txq *q = (struct sge_ctrl_txq *)data; - - spin_lock(&q->sendq.lock); - reclaim_completed_tx_imm(&q->q); - BUG_ON(txq_avail(&q->q) < TXQ_STOP_THRES); /* q should be empty */ - - while ((skb = __skb_dequeue(&q->sendq)) != NULL) { - struct fw_wr_hdr *wr; - unsigned int ndesc = skb->priority; /* previously saved */ - - /* - * Write descriptors and free skbs outside the lock to limit - * wait times. q->full is still set so new skbs will be queued. - */ - spin_unlock(&q->sendq.lock); - - wr = (struct fw_wr_hdr *)&q->q.desc[q->q.pidx]; - inline_tx_skb(skb, &q->q, wr); - kfree_skb(skb); - - written += ndesc; - txq_advance(&q->q, ndesc); - if (unlikely(txq_avail(&q->q) < TXQ_STOP_THRES)) { - unsigned long old = q->q.stops; - - ctrlq_check_stop(q, wr); - if (q->q.stops != old) { /* suspended anew */ - spin_lock(&q->sendq.lock); - goto ringdb; - } - } - if (written > 16) { - ring_tx_db(q->adap, &q->q, written); - written = 0; - } - spin_lock(&q->sendq.lock); - } - q->full = 0; -ringdb: if (written) - ring_tx_db(q->adap, &q->q, written); - spin_unlock(&q->sendq.lock); -} - -/** - * t4_mgmt_tx - send a management message - * @adap: the adapter - * @skb: the packet containing the management message - * - * Send a management message through control queue 0. - */ -int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb) -{ - int ret; - - local_bh_disable(); - ret = ctrl_xmit(&adap->sge.ctrlq[0], skb); - local_bh_enable(); - return ret; -} - -/** - * is_ofld_imm - check whether a packet can be sent as immediate data - * @skb: the packet - * - * Returns true if a packet can be sent as an offload WR with immediate - * data. We currently use the same limit as for Ethernet packets. - */ -static inline int is_ofld_imm(const struct sk_buff *skb) -{ - return skb->len <= MAX_IMM_TX_PKT_LEN; -} - -/** - * calc_tx_flits_ofld - calculate # of flits for an offload packet - * @skb: the packet - * - * Returns the number of flits needed for the given offload packet. - * These packets are already fully constructed and no additional headers - * will be added. - */ -static inline unsigned int calc_tx_flits_ofld(const struct sk_buff *skb) -{ - unsigned int flits, cnt; - - if (is_ofld_imm(skb)) - return DIV_ROUND_UP(skb->len, 8); - - flits = skb_transport_offset(skb) / 8U; /* headers */ - cnt = skb_shinfo(skb)->nr_frags; - if (skb->tail != skb->transport_header) - cnt++; - return flits + sgl_len(cnt); -} - -/** - * txq_stop_maperr - stop a Tx queue due to I/O MMU exhaustion - * @adap: the adapter - * @q: the queue to stop - * - * Mark a Tx queue stopped due to I/O MMU exhaustion and resulting - * inability to map packets. A periodic timer attempts to restart - * queues so marked. - */ -static void txq_stop_maperr(struct sge_ofld_txq *q) -{ - q->mapping_err++; - q->q.stops++; - set_bit(q->q.cntxt_id, q->adap->sge.txq_maperr); -} - -/** - * ofldtxq_stop - stop an offload Tx queue that has become full - * @q: the queue to stop - * @skb: the packet causing the queue to become full - * - * Stops an offload Tx queue that has become full and modifies the packet - * being written to request a wakeup. - */ -static void ofldtxq_stop(struct sge_ofld_txq *q, struct sk_buff *skb) -{ - struct fw_wr_hdr *wr = (struct fw_wr_hdr *)skb->data; - - wr->lo |= htonl(FW_WR_EQUEQ | FW_WR_EQUIQ); - q->q.stops++; - q->full = 1; -} - -/** - * service_ofldq - restart a suspended offload queue - * @q: the offload queue - * - * Services an offload Tx queue by moving packets from its packet queue - * to the HW Tx ring. The function starts and ends with the queue locked. - */ -static void service_ofldq(struct sge_ofld_txq *q) -{ - u64 *pos; - int credits; - struct sk_buff *skb; - unsigned int written = 0; - unsigned int flits, ndesc; - - while ((skb = skb_peek(&q->sendq)) != NULL && !q->full) { - /* - * We drop the lock but leave skb on sendq, thus retaining - * exclusive access to the state of the queue. - */ - spin_unlock(&q->sendq.lock); - - reclaim_completed_tx(q->adap, &q->q, false); - - flits = skb->priority; /* previously saved */ - ndesc = flits_to_desc(flits); - credits = txq_avail(&q->q) - ndesc; - BUG_ON(credits < 0); - if (unlikely(credits < TXQ_STOP_THRES)) - ofldtxq_stop(q, skb); - - pos = (u64 *)&q->q.desc[q->q.pidx]; - if (is_ofld_imm(skb)) - inline_tx_skb(skb, &q->q, pos); - else if (map_skb(q->adap->pdev_dev, skb, - (dma_addr_t *)skb->head)) { - txq_stop_maperr(q); - spin_lock(&q->sendq.lock); - break; - } else { - int last_desc, hdr_len = skb_transport_offset(skb); - - memcpy(pos, skb->data, hdr_len); - write_sgl(skb, &q->q, (void *)pos + hdr_len, - pos + flits, hdr_len, - (dma_addr_t *)skb->head); -#ifdef CONFIG_NEED_DMA_MAP_STATE - skb->dev = q->adap->port[0]; - skb->destructor = deferred_unmap_destructor; -#endif - last_desc = q->q.pidx + ndesc - 1; - if (last_desc >= q->q.size) - last_desc -= q->q.size; - q->q.sdesc[last_desc].skb = skb; - } - - txq_advance(&q->q, ndesc); - written += ndesc; - if (unlikely(written > 32)) { - ring_tx_db(q->adap, &q->q, written); - written = 0; - } - - spin_lock(&q->sendq.lock); - __skb_unlink(skb, &q->sendq); - if (is_ofld_imm(skb)) - kfree_skb(skb); - } - if (likely(written)) - ring_tx_db(q->adap, &q->q, written); -} - -/** - * ofld_xmit - send a packet through an offload queue - * @q: the Tx offload queue - * @skb: the packet - * - * Send an offload packet through an SGE offload queue. - */ -static int ofld_xmit(struct sge_ofld_txq *q, struct sk_buff *skb) -{ - skb->priority = calc_tx_flits_ofld(skb); /* save for restart */ - spin_lock(&q->sendq.lock); - __skb_queue_tail(&q->sendq, skb); - if (q->sendq.qlen == 1) - service_ofldq(q); - spin_unlock(&q->sendq.lock); - return NET_XMIT_SUCCESS; -} - -/** - * restart_ofldq - restart a suspended offload queue - * @data: the offload queue to restart - * - * Resumes transmission on a suspended Tx offload queue. - */ -static void restart_ofldq(unsigned long data) -{ - struct sge_ofld_txq *q = (struct sge_ofld_txq *)data; - - spin_lock(&q->sendq.lock); - q->full = 0; /* the queue actually is completely empty now */ - service_ofldq(q); - spin_unlock(&q->sendq.lock); -} - -/** - * skb_txq - return the Tx queue an offload packet should use - * @skb: the packet - * - * Returns the Tx queue an offload packet should use as indicated by bits - * 1-15 in the packet's queue_mapping. - */ -static inline unsigned int skb_txq(const struct sk_buff *skb) -{ - return skb->queue_mapping >> 1; -} - -/** - * is_ctrl_pkt - return whether an offload packet is a control packet - * @skb: the packet - * - * Returns whether an offload packet should use an OFLD or a CTRL - * Tx queue as indicated by bit 0 in the packet's queue_mapping. - */ -static inline unsigned int is_ctrl_pkt(const struct sk_buff *skb) -{ - return skb->queue_mapping & 1; -} - -static inline int ofld_send(struct adapter *adap, struct sk_buff *skb) -{ - unsigned int idx = skb_txq(skb); - - if (unlikely(is_ctrl_pkt(skb))) - return ctrl_xmit(&adap->sge.ctrlq[idx], skb); - return ofld_xmit(&adap->sge.ofldtxq[idx], skb); -} - -/** - * t4_ofld_send - send an offload packet - * @adap: the adapter - * @skb: the packet - * - * Sends an offload packet. We use the packet queue_mapping to select the - * appropriate Tx queue as follows: bit 0 indicates whether the packet - * should be sent as regular or control, bits 1-15 select the queue. - */ -int t4_ofld_send(struct adapter *adap, struct sk_buff *skb) -{ - int ret; - - local_bh_disable(); - ret = ofld_send(adap, skb); - local_bh_enable(); - return ret; -} - -/** - * cxgb4_ofld_send - send an offload packet - * @dev: the net device - * @skb: the packet - * - * Sends an offload packet. This is an exported version of @t4_ofld_send, - * intended for ULDs. - */ -int cxgb4_ofld_send(struct net_device *dev, struct sk_buff *skb) -{ - return t4_ofld_send(netdev2adap(dev), skb); -} -EXPORT_SYMBOL(cxgb4_ofld_send); - -static inline void copy_frags(struct skb_shared_info *ssi, - const struct pkt_gl *gl, unsigned int offset) -{ - unsigned int n; - - /* usually there's just one frag */ - ssi->frags[0].page = gl->frags[0].page; - ssi->frags[0].page_offset = gl->frags[0].page_offset + offset; - ssi->frags[0].size = gl->frags[0].size - offset; - ssi->nr_frags = gl->nfrags; - n = gl->nfrags - 1; - if (n) - memcpy(&ssi->frags[1], &gl->frags[1], n * sizeof(skb_frag_t)); - - /* get a reference to the last page, we don't own it */ - get_page(gl->frags[n].page); -} - -/** - * cxgb4_pktgl_to_skb - build an sk_buff from a packet gather list - * @gl: the gather list - * @skb_len: size of sk_buff main body if it carries fragments - * @pull_len: amount of data to move to the sk_buff's main body - * - * Builds an sk_buff from the given packet gather list. Returns the - * sk_buff or %NULL if sk_buff allocation failed. - */ -struct sk_buff *cxgb4_pktgl_to_skb(const struct pkt_gl *gl, - unsigned int skb_len, unsigned int pull_len) -{ - struct sk_buff *skb; - - /* - * Below we rely on RX_COPY_THRES being less than the smallest Rx buffer - * size, which is expected since buffers are at least PAGE_SIZEd. - * In this case packets up to RX_COPY_THRES have only one fragment. - */ - if (gl->tot_len <= RX_COPY_THRES) { - skb = dev_alloc_skb(gl->tot_len); - if (unlikely(!skb)) - goto out; - __skb_put(skb, gl->tot_len); - skb_copy_to_linear_data(skb, gl->va, gl->tot_len); - } else { - skb = dev_alloc_skb(skb_len); - if (unlikely(!skb)) - goto out; - __skb_put(skb, pull_len); - skb_copy_to_linear_data(skb, gl->va, pull_len); - - copy_frags(skb_shinfo(skb), gl, pull_len); - skb->len = gl->tot_len; - skb->data_len = skb->len - pull_len; - skb->truesize += skb->data_len; - } -out: return skb; -} -EXPORT_SYMBOL(cxgb4_pktgl_to_skb); - -/** - * t4_pktgl_free - free a packet gather list - * @gl: the gather list - * - * Releases the pages of a packet gather list. We do not own the last - * page on the list and do not free it. - */ -void t4_pktgl_free(const struct pkt_gl *gl) -{ - int n; - const skb_frag_t *p; - - for (p = gl->frags, n = gl->nfrags - 1; n--; p++) - put_page(p->page); -} - -/* - * Process an MPS trace packet. Give it an unused protocol number so it won't - * be delivered to anyone and send it to the stack for capture. - */ -static noinline int handle_trace_pkt(struct adapter *adap, - const struct pkt_gl *gl) -{ - struct sk_buff *skb; - struct cpl_trace_pkt *p; - - skb = cxgb4_pktgl_to_skb(gl, RX_PULL_LEN, RX_PULL_LEN); - if (unlikely(!skb)) { - t4_pktgl_free(gl); - return 0; - } - - p = (struct cpl_trace_pkt *)skb->data; - __skb_pull(skb, sizeof(*p)); - skb_reset_mac_header(skb); - skb->protocol = htons(0xffff); - skb->dev = adap->port[0]; - netif_receive_skb(skb); - return 0; -} - -static void do_gro(struct sge_eth_rxq *rxq, const struct pkt_gl *gl, - const struct cpl_rx_pkt *pkt) -{ - int ret; - struct sk_buff *skb; - - skb = napi_get_frags(&rxq->rspq.napi); - if (unlikely(!skb)) { - t4_pktgl_free(gl); - rxq->stats.rx_drops++; - return; - } - - copy_frags(skb_shinfo(skb), gl, RX_PKT_PAD); - skb->len = gl->tot_len - RX_PKT_PAD; - skb->data_len = skb->len; - skb->truesize += skb->data_len; - skb->ip_summed = CHECKSUM_UNNECESSARY; - skb_record_rx_queue(skb, rxq->rspq.idx); - - if (unlikely(pkt->vlan_ex)) { - struct port_info *pi = netdev_priv(rxq->rspq.netdev); - struct vlan_group *grp = pi->vlan_grp; - - rxq->stats.vlan_ex++; - if (likely(grp)) { - ret = vlan_gro_frags(&rxq->rspq.napi, grp, - ntohs(pkt->vlan)); - goto stats; - } - } - ret = napi_gro_frags(&rxq->rspq.napi); -stats: if (ret == GRO_HELD) - rxq->stats.lro_pkts++; - else if (ret == GRO_MERGED || ret == GRO_MERGED_FREE) - rxq->stats.lro_merged++; - rxq->stats.pkts++; - rxq->stats.rx_cso++; -} - -/** - * t4_ethrx_handler - process an ingress ethernet packet - * @q: the response queue that received the packet - * @rsp: the response queue descriptor holding the RX_PKT message - * @si: the gather list of packet fragments - * - * Process an ingress ethernet packet and deliver it to the stack. - */ -int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, - const struct pkt_gl *si) -{ - bool csum_ok; - struct sk_buff *skb; - struct port_info *pi; - const struct cpl_rx_pkt *pkt; - struct sge_eth_rxq *rxq = container_of(q, struct sge_eth_rxq, rspq); - - if (unlikely(*(u8 *)rsp == CPL_TRACE_PKT)) - return handle_trace_pkt(q->adap, si); - - pkt = (void *)&rsp[1]; - csum_ok = pkt->csum_calc && !pkt->err_vec; - if ((pkt->l2info & htonl(RXF_TCP)) && - (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) { - do_gro(rxq, si, pkt); - return 0; - } - - skb = cxgb4_pktgl_to_skb(si, RX_PKT_SKB_LEN, RX_PULL_LEN); - if (unlikely(!skb)) { - t4_pktgl_free(si); - rxq->stats.rx_drops++; - return 0; - } - - __skb_pull(skb, RX_PKT_PAD); /* remove ethernet header padding */ - skb->protocol = eth_type_trans(skb, q->netdev); - skb_record_rx_queue(skb, q->idx); - pi = netdev_priv(skb->dev); - rxq->stats.pkts++; - - if (csum_ok && (pi->rx_offload & RX_CSO) && - (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) { - if (!pkt->ip_frag) - skb->ip_summed = CHECKSUM_UNNECESSARY; - else { - __sum16 c = (__force __sum16)pkt->csum; - skb->csum = csum_unfold(c); - skb->ip_summed = CHECKSUM_COMPLETE; - } - rxq->stats.rx_cso++; - } else - skb->ip_summed = CHECKSUM_NONE; - - if (unlikely(pkt->vlan_ex)) { - struct vlan_group *grp = pi->vlan_grp; - - rxq->stats.vlan_ex++; - if (likely(grp)) - vlan_hwaccel_receive_skb(skb, grp, ntohs(pkt->vlan)); - else - dev_kfree_skb_any(skb); - } else - netif_receive_skb(skb); - - return 0; -} - -/** - * restore_rx_bufs - put back a packet's Rx buffers - * @si: the packet gather list - * @q: the SGE free list - * @frags: number of FL buffers to restore - * - * Puts back on an FL the Rx buffers associated with @si. The buffers - * have already been unmapped and are left unmapped, we mark them so to - * prevent further unmapping attempts. - * - * This function undoes a series of @unmap_rx_buf calls when we find out - * that the current packet can't be processed right away afterall and we - * need to come back to it later. This is a very rare event and there's - * no effort to make this particularly efficient. - */ -static void restore_rx_bufs(const struct pkt_gl *si, struct sge_fl *q, - int frags) -{ - struct rx_sw_desc *d; - - while (frags--) { - if (q->cidx == 0) - q->cidx = q->size - 1; - else - q->cidx--; - d = &q->sdesc[q->cidx]; - d->page = si->frags[frags].page; - d->dma_addr |= RX_UNMAPPED_BUF; - q->avail++; - } -} - -/** - * is_new_response - check if a response is newly written - * @r: the response descriptor - * @q: the response queue - * - * Returns true if a response descriptor contains a yet unprocessed - * response. - */ -static inline bool is_new_response(const struct rsp_ctrl *r, - const struct sge_rspq *q) -{ - return RSPD_GEN(r->type_gen) == q->gen; -} - -/** - * rspq_next - advance to the next entry in a response queue - * @q: the queue - * - * Updates the state of a response queue to advance it to the next entry. - */ -static inline void rspq_next(struct sge_rspq *q) -{ - q->cur_desc = (void *)q->cur_desc + q->iqe_len; - if (unlikely(++q->cidx == q->size)) { - q->cidx = 0; - q->gen ^= 1; - q->cur_desc = q->desc; - } -} - -/** - * process_responses - process responses from an SGE response queue - * @q: the ingress queue to process - * @budget: how many responses can be processed in this round - * - * Process responses from an SGE response queue up to the supplied budget. - * Responses include received packets as well as control messages from FW - * or HW. - * - * Additionally choose the interrupt holdoff time for the next interrupt - * on this queue. If the system is under memory shortage use a fairly - * long delay to help recovery. - */ -static int process_responses(struct sge_rspq *q, int budget) -{ - int ret, rsp_type; - int budget_left = budget; - const struct rsp_ctrl *rc; - struct sge_eth_rxq *rxq = container_of(q, struct sge_eth_rxq, rspq); - - while (likely(budget_left)) { - rc = (void *)q->cur_desc + (q->iqe_len - sizeof(*rc)); - if (!is_new_response(rc, q)) - break; - - rmb(); - rsp_type = RSPD_TYPE(rc->type_gen); - if (likely(rsp_type == RSP_TYPE_FLBUF)) { - skb_frag_t *fp; - struct pkt_gl si; - const struct rx_sw_desc *rsd; - u32 len = ntohl(rc->pldbuflen_qid), bufsz, frags; - - if (len & RSPD_NEWBUF) { - if (likely(q->offset > 0)) { - free_rx_bufs(q->adap, &rxq->fl, 1); - q->offset = 0; - } - len &= RSPD_LEN; - } - si.tot_len = len; - - /* gather packet fragments */ - for (frags = 0, fp = si.frags; ; frags++, fp++) { - rsd = &rxq->fl.sdesc[rxq->fl.cidx]; - bufsz = get_buf_size(rsd); - fp->page = rsd->page; - fp->page_offset = q->offset; - fp->size = min(bufsz, len); - len -= fp->size; - if (!len) - break; - unmap_rx_buf(q->adap, &rxq->fl); - } - - /* - * Last buffer remains mapped so explicitly make it - * coherent for CPU access. - */ - dma_sync_single_for_cpu(q->adap->pdev_dev, - get_buf_addr(rsd), - fp->size, DMA_FROM_DEVICE); - - si.va = page_address(si.frags[0].page) + - si.frags[0].page_offset; - prefetch(si.va); - - si.nfrags = frags + 1; - ret = q->handler(q, q->cur_desc, &si); - if (likely(ret == 0)) - q->offset += ALIGN(fp->size, FL_ALIGN); - else - restore_rx_bufs(&si, &rxq->fl, frags); - } else if (likely(rsp_type == RSP_TYPE_CPL)) { - ret = q->handler(q, q->cur_desc, NULL); - } else { - ret = q->handler(q, (const __be64 *)rc, CXGB4_MSG_AN); - } - - if (unlikely(ret)) { - /* couldn't process descriptor, back off for recovery */ - q->next_intr_params = QINTR_TIMER_IDX(NOMEM_TMR_IDX); - break; - } - - rspq_next(q); - budget_left--; - } - - if (q->offset >= 0 && rxq->fl.size - rxq->fl.avail >= 16) - __refill_fl(q->adap, &rxq->fl); - return budget - budget_left; -} - -/** - * napi_rx_handler - the NAPI handler for Rx processing - * @napi: the napi instance - * @budget: how many packets we can process in this round - * - * Handler for new data events when using NAPI. This does not need any - * locking or protection from interrupts as data interrupts are off at - * this point and other adapter interrupts do not interfere (the latter - * in not a concern at all with MSI-X as non-data interrupts then have - * a separate handler). - */ -static int napi_rx_handler(struct napi_struct *napi, int budget) -{ - unsigned int params; - struct sge_rspq *q = container_of(napi, struct sge_rspq, napi); - int work_done = process_responses(q, budget); - - if (likely(work_done < budget)) { - napi_complete(napi); - params = q->next_intr_params; - q->next_intr_params = q->intr_params; - } else - params = QINTR_TIMER_IDX(7); - - t4_write_reg(q->adap, MYPF_REG(SGE_PF_GTS), CIDXINC(work_done) | - INGRESSQID((u32)q->cntxt_id) | SEINTARM(params)); - return work_done; -} - -/* - * The MSI-X interrupt handler for an SGE response queue. - */ -irqreturn_t t4_sge_intr_msix(int irq, void *cookie) -{ - struct sge_rspq *q = cookie; - - napi_schedule(&q->napi); - return IRQ_HANDLED; -} - -/* - * Process the indirect interrupt entries in the interrupt queue and kick off - * NAPI for each queue that has generated an entry. - */ -static unsigned int process_intrq(struct adapter *adap) -{ - unsigned int credits; - const struct rsp_ctrl *rc; - struct sge_rspq *q = &adap->sge.intrq; - - spin_lock(&adap->sge.intrq_lock); - for (credits = 0; ; credits++) { - rc = (void *)q->cur_desc + (q->iqe_len - sizeof(*rc)); - if (!is_new_response(rc, q)) - break; - - rmb(); - if (RSPD_TYPE(rc->type_gen) == RSP_TYPE_INTR) { - unsigned int qid = ntohl(rc->pldbuflen_qid); - - napi_schedule(&adap->sge.ingr_map[qid]->napi); - } - - rspq_next(q); - } - - t4_write_reg(adap, MYPF_REG(SGE_PF_GTS), CIDXINC(credits) | - INGRESSQID(q->cntxt_id) | SEINTARM(q->intr_params)); - spin_unlock(&adap->sge.intrq_lock); - return credits; -} - -/* - * The MSI interrupt handler, which handles data events from SGE response queues - * as well as error and other async events as they all use the same MSI vector. - */ -static irqreturn_t t4_intr_msi(int irq, void *cookie) -{ - struct adapter *adap = cookie; - - t4_slow_intr_handler(adap); - process_intrq(adap); - return IRQ_HANDLED; -} - -/* - * Interrupt handler for legacy INTx interrupts. - * Handles data events from SGE response queues as well as error and other - * async events as they all use the same interrupt line. - */ -static irqreturn_t t4_intr_intx(int irq, void *cookie) -{ - struct adapter *adap = cookie; - - t4_write_reg(adap, MYPF_REG(PCIE_PF_CLI), 0); - if (t4_slow_intr_handler(adap) | process_intrq(adap)) - return IRQ_HANDLED; - return IRQ_NONE; /* probably shared interrupt */ -} - -/** - * t4_intr_handler - select the top-level interrupt handler - * @adap: the adapter - * - * Selects the top-level interrupt handler based on the type of interrupts - * (MSI-X, MSI, or INTx). - */ -irq_handler_t t4_intr_handler(struct adapter *adap) -{ - if (adap->flags & USING_MSIX) - return t4_sge_intr_msix; - if (adap->flags & USING_MSI) - return t4_intr_msi; - return t4_intr_intx; -} - -static void sge_rx_timer_cb(unsigned long data) -{ - unsigned long m; - unsigned int i, cnt[2]; - struct adapter *adap = (struct adapter *)data; - struct sge *s = &adap->sge; - - for (i = 0; i < ARRAY_SIZE(s->starving_fl); i++) - for (m = s->starving_fl[i]; m; m &= m - 1) { - struct sge_eth_rxq *rxq; - unsigned int id = __ffs(m) + i * BITS_PER_LONG; - struct sge_fl *fl = s->egr_map[id]; - - clear_bit(id, s->starving_fl); - smp_mb__after_clear_bit(); - - if (fl_starving(fl)) { - rxq = container_of(fl, struct sge_eth_rxq, fl); - if (napi_reschedule(&rxq->rspq.napi)) - fl->starving++; - else - set_bit(id, s->starving_fl); - } - } - - t4_write_reg(adap, SGE_DEBUG_INDEX, 13); - cnt[0] = t4_read_reg(adap, SGE_DEBUG_DATA_HIGH); - cnt[1] = t4_read_reg(adap, SGE_DEBUG_DATA_LOW); - - for (i = 0; i < 2; i++) - if (cnt[i] >= s->starve_thres) { - if (s->idma_state[i] || cnt[i] == 0xffffffff) - continue; - s->idma_state[i] = 1; - t4_write_reg(adap, SGE_DEBUG_INDEX, 11); - m = t4_read_reg(adap, SGE_DEBUG_DATA_LOW) >> (i * 16); - dev_warn(adap->pdev_dev, - "SGE idma%u starvation detected for " - "queue %lu\n", i, m & 0xffff); - } else if (s->idma_state[i]) - s->idma_state[i] = 0; - - mod_timer(&s->rx_timer, jiffies + RX_QCHECK_PERIOD); -} - -static void sge_tx_timer_cb(unsigned long data) -{ - unsigned long m; - unsigned int i, budget; - struct adapter *adap = (struct adapter *)data; - struct sge *s = &adap->sge; - - for (i = 0; i < ARRAY_SIZE(s->txq_maperr); i++) - for (m = s->txq_maperr[i]; m; m &= m - 1) { - unsigned long id = __ffs(m) + i * BITS_PER_LONG; - struct sge_ofld_txq *txq = s->egr_map[id]; - - clear_bit(id, s->txq_maperr); - tasklet_schedule(&txq->qresume_tsk); - } - - budget = MAX_TIMER_TX_RECLAIM; - i = s->ethtxq_rover; - do { - struct sge_eth_txq *q = &s->ethtxq[i]; - - if (q->q.in_use && - time_after_eq(jiffies, q->txq->trans_start + HZ / 100) && - __netif_tx_trylock(q->txq)) { - int avail = reclaimable(&q->q); - - if (avail) { - if (avail > budget) - avail = budget; - - free_tx_desc(adap, &q->q, avail, true); - q->q.in_use -= avail; - budget -= avail; - } - __netif_tx_unlock(q->txq); - } - - if (++i >= s->ethqsets) - i = 0; - } while (budget && i != s->ethtxq_rover); - s->ethtxq_rover = i; - mod_timer(&s->tx_timer, jiffies + (budget ? TX_QCHECK_PERIOD : 2)); -} - -int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, - struct net_device *dev, int intr_idx, - struct sge_fl *fl, rspq_handler_t hnd) -{ - int ret, flsz = 0; - struct fw_iq_cmd c; - struct port_info *pi = netdev_priv(dev); - - /* Size needs to be multiple of 16, including status entry. */ - iq->size = roundup(iq->size, 16); - - iq->desc = alloc_ring(adap->pdev_dev, iq->size, iq->iqe_len, 0, - &iq->phys_addr, NULL, 0); - if (!iq->desc) - return -ENOMEM; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_IQ_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_CMD_EXEC | - FW_IQ_CMD_PFN(0) | FW_IQ_CMD_VFN(0)); - c.alloc_to_len16 = htonl(FW_IQ_CMD_ALLOC | FW_IQ_CMD_IQSTART(1) | - FW_LEN16(c)); - c.type_to_iqandstindex = htonl(FW_IQ_CMD_TYPE(FW_IQ_TYPE_FL_INT_CAP) | - FW_IQ_CMD_IQASYNCH(fwevtq) | FW_IQ_CMD_VIID(pi->viid) | - FW_IQ_CMD_IQANDST(intr_idx < 0) | FW_IQ_CMD_IQANUD(1) | - FW_IQ_CMD_IQANDSTINDEX(intr_idx >= 0 ? intr_idx : - -intr_idx - 1)); - c.iqdroprss_to_iqesize = htons(FW_IQ_CMD_IQPCIECH(pi->tx_chan) | - FW_IQ_CMD_IQGTSMODE | - FW_IQ_CMD_IQINTCNTTHRESH(iq->pktcnt_idx) | - FW_IQ_CMD_IQESIZE(ilog2(iq->iqe_len) - 4)); - c.iqsize = htons(iq->size); - c.iqaddr = cpu_to_be64(iq->phys_addr); - - if (fl) { - fl->size = roundup(fl->size, 8); - fl->desc = alloc_ring(adap->pdev_dev, fl->size, sizeof(__be64), - sizeof(struct rx_sw_desc), &fl->addr, - &fl->sdesc, STAT_LEN); - if (!fl->desc) - goto fl_nomem; - - flsz = fl->size / 8 + STAT_LEN / sizeof(struct tx_desc); - c.iqns_to_fl0congen = htonl(FW_IQ_CMD_FL0PACKEN | - FW_IQ_CMD_FL0PADEN); - c.fl0dcaen_to_fl0cidxfthresh = htons(FW_IQ_CMD_FL0FBMIN(2) | - FW_IQ_CMD_FL0FBMAX(3)); - c.fl0size = htons(flsz); - c.fl0addr = cpu_to_be64(fl->addr); - } - - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), &c); - if (ret) - goto err; - - netif_napi_add(dev, &iq->napi, napi_rx_handler, 64); - iq->cur_desc = iq->desc; - iq->cidx = 0; - iq->gen = 1; - iq->next_intr_params = iq->intr_params; - iq->cntxt_id = ntohs(c.iqid); - iq->abs_id = ntohs(c.physiqid); - iq->size--; /* subtract status entry */ - iq->adap = adap; - iq->netdev = dev; - iq->handler = hnd; - - /* set offset to -1 to distinguish ingress queues without FL */ - iq->offset = fl ? 0 : -1; - - adap->sge.ingr_map[iq->cntxt_id] = iq; - - if (fl) { - fl->cntxt_id = htons(c.fl0id); - fl->avail = fl->pend_cred = 0; - fl->pidx = fl->cidx = 0; - fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0; - adap->sge.egr_map[fl->cntxt_id] = fl; - refill_fl(adap, fl, fl_cap(fl), GFP_KERNEL); - } - return 0; - -fl_nomem: - ret = -ENOMEM; -err: - if (iq->desc) { - dma_free_coherent(adap->pdev_dev, iq->size * iq->iqe_len, - iq->desc, iq->phys_addr); - iq->desc = NULL; - } - if (fl && fl->desc) { - kfree(fl->sdesc); - fl->sdesc = NULL; - dma_free_coherent(adap->pdev_dev, flsz * sizeof(struct tx_desc), - fl->desc, fl->addr); - fl->desc = NULL; - } - return ret; -} - -static void init_txq(struct adapter *adap, struct sge_txq *q, unsigned int id) -{ - q->in_use = 0; - q->cidx = q->pidx = 0; - q->stops = q->restarts = 0; - q->stat = (void *)&q->desc[q->size]; - q->cntxt_id = id; - adap->sge.egr_map[id] = q; -} - -int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq, - struct net_device *dev, struct netdev_queue *netdevq, - unsigned int iqid) -{ - int ret, nentries; - struct fw_eq_eth_cmd c; - struct port_info *pi = netdev_priv(dev); - - /* Add status entries */ - nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc); - - txq->q.desc = alloc_ring(adap->pdev_dev, txq->q.size, - sizeof(struct tx_desc), sizeof(struct tx_sw_desc), - &txq->q.phys_addr, &txq->q.sdesc, STAT_LEN); - if (!txq->q.desc) - return -ENOMEM; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_ETH_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_CMD_EXEC | - FW_EQ_ETH_CMD_PFN(0) | FW_EQ_ETH_CMD_VFN(0)); - c.alloc_to_len16 = htonl(FW_EQ_ETH_CMD_ALLOC | - FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c)); - c.viid_pkd = htonl(FW_EQ_ETH_CMD_VIID(pi->viid)); - c.fetchszm_to_iqid = htonl(FW_EQ_ETH_CMD_HOSTFCMODE(2) | - FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) | - FW_EQ_ETH_CMD_IQID(iqid)); - c.dcaen_to_eqsize = htonl(FW_EQ_ETH_CMD_FBMIN(2) | - FW_EQ_ETH_CMD_FBMAX(3) | - FW_EQ_ETH_CMD_CIDXFTHRESH(5) | - FW_EQ_ETH_CMD_EQSIZE(nentries)); - c.eqaddr = cpu_to_be64(txq->q.phys_addr); - - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), &c); - if (ret) { - kfree(txq->q.sdesc); - txq->q.sdesc = NULL; - dma_free_coherent(adap->pdev_dev, - nentries * sizeof(struct tx_desc), - txq->q.desc, txq->q.phys_addr); - txq->q.desc = NULL; - return ret; - } - - init_txq(adap, &txq->q, FW_EQ_ETH_CMD_EQID_GET(ntohl(c.eqid_pkd))); - txq->txq = netdevq; - txq->tso = txq->tx_cso = txq->vlan_ins = 0; - txq->mapping_err = 0; - return 0; -} - -int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq, - struct net_device *dev, unsigned int iqid, - unsigned int cmplqid) -{ - int ret, nentries; - struct fw_eq_ctrl_cmd c; - struct port_info *pi = netdev_priv(dev); - - /* Add status entries */ - nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc); - - txq->q.desc = alloc_ring(adap->pdev_dev, nentries, - sizeof(struct tx_desc), 0, &txq->q.phys_addr, - NULL, 0); - if (!txq->q.desc) - return -ENOMEM; - - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_CTRL_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_CMD_EXEC | - FW_EQ_CTRL_CMD_PFN(0) | FW_EQ_CTRL_CMD_VFN(0)); - c.alloc_to_len16 = htonl(FW_EQ_CTRL_CMD_ALLOC | - FW_EQ_CTRL_CMD_EQSTART | FW_LEN16(c)); - c.cmpliqid_eqid = htonl(FW_EQ_CTRL_CMD_CMPLIQID(cmplqid)); - c.physeqid_pkd = htonl(0); - c.fetchszm_to_iqid = htonl(FW_EQ_CTRL_CMD_HOSTFCMODE(2) | - FW_EQ_CTRL_CMD_PCIECHN(pi->tx_chan) | - FW_EQ_CTRL_CMD_IQID(iqid)); - c.dcaen_to_eqsize = htonl(FW_EQ_CTRL_CMD_FBMIN(2) | - FW_EQ_CTRL_CMD_FBMAX(3) | - FW_EQ_CTRL_CMD_CIDXFTHRESH(5) | - FW_EQ_CTRL_CMD_EQSIZE(nentries)); - c.eqaddr = cpu_to_be64(txq->q.phys_addr); - - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), &c); - if (ret) { - dma_free_coherent(adap->pdev_dev, - nentries * sizeof(struct tx_desc), - txq->q.desc, txq->q.phys_addr); - txq->q.desc = NULL; - return ret; - } - - init_txq(adap, &txq->q, FW_EQ_CTRL_CMD_EQID_GET(ntohl(c.cmpliqid_eqid))); - txq->adap = adap; - skb_queue_head_init(&txq->sendq); - tasklet_init(&txq->qresume_tsk, restart_ctrlq, (unsigned long)txq); - txq->full = 0; - return 0; -} - -int t4_sge_alloc_ofld_txq(struct adapter *adap, struct sge_ofld_txq *txq, - struct net_device *dev, unsigned int iqid) -{ - int ret, nentries; - struct fw_eq_ofld_cmd c; - struct port_info *pi = netdev_priv(dev); - - /* Add status entries */ - nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc); - - txq->q.desc = alloc_ring(adap->pdev_dev, txq->q.size, - sizeof(struct tx_desc), sizeof(struct tx_sw_desc), - &txq->q.phys_addr, &txq->q.sdesc, STAT_LEN); - if (!txq->q.desc) - return -ENOMEM; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_OFLD_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_CMD_EXEC | - FW_EQ_OFLD_CMD_PFN(0) | FW_EQ_OFLD_CMD_VFN(0)); - c.alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_ALLOC | - FW_EQ_OFLD_CMD_EQSTART | FW_LEN16(c)); - c.fetchszm_to_iqid = htonl(FW_EQ_OFLD_CMD_HOSTFCMODE(2) | - FW_EQ_OFLD_CMD_PCIECHN(pi->tx_chan) | - FW_EQ_OFLD_CMD_IQID(iqid)); - c.dcaen_to_eqsize = htonl(FW_EQ_OFLD_CMD_FBMIN(2) | - FW_EQ_OFLD_CMD_FBMAX(3) | - FW_EQ_OFLD_CMD_CIDXFTHRESH(5) | - FW_EQ_OFLD_CMD_EQSIZE(nentries)); - c.eqaddr = cpu_to_be64(txq->q.phys_addr); - - ret = t4_wr_mbox(adap, 0, &c, sizeof(c), &c); - if (ret) { - kfree(txq->q.sdesc); - txq->q.sdesc = NULL; - dma_free_coherent(adap->pdev_dev, - nentries * sizeof(struct tx_desc), - txq->q.desc, txq->q.phys_addr); - txq->q.desc = NULL; - return ret; - } - - init_txq(adap, &txq->q, FW_EQ_OFLD_CMD_EQID_GET(ntohl(c.eqid_pkd))); - txq->adap = adap; - skb_queue_head_init(&txq->sendq); - tasklet_init(&txq->qresume_tsk, restart_ofldq, (unsigned long)txq); - txq->full = 0; - txq->mapping_err = 0; - return 0; -} - -static void free_txq(struct adapter *adap, struct sge_txq *q) -{ - dma_free_coherent(adap->pdev_dev, - q->size * sizeof(struct tx_desc) + STAT_LEN, - q->desc, q->phys_addr); - q->cntxt_id = 0; - q->sdesc = NULL; - q->desc = NULL; -} - -static void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, - struct sge_fl *fl) -{ - unsigned int fl_id = fl ? fl->cntxt_id : 0xffff; - - adap->sge.ingr_map[rq->cntxt_id] = NULL; - t4_iq_free(adap, 0, 0, 0, FW_IQ_TYPE_FL_INT_CAP, rq->cntxt_id, fl_id, - 0xffff); - dma_free_coherent(adap->pdev_dev, (rq->size + 1) * rq->iqe_len, - rq->desc, rq->phys_addr); - netif_napi_del(&rq->napi); - rq->netdev = NULL; - rq->cntxt_id = rq->abs_id = 0; - rq->desc = NULL; - - if (fl) { - free_rx_bufs(adap, fl, fl->avail); - dma_free_coherent(adap->pdev_dev, fl->size * 8 + STAT_LEN, - fl->desc, fl->addr); - kfree(fl->sdesc); - fl->sdesc = NULL; - fl->cntxt_id = 0; - fl->desc = NULL; - } -} - -/** - * t4_free_sge_resources - free SGE resources - * @adap: the adapter - * - * Frees resources used by the SGE queue sets. - */ -void t4_free_sge_resources(struct adapter *adap) -{ - int i; - struct sge_eth_rxq *eq = adap->sge.ethrxq; - struct sge_eth_txq *etq = adap->sge.ethtxq; - struct sge_ofld_rxq *oq = adap->sge.ofldrxq; - - /* clean up Ethernet Tx/Rx queues */ - for (i = 0; i < adap->sge.ethqsets; i++, eq++, etq++) { - if (eq->rspq.desc) - free_rspq_fl(adap, &eq->rspq, &eq->fl); - if (etq->q.desc) { - t4_eth_eq_free(adap, 0, 0, 0, etq->q.cntxt_id); - free_tx_desc(adap, &etq->q, etq->q.in_use, true); - kfree(etq->q.sdesc); - free_txq(adap, &etq->q); - } - } - - /* clean up RDMA and iSCSI Rx queues */ - for (i = 0; i < adap->sge.ofldqsets; i++, oq++) { - if (oq->rspq.desc) - free_rspq_fl(adap, &oq->rspq, &oq->fl); - } - for (i = 0, oq = adap->sge.rdmarxq; i < adap->sge.rdmaqs; i++, oq++) { - if (oq->rspq.desc) - free_rspq_fl(adap, &oq->rspq, &oq->fl); - } - - /* clean up offload Tx queues */ - for (i = 0; i < ARRAY_SIZE(adap->sge.ofldtxq); i++) { - struct sge_ofld_txq *q = &adap->sge.ofldtxq[i]; - - if (q->q.desc) { - tasklet_kill(&q->qresume_tsk); - t4_ofld_eq_free(adap, 0, 0, 0, q->q.cntxt_id); - free_tx_desc(adap, &q->q, q->q.in_use, false); - kfree(q->q.sdesc); - __skb_queue_purge(&q->sendq); - free_txq(adap, &q->q); - } - } - - /* clean up control Tx queues */ - for (i = 0; i < ARRAY_SIZE(adap->sge.ctrlq); i++) { - struct sge_ctrl_txq *cq = &adap->sge.ctrlq[i]; - - if (cq->q.desc) { - tasklet_kill(&cq->qresume_tsk); - t4_ctrl_eq_free(adap, 0, 0, 0, cq->q.cntxt_id); - __skb_queue_purge(&cq->sendq); - free_txq(adap, &cq->q); - } - } - - if (adap->sge.fw_evtq.desc) - free_rspq_fl(adap, &adap->sge.fw_evtq, NULL); - - if (adap->sge.intrq.desc) - free_rspq_fl(adap, &adap->sge.intrq, NULL); - - /* clear the reverse egress queue map */ - memset(adap->sge.egr_map, 0, sizeof(adap->sge.egr_map)); -} - -void t4_sge_start(struct adapter *adap) -{ - adap->sge.ethtxq_rover = 0; - mod_timer(&adap->sge.rx_timer, jiffies + RX_QCHECK_PERIOD); - mod_timer(&adap->sge.tx_timer, jiffies + TX_QCHECK_PERIOD); -} - -/** - * t4_sge_stop - disable SGE operation - * @adap: the adapter - * - * Stop tasklets and timers associated with the DMA engine. Note that - * this is effective only if measures have been taken to disable any HW - * events that may restart them. - */ -void t4_sge_stop(struct adapter *adap) -{ - int i; - struct sge *s = &adap->sge; - - if (in_interrupt()) /* actions below require waiting */ - return; - - if (s->rx_timer.function) - del_timer_sync(&s->rx_timer); - if (s->tx_timer.function) - del_timer_sync(&s->tx_timer); - - for (i = 0; i < ARRAY_SIZE(s->ofldtxq); i++) { - struct sge_ofld_txq *q = &s->ofldtxq[i]; - - if (q->q.desc) - tasklet_kill(&q->qresume_tsk); - } - for (i = 0; i < ARRAY_SIZE(s->ctrlq); i++) { - struct sge_ctrl_txq *cq = &s->ctrlq[i]; - - if (cq->q.desc) - tasklet_kill(&cq->qresume_tsk); - } -} - -/** - * t4_sge_init - initialize SGE - * @adap: the adapter - * - * Performs SGE initialization needed every time after a chip reset. - * We do not initialize any of the queues here, instead the driver - * top-level must request them individually. - */ -void t4_sge_init(struct adapter *adap) -{ - struct sge *s = &adap->sge; - unsigned int fl_align_log = ilog2(FL_ALIGN); - - t4_set_reg_field(adap, SGE_CONTROL, PKTSHIFT_MASK | - INGPADBOUNDARY_MASK | EGRSTATUSPAGESIZE, - INGPADBOUNDARY(fl_align_log - 5) | PKTSHIFT(2) | - RXPKTCPLMODE | - (STAT_LEN == 128 ? EGRSTATUSPAGESIZE : 0)); - t4_set_reg_field(adap, SGE_HOST_PAGE_SIZE, HOSTPAGESIZEPF0_MASK, - HOSTPAGESIZEPF0(PAGE_SHIFT - 10)); - t4_write_reg(adap, SGE_FL_BUFFER_SIZE0, PAGE_SIZE); -#if FL_PG_ORDER > 0 - t4_write_reg(adap, SGE_FL_BUFFER_SIZE1, PAGE_SIZE << FL_PG_ORDER); -#endif - t4_write_reg(adap, SGE_INGRESS_RX_THRESHOLD, - THRESHOLD_0(s->counter_val[0]) | - THRESHOLD_1(s->counter_val[1]) | - THRESHOLD_2(s->counter_val[2]) | - THRESHOLD_3(s->counter_val[3])); - t4_write_reg(adap, SGE_TIMER_VALUE_0_AND_1, - TIMERVALUE0(us_to_core_ticks(adap, s->timer_val[0])) | - TIMERVALUE1(us_to_core_ticks(adap, s->timer_val[1]))); - t4_write_reg(adap, SGE_TIMER_VALUE_2_AND_3, - TIMERVALUE0(us_to_core_ticks(adap, s->timer_val[2])) | - TIMERVALUE1(us_to_core_ticks(adap, s->timer_val[3]))); - t4_write_reg(adap, SGE_TIMER_VALUE_4_AND_5, - TIMERVALUE0(us_to_core_ticks(adap, s->timer_val[4])) | - TIMERVALUE1(us_to_core_ticks(adap, s->timer_val[5]))); - setup_timer(&s->rx_timer, sge_rx_timer_cb, (unsigned long)adap); - setup_timer(&s->tx_timer, sge_tx_timer_cb, (unsigned long)adap); - s->starve_thres = core_ticks_per_usec(adap) * 1000000; /* 1 s */ - s->idma_state[0] = s->idma_state[1] = 0; - spin_lock_init(&s->intrq_lock); -} diff --git a/trunk/drivers/net/cxgb4/t4_hw.c b/trunk/drivers/net/cxgb4/t4_hw.c deleted file mode 100644 index a814a3afe123..000000000000 --- a/trunk/drivers/net/cxgb4/t4_hw.c +++ /dev/null @@ -1,3131 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include "cxgb4.h" -#include "t4_regs.h" -#include "t4fw_api.h" - -/** - * t4_wait_op_done_val - wait until an operation is completed - * @adapter: the adapter performing the operation - * @reg: the register to check for completion - * @mask: a single-bit field within @reg that indicates completion - * @polarity: the value of the field when the operation is completed - * @attempts: number of check iterations - * @delay: delay in usecs between iterations - * @valp: where to store the value of the register at completion time - * - * Wait until an operation is completed by checking a bit in a register - * up to @attempts times. If @valp is not NULL the value of the register - * at the time it indicated completion is stored there. Returns 0 if the - * operation completes and -EAGAIN otherwise. - */ -int t4_wait_op_done_val(struct adapter *adapter, int reg, u32 mask, - int polarity, int attempts, int delay, u32 *valp) -{ - while (1) { - u32 val = t4_read_reg(adapter, reg); - - if (!!(val & mask) == polarity) { - if (valp) - *valp = val; - return 0; - } - if (--attempts == 0) - return -EAGAIN; - if (delay) - udelay(delay); - } -} - -static inline int t4_wait_op_done(struct adapter *adapter, int reg, u32 mask, - int polarity, int attempts, int delay) -{ - return t4_wait_op_done_val(adapter, reg, mask, polarity, attempts, - delay, NULL); -} - -/** - * t4_set_reg_field - set a register field to a value - * @adapter: the adapter to program - * @addr: the register address - * @mask: specifies the portion of the register to modify - * @val: the new value for the register field - * - * Sets a register field specified by the supplied mask to the - * given value. - */ -void t4_set_reg_field(struct adapter *adapter, unsigned int addr, u32 mask, - u32 val) -{ - u32 v = t4_read_reg(adapter, addr) & ~mask; - - t4_write_reg(adapter, addr, v | val); - (void) t4_read_reg(adapter, addr); /* flush */ -} - -/** - * t4_read_indirect - read indirectly addressed registers - * @adap: the adapter - * @addr_reg: register holding the indirect address - * @data_reg: register holding the value of the indirect register - * @vals: where the read register values are stored - * @nregs: how many indirect registers to read - * @start_idx: index of first indirect register to read - * - * Reads registers that are accessed indirectly through an address/data - * register pair. - */ -void t4_read_indirect(struct adapter *adap, unsigned int addr_reg, - unsigned int data_reg, u32 *vals, unsigned int nregs, - unsigned int start_idx) -{ - while (nregs--) { - t4_write_reg(adap, addr_reg, start_idx); - *vals++ = t4_read_reg(adap, data_reg); - start_idx++; - } -} - -/** - * t4_write_indirect - write indirectly addressed registers - * @adap: the adapter - * @addr_reg: register holding the indirect addresses - * @data_reg: register holding the value for the indirect registers - * @vals: values to write - * @nregs: how many indirect registers to write - * @start_idx: address of first indirect register to write - * - * Writes a sequential block of registers that are accessed indirectly - * through an address/data register pair. - */ -void t4_write_indirect(struct adapter *adap, unsigned int addr_reg, - unsigned int data_reg, const u32 *vals, - unsigned int nregs, unsigned int start_idx) -{ - while (nregs--) { - t4_write_reg(adap, addr_reg, start_idx++); - t4_write_reg(adap, data_reg, *vals++); - } -} - -/* - * Get the reply to a mailbox command and store it in @rpl in big-endian order. - */ -static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit, - u32 mbox_addr) -{ - for ( ; nflit; nflit--, mbox_addr += 8) - *rpl++ = cpu_to_be64(t4_read_reg64(adap, mbox_addr)); -} - -/* - * Handle a FW assertion reported in a mailbox. - */ -static void fw_asrt(struct adapter *adap, u32 mbox_addr) -{ - struct fw_debug_cmd asrt; - - get_mbox_rpl(adap, (__be64 *)&asrt, sizeof(asrt) / 8, mbox_addr); - dev_alert(adap->pdev_dev, - "FW assertion at %.16s:%u, val0 %#x, val1 %#x\n", - asrt.u.assert.filename_0_7, ntohl(asrt.u.assert.line), - ntohl(asrt.u.assert.x), ntohl(asrt.u.assert.y)); -} - -static void dump_mbox(struct adapter *adap, int mbox, u32 data_reg) -{ - dev_err(adap->pdev_dev, - "mbox %d: %llx %llx %llx %llx %llx %llx %llx %llx\n", mbox, - (unsigned long long)t4_read_reg64(adap, data_reg), - (unsigned long long)t4_read_reg64(adap, data_reg + 8), - (unsigned long long)t4_read_reg64(adap, data_reg + 16), - (unsigned long long)t4_read_reg64(adap, data_reg + 24), - (unsigned long long)t4_read_reg64(adap, data_reg + 32), - (unsigned long long)t4_read_reg64(adap, data_reg + 40), - (unsigned long long)t4_read_reg64(adap, data_reg + 48), - (unsigned long long)t4_read_reg64(adap, data_reg + 56)); -} - -/** - * t4_wr_mbox_meat - send a command to FW through the given mailbox - * @adap: the adapter - * @mbox: index of the mailbox to use - * @cmd: the command to write - * @size: command length in bytes - * @rpl: where to optionally store the reply - * @sleep_ok: if true we may sleep while awaiting command completion - * - * Sends the given command to FW through the selected mailbox and waits - * for the FW to execute the command. If @rpl is not %NULL it is used to - * store the FW's reply to the command. The command and its optional - * reply are of the same length. FW can take up to %FW_CMD_MAX_TIMEOUT ms - * to respond. @sleep_ok determines whether we may sleep while awaiting - * the response. If sleeping is allowed we use progressive backoff - * otherwise we spin. - * - * The return value is 0 on success or a negative errno on failure. A - * failure can happen either because we are not able to execute the - * command or FW executes it but signals an error. In the latter case - * the return value is the error code indicated by FW (negated). - */ -int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, - void *rpl, bool sleep_ok) -{ - static int delay[] = { - 1, 1, 3, 5, 10, 10, 20, 50, 100, 200 - }; - - u32 v; - u64 res; - int i, ms, delay_idx; - const __be64 *p = cmd; - u32 data_reg = PF_REG(mbox, CIM_PF_MAILBOX_DATA); - u32 ctl_reg = PF_REG(mbox, CIM_PF_MAILBOX_CTRL); - - if ((size & 15) || size > MBOX_LEN) - return -EINVAL; - - v = MBOWNER_GET(t4_read_reg(adap, ctl_reg)); - for (i = 0; v == MBOX_OWNER_NONE && i < 3; i++) - v = MBOWNER_GET(t4_read_reg(adap, ctl_reg)); - - if (v != MBOX_OWNER_DRV) - return v ? -EBUSY : -ETIMEDOUT; - - for (i = 0; i < size; i += 8) - t4_write_reg64(adap, data_reg + i, be64_to_cpu(*p++)); - - t4_write_reg(adap, ctl_reg, MBMSGVALID | MBOWNER(MBOX_OWNER_FW)); - t4_read_reg(adap, ctl_reg); /* flush write */ - - delay_idx = 0; - ms = delay[0]; - - for (i = 0; i < FW_CMD_MAX_TIMEOUT; i += ms) { - if (sleep_ok) { - ms = delay[delay_idx]; /* last element may repeat */ - if (delay_idx < ARRAY_SIZE(delay) - 1) - delay_idx++; - msleep(ms); - } else - mdelay(ms); - - v = t4_read_reg(adap, ctl_reg); - if (MBOWNER_GET(v) == MBOX_OWNER_DRV) { - if (!(v & MBMSGVALID)) { - t4_write_reg(adap, ctl_reg, 0); - continue; - } - - res = t4_read_reg64(adap, data_reg); - if (FW_CMD_OP_GET(res >> 32) == FW_DEBUG_CMD) { - fw_asrt(adap, data_reg); - res = FW_CMD_RETVAL(EIO); - } else if (rpl) - get_mbox_rpl(adap, rpl, size / 8, data_reg); - - if (FW_CMD_RETVAL_GET((int)res)) - dump_mbox(adap, mbox, data_reg); - t4_write_reg(adap, ctl_reg, 0); - return -FW_CMD_RETVAL_GET((int)res); - } - } - - dump_mbox(adap, mbox, data_reg); - dev_err(adap->pdev_dev, "command %#x in mailbox %d timed out\n", - *(const u8 *)cmd, mbox); - return -ETIMEDOUT; -} - -/** - * t4_mc_read - read from MC through backdoor accesses - * @adap: the adapter - * @addr: address of first byte requested - * @data: 64 bytes of data containing the requested address - * @ecc: where to store the corresponding 64-bit ECC word - * - * Read 64 bytes of data from MC starting at a 64-byte-aligned address - * that covers the requested address @addr. If @parity is not %NULL it - * is assigned the 64-bit ECC word for the read data. - */ -int t4_mc_read(struct adapter *adap, u32 addr, __be32 *data, u64 *ecc) -{ - int i; - - if (t4_read_reg(adap, MC_BIST_CMD) & START_BIST) - return -EBUSY; - t4_write_reg(adap, MC_BIST_CMD_ADDR, addr & ~0x3fU); - t4_write_reg(adap, MC_BIST_CMD_LEN, 64); - t4_write_reg(adap, MC_BIST_DATA_PATTERN, 0xc); - t4_write_reg(adap, MC_BIST_CMD, BIST_OPCODE(1) | START_BIST | - BIST_CMD_GAP(1)); - i = t4_wait_op_done(adap, MC_BIST_CMD, START_BIST, 0, 10, 1); - if (i) - return i; - -#define MC_DATA(i) MC_BIST_STATUS_REG(MC_BIST_STATUS_RDATA, i) - - for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, MC_DATA(i))); - if (ecc) - *ecc = t4_read_reg64(adap, MC_DATA(16)); -#undef MC_DATA - return 0; -} - -/** - * t4_edc_read - read from EDC through backdoor accesses - * @adap: the adapter - * @idx: which EDC to access - * @addr: address of first byte requested - * @data: 64 bytes of data containing the requested address - * @ecc: where to store the corresponding 64-bit ECC word - * - * Read 64 bytes of data from EDC starting at a 64-byte-aligned address - * that covers the requested address @addr. If @parity is not %NULL it - * is assigned the 64-bit ECC word for the read data. - */ -int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *ecc) -{ - int i; - - idx *= EDC_STRIDE; - if (t4_read_reg(adap, EDC_BIST_CMD + idx) & START_BIST) - return -EBUSY; - t4_write_reg(adap, EDC_BIST_CMD_ADDR + idx, addr & ~0x3fU); - t4_write_reg(adap, EDC_BIST_CMD_LEN + idx, 64); - t4_write_reg(adap, EDC_BIST_DATA_PATTERN + idx, 0xc); - t4_write_reg(adap, EDC_BIST_CMD + idx, - BIST_OPCODE(1) | BIST_CMD_GAP(1) | START_BIST); - i = t4_wait_op_done(adap, EDC_BIST_CMD + idx, START_BIST, 0, 10, 1); - if (i) - return i; - -#define EDC_DATA(i) (EDC_BIST_STATUS_REG(EDC_BIST_STATUS_RDATA, i) + idx) - - for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, EDC_DATA(i))); - if (ecc) - *ecc = t4_read_reg64(adap, EDC_DATA(16)); -#undef EDC_DATA - return 0; -} - -#define VPD_ENTRY(name, len) \ - u8 name##_kword[2]; u8 name##_len; u8 name##_data[len] - -/* - * Partial EEPROM Vital Product Data structure. Includes only the ID and - * VPD-R sections. - */ -struct t4_vpd { - u8 id_tag; - u8 id_len[2]; - u8 id_data[ID_LEN]; - u8 vpdr_tag; - u8 vpdr_len[2]; - VPD_ENTRY(pn, 16); /* part number */ - VPD_ENTRY(ec, EC_LEN); /* EC level */ - VPD_ENTRY(sn, SERNUM_LEN); /* serial number */ - VPD_ENTRY(na, 12); /* MAC address base */ - VPD_ENTRY(port_type, 8); /* port types */ - VPD_ENTRY(gpio, 14); /* GPIO usage */ - VPD_ENTRY(cclk, 6); /* core clock */ - VPD_ENTRY(port_addr, 8); /* port MDIO addresses */ - VPD_ENTRY(rv, 1); /* csum */ - u32 pad; /* for multiple-of-4 sizing and alignment */ -}; - -#define EEPROM_STAT_ADDR 0x7bfc -#define VPD_BASE 0 - -/** - * t4_seeprom_wp - enable/disable EEPROM write protection - * @adapter: the adapter - * @enable: whether to enable or disable write protection - * - * Enables or disables write protection on the serial EEPROM. - */ -int t4_seeprom_wp(struct adapter *adapter, bool enable) -{ - unsigned int v = enable ? 0xc : 0; - int ret = pci_write_vpd(adapter->pdev, EEPROM_STAT_ADDR, 4, &v); - return ret < 0 ? ret : 0; -} - -/** - * get_vpd_params - read VPD parameters from VPD EEPROM - * @adapter: adapter to read - * @p: where to store the parameters - * - * Reads card parameters stored in VPD EEPROM. - */ -static int get_vpd_params(struct adapter *adapter, struct vpd_params *p) -{ - int ret; - struct t4_vpd vpd; - u8 *q = (u8 *)&vpd, csum; - - ret = pci_read_vpd(adapter->pdev, VPD_BASE, sizeof(vpd), &vpd); - if (ret < 0) - return ret; - - for (csum = 0; q <= vpd.rv_data; q++) - csum += *q; - - if (csum) { - dev_err(adapter->pdev_dev, - "corrupted VPD EEPROM, actual csum %u\n", csum); - return -EINVAL; - } - - p->cclk = simple_strtoul(vpd.cclk_data, NULL, 10); - memcpy(p->id, vpd.id_data, sizeof(vpd.id_data)); - strim(p->id); - memcpy(p->ec, vpd.ec_data, sizeof(vpd.ec_data)); - strim(p->ec); - memcpy(p->sn, vpd.sn_data, sizeof(vpd.sn_data)); - strim(p->sn); - return 0; -} - -/* serial flash and firmware constants */ -enum { - SF_ATTEMPTS = 10, /* max retries for SF operations */ - - /* flash command opcodes */ - SF_PROG_PAGE = 2, /* program page */ - SF_WR_DISABLE = 4, /* disable writes */ - SF_RD_STATUS = 5, /* read status register */ - SF_WR_ENABLE = 6, /* enable writes */ - SF_RD_DATA_FAST = 0xb, /* read flash */ - SF_ERASE_SECTOR = 0xd8, /* erase sector */ - - FW_START_SEC = 8, /* first flash sector for FW */ - FW_END_SEC = 15, /* last flash sector for FW */ - FW_IMG_START = FW_START_SEC * SF_SEC_SIZE, - FW_MAX_SIZE = (FW_END_SEC - FW_START_SEC + 1) * SF_SEC_SIZE, -}; - -/** - * sf1_read - read data from the serial flash - * @adapter: the adapter - * @byte_cnt: number of bytes to read - * @cont: whether another operation will be chained - * @lock: whether to lock SF for PL access only - * @valp: where to store the read data - * - * Reads up to 4 bytes of data from the serial flash. The location of - * the read needs to be specified prior to calling this by issuing the - * appropriate commands to the serial flash. - */ -static int sf1_read(struct adapter *adapter, unsigned int byte_cnt, int cont, - int lock, u32 *valp) -{ - int ret; - - if (!byte_cnt || byte_cnt > 4) - return -EINVAL; - if (t4_read_reg(adapter, SF_OP) & BUSY) - return -EBUSY; - cont = cont ? SF_CONT : 0; - lock = lock ? SF_LOCK : 0; - t4_write_reg(adapter, SF_OP, lock | cont | BYTECNT(byte_cnt - 1)); - ret = t4_wait_op_done(adapter, SF_OP, BUSY, 0, SF_ATTEMPTS, 5); - if (!ret) - *valp = t4_read_reg(adapter, SF_DATA); - return ret; -} - -/** - * sf1_write - write data to the serial flash - * @adapter: the adapter - * @byte_cnt: number of bytes to write - * @cont: whether another operation will be chained - * @lock: whether to lock SF for PL access only - * @val: value to write - * - * Writes up to 4 bytes of data to the serial flash. The location of - * the write needs to be specified prior to calling this by issuing the - * appropriate commands to the serial flash. - */ -static int sf1_write(struct adapter *adapter, unsigned int byte_cnt, int cont, - int lock, u32 val) -{ - if (!byte_cnt || byte_cnt > 4) - return -EINVAL; - if (t4_read_reg(adapter, SF_OP) & BUSY) - return -EBUSY; - cont = cont ? SF_CONT : 0; - lock = lock ? SF_LOCK : 0; - t4_write_reg(adapter, SF_DATA, val); - t4_write_reg(adapter, SF_OP, lock | - cont | BYTECNT(byte_cnt - 1) | OP_WR); - return t4_wait_op_done(adapter, SF_OP, BUSY, 0, SF_ATTEMPTS, 5); -} - -/** - * flash_wait_op - wait for a flash operation to complete - * @adapter: the adapter - * @attempts: max number of polls of the status register - * @delay: delay between polls in ms - * - * Wait for a flash operation to complete by polling the status register. - */ -static int flash_wait_op(struct adapter *adapter, int attempts, int delay) -{ - int ret; - u32 status; - - while (1) { - if ((ret = sf1_write(adapter, 1, 1, 1, SF_RD_STATUS)) != 0 || - (ret = sf1_read(adapter, 1, 0, 1, &status)) != 0) - return ret; - if (!(status & 1)) - return 0; - if (--attempts == 0) - return -EAGAIN; - if (delay) - msleep(delay); - } -} - -/** - * t4_read_flash - read words from serial flash - * @adapter: the adapter - * @addr: the start address for the read - * @nwords: how many 32-bit words to read - * @data: where to store the read data - * @byte_oriented: whether to store data as bytes or as words - * - * Read the specified number of 32-bit words from the serial flash. - * If @byte_oriented is set the read data is stored as a byte array - * (i.e., big-endian), otherwise as 32-bit words in the platform's - * natural endianess. - */ -int t4_read_flash(struct adapter *adapter, unsigned int addr, - unsigned int nwords, u32 *data, int byte_oriented) -{ - int ret; - - if (addr + nwords * sizeof(u32) > SF_SIZE || (addr & 3)) - return -EINVAL; - - addr = swab32(addr) | SF_RD_DATA_FAST; - - if ((ret = sf1_write(adapter, 4, 1, 0, addr)) != 0 || - (ret = sf1_read(adapter, 1, 1, 0, data)) != 0) - return ret; - - for ( ; nwords; nwords--, data++) { - ret = sf1_read(adapter, 4, nwords > 1, nwords == 1, data); - if (nwords == 1) - t4_write_reg(adapter, SF_OP, 0); /* unlock SF */ - if (ret) - return ret; - if (byte_oriented) - *data = htonl(*data); - } - return 0; -} - -/** - * t4_write_flash - write up to a page of data to the serial flash - * @adapter: the adapter - * @addr: the start address to write - * @n: length of data to write in bytes - * @data: the data to write - * - * Writes up to a page of data (256 bytes) to the serial flash starting - * at the given address. All the data must be written to the same page. - */ -static int t4_write_flash(struct adapter *adapter, unsigned int addr, - unsigned int n, const u8 *data) -{ - int ret; - u32 buf[64]; - unsigned int i, c, left, val, offset = addr & 0xff; - - if (addr >= SF_SIZE || offset + n > SF_PAGE_SIZE) - return -EINVAL; - - val = swab32(addr) | SF_PROG_PAGE; - - if ((ret = sf1_write(adapter, 1, 0, 1, SF_WR_ENABLE)) != 0 || - (ret = sf1_write(adapter, 4, 1, 1, val)) != 0) - goto unlock; - - for (left = n; left; left -= c) { - c = min(left, 4U); - for (val = 0, i = 0; i < c; ++i) - val = (val << 8) + *data++; - - ret = sf1_write(adapter, c, c != left, 1, val); - if (ret) - goto unlock; - } - ret = flash_wait_op(adapter, 5, 1); - if (ret) - goto unlock; - - t4_write_reg(adapter, SF_OP, 0); /* unlock SF */ - - /* Read the page to verify the write succeeded */ - ret = t4_read_flash(adapter, addr & ~0xff, ARRAY_SIZE(buf), buf, 1); - if (ret) - return ret; - - if (memcmp(data - n, (u8 *)buf + offset, n)) { - dev_err(adapter->pdev_dev, - "failed to correctly write the flash page at %#x\n", - addr); - return -EIO; - } - return 0; - -unlock: - t4_write_reg(adapter, SF_OP, 0); /* unlock SF */ - return ret; -} - -/** - * get_fw_version - read the firmware version - * @adapter: the adapter - * @vers: where to place the version - * - * Reads the FW version from flash. - */ -static int get_fw_version(struct adapter *adapter, u32 *vers) -{ - return t4_read_flash(adapter, - FW_IMG_START + offsetof(struct fw_hdr, fw_ver), 1, - vers, 0); -} - -/** - * get_tp_version - read the TP microcode version - * @adapter: the adapter - * @vers: where to place the version - * - * Reads the TP microcode version from flash. - */ -static int get_tp_version(struct adapter *adapter, u32 *vers) -{ - return t4_read_flash(adapter, FW_IMG_START + offsetof(struct fw_hdr, - tp_microcode_ver), - 1, vers, 0); -} - -/** - * t4_check_fw_version - check if the FW is compatible with this driver - * @adapter: the adapter - * - * Checks if an adapter's FW is compatible with the driver. Returns 0 - * if there's exact match, a negative error if the version could not be - * read or there's a major version mismatch, and a positive value if the - * expected major version is found but there's a minor version mismatch. - */ -int t4_check_fw_version(struct adapter *adapter) -{ - u32 api_vers[2]; - int ret, major, minor, micro; - - ret = get_fw_version(adapter, &adapter->params.fw_vers); - if (!ret) - ret = get_tp_version(adapter, &adapter->params.tp_vers); - if (!ret) - ret = t4_read_flash(adapter, - FW_IMG_START + offsetof(struct fw_hdr, intfver_nic), - 2, api_vers, 1); - if (ret) - return ret; - - major = FW_HDR_FW_VER_MAJOR_GET(adapter->params.fw_vers); - minor = FW_HDR_FW_VER_MINOR_GET(adapter->params.fw_vers); - micro = FW_HDR_FW_VER_MICRO_GET(adapter->params.fw_vers); - memcpy(adapter->params.api_vers, api_vers, - sizeof(adapter->params.api_vers)); - - if (major != FW_VERSION_MAJOR) { /* major mismatch - fail */ - dev_err(adapter->pdev_dev, - "card FW has major version %u, driver wants %u\n", - major, FW_VERSION_MAJOR); - return -EINVAL; - } - - if (minor == FW_VERSION_MINOR && micro == FW_VERSION_MICRO) - return 0; /* perfect match */ - - /* Minor/micro version mismatch. Report it but often it's OK. */ - return 1; -} - -/** - * t4_flash_erase_sectors - erase a range of flash sectors - * @adapter: the adapter - * @start: the first sector to erase - * @end: the last sector to erase - * - * Erases the sectors in the given inclusive range. - */ -static int t4_flash_erase_sectors(struct adapter *adapter, int start, int end) -{ - int ret = 0; - - while (start <= end) { - if ((ret = sf1_write(adapter, 1, 0, 1, SF_WR_ENABLE)) != 0 || - (ret = sf1_write(adapter, 4, 0, 1, - SF_ERASE_SECTOR | (start << 8))) != 0 || - (ret = flash_wait_op(adapter, 5, 500)) != 0) { - dev_err(adapter->pdev_dev, - "erase of flash sector %d failed, error %d\n", - start, ret); - break; - } - start++; - } - t4_write_reg(adapter, SF_OP, 0); /* unlock SF */ - return ret; -} - -/** - * t4_load_fw - download firmware - * @adap: the adapter - * @fw_data: the firmware image to write - * @size: image size - * - * Write the supplied firmware image to the card's serial flash. - */ -int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size) -{ - u32 csum; - int ret, addr; - unsigned int i; - u8 first_page[SF_PAGE_SIZE]; - const u32 *p = (const u32 *)fw_data; - const struct fw_hdr *hdr = (const struct fw_hdr *)fw_data; - - if (!size) { - dev_err(adap->pdev_dev, "FW image has no data\n"); - return -EINVAL; - } - if (size & 511) { - dev_err(adap->pdev_dev, - "FW image size not multiple of 512 bytes\n"); - return -EINVAL; - } - if (ntohs(hdr->len512) * 512 != size) { - dev_err(adap->pdev_dev, - "FW image size differs from size in FW header\n"); - return -EINVAL; - } - if (size > FW_MAX_SIZE) { - dev_err(adap->pdev_dev, "FW image too large, max is %u bytes\n", - FW_MAX_SIZE); - return -EFBIG; - } - - for (csum = 0, i = 0; i < size / sizeof(csum); i++) - csum += ntohl(p[i]); - - if (csum != 0xffffffff) { - dev_err(adap->pdev_dev, - "corrupted firmware image, checksum %#x\n", csum); - return -EINVAL; - } - - i = DIV_ROUND_UP(size, SF_SEC_SIZE); /* # of sectors spanned */ - ret = t4_flash_erase_sectors(adap, FW_START_SEC, FW_START_SEC + i - 1); - if (ret) - goto out; - - /* - * We write the correct version at the end so the driver can see a bad - * version if the FW write fails. Start by writing a copy of the - * first page with a bad version. - */ - memcpy(first_page, fw_data, SF_PAGE_SIZE); - ((struct fw_hdr *)first_page)->fw_ver = htonl(0xffffffff); - ret = t4_write_flash(adap, FW_IMG_START, SF_PAGE_SIZE, first_page); - if (ret) - goto out; - - addr = FW_IMG_START; - for (size -= SF_PAGE_SIZE; size; size -= SF_PAGE_SIZE) { - addr += SF_PAGE_SIZE; - fw_data += SF_PAGE_SIZE; - ret = t4_write_flash(adap, addr, SF_PAGE_SIZE, fw_data); - if (ret) - goto out; - } - - ret = t4_write_flash(adap, - FW_IMG_START + offsetof(struct fw_hdr, fw_ver), - sizeof(hdr->fw_ver), (const u8 *)&hdr->fw_ver); -out: - if (ret) - dev_err(adap->pdev_dev, "firmware download failed, error %d\n", - ret); - return ret; -} - -#define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ - FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_ANEG) - -/** - * t4_link_start - apply link configuration to MAC/PHY - * @phy: the PHY to setup - * @mac: the MAC to setup - * @lc: the requested link configuration - * - * Set up a port's MAC and PHY according to a desired link configuration. - * - If the PHY can auto-negotiate first decide what to advertise, then - * enable/disable auto-negotiation as desired, and reset. - * - If the PHY does not auto-negotiate just reset it. - * - If auto-negotiation is off set the MAC to the proper speed/duplex/FC, - * otherwise do it later based on the outcome of auto-negotiation. - */ -int t4_link_start(struct adapter *adap, unsigned int mbox, unsigned int port, - struct link_config *lc) -{ - struct fw_port_cmd c; - unsigned int fc = 0, mdi = FW_PORT_MDI(FW_PORT_MDI_AUTO); - - lc->link_ok = 0; - if (lc->requested_fc & PAUSE_RX) - fc |= FW_PORT_CAP_FC_RX; - if (lc->requested_fc & PAUSE_TX) - fc |= FW_PORT_CAP_FC_TX; - - memset(&c, 0, sizeof(c)); - c.op_to_portid = htonl(FW_CMD_OP(FW_PORT_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_PORT_CMD_PORTID(port)); - c.action_to_len16 = htonl(FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) | - FW_LEN16(c)); - - if (!(lc->supported & FW_PORT_CAP_ANEG)) { - c.u.l1cfg.rcap = htonl((lc->supported & ADVERT_MASK) | fc); - lc->fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX); - } else if (lc->autoneg == AUTONEG_DISABLE) { - c.u.l1cfg.rcap = htonl(lc->requested_speed | fc | mdi); - lc->fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX); - } else - c.u.l1cfg.rcap = htonl(lc->advertising | fc | mdi); - - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_restart_aneg - restart autonegotiation - * @adap: the adapter - * @mbox: mbox to use for the FW command - * @port: the port id - * - * Restarts autonegotiation for the selected port. - */ -int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port) -{ - struct fw_port_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_portid = htonl(FW_CMD_OP(FW_PORT_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_PORT_CMD_PORTID(port)); - c.action_to_len16 = htonl(FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) | - FW_LEN16(c)); - c.u.l1cfg.rcap = htonl(FW_PORT_CAP_ANEG); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_set_vlan_accel - configure HW VLAN extraction - * @adap: the adapter - * @ports: bitmap of adapter ports to operate on - * @on: enable (1) or disable (0) HW VLAN extraction - * - * Enables or disables HW extraction of VLAN tags for the ports specified - * by @ports. @ports is a bitmap with the ith bit designating the port - * associated with the ith adapter channel. - */ -void t4_set_vlan_accel(struct adapter *adap, unsigned int ports, int on) -{ - ports <<= VLANEXTENABLE_SHIFT; - t4_set_reg_field(adap, TP_OUT_CONFIG, ports, on ? ports : 0); -} - -struct intr_info { - unsigned int mask; /* bits to check in interrupt status */ - const char *msg; /* message to print or NULL */ - short stat_idx; /* stat counter to increment or -1 */ - unsigned short fatal; /* whether the condition reported is fatal */ -}; - -/** - * t4_handle_intr_status - table driven interrupt handler - * @adapter: the adapter that generated the interrupt - * @reg: the interrupt status register to process - * @acts: table of interrupt actions - * - * A table driven interrupt handler that applies a set of masks to an - * interrupt status word and performs the corresponding actions if the - * interrupts described by the mask have occured. The actions include - * optionally emitting a warning or alert message. The table is terminated - * by an entry specifying mask 0. Returns the number of fatal interrupt - * conditions. - */ -static int t4_handle_intr_status(struct adapter *adapter, unsigned int reg, - const struct intr_info *acts) -{ - int fatal = 0; - unsigned int mask = 0; - unsigned int status = t4_read_reg(adapter, reg); - - for ( ; acts->mask; ++acts) { - if (!(status & acts->mask)) - continue; - if (acts->fatal) { - fatal++; - dev_alert(adapter->pdev_dev, "%s (0x%x)\n", acts->msg, - status & acts->mask); - } else if (acts->msg && printk_ratelimit()) - dev_warn(adapter->pdev_dev, "%s (0x%x)\n", acts->msg, - status & acts->mask); - mask |= acts->mask; - } - status &= mask; - if (status) /* clear processed interrupts */ - t4_write_reg(adapter, reg, status); - return fatal; -} - -/* - * Interrupt handler for the PCIE module. - */ -static void pcie_intr_handler(struct adapter *adapter) -{ - static struct intr_info sysbus_intr_info[] = { - { RNPP, "RXNP array parity error", -1, 1 }, - { RPCP, "RXPC array parity error", -1, 1 }, - { RCIP, "RXCIF array parity error", -1, 1 }, - { RCCP, "Rx completions control array parity error", -1, 1 }, - { RFTP, "RXFT array parity error", -1, 1 }, - { 0 } - }; - static struct intr_info pcie_port_intr_info[] = { - { TPCP, "TXPC array parity error", -1, 1 }, - { TNPP, "TXNP array parity error", -1, 1 }, - { TFTP, "TXFT array parity error", -1, 1 }, - { TCAP, "TXCA array parity error", -1, 1 }, - { TCIP, "TXCIF array parity error", -1, 1 }, - { RCAP, "RXCA array parity error", -1, 1 }, - { OTDD, "outbound request TLP discarded", -1, 1 }, - { RDPE, "Rx data parity error", -1, 1 }, - { TDUE, "Tx uncorrectable data error", -1, 1 }, - { 0 } - }; - static struct intr_info pcie_intr_info[] = { - { MSIADDRLPERR, "MSI AddrL parity error", -1, 1 }, - { MSIADDRHPERR, "MSI AddrH parity error", -1, 1 }, - { MSIDATAPERR, "MSI data parity error", -1, 1 }, - { MSIXADDRLPERR, "MSI-X AddrL parity error", -1, 1 }, - { MSIXADDRHPERR, "MSI-X AddrH parity error", -1, 1 }, - { MSIXDATAPERR, "MSI-X data parity error", -1, 1 }, - { MSIXDIPERR, "MSI-X DI parity error", -1, 1 }, - { PIOCPLPERR, "PCI PIO completion FIFO parity error", -1, 1 }, - { PIOREQPERR, "PCI PIO request FIFO parity error", -1, 1 }, - { TARTAGPERR, "PCI PCI target tag FIFO parity error", -1, 1 }, - { CCNTPERR, "PCI CMD channel count parity error", -1, 1 }, - { CREQPERR, "PCI CMD channel request parity error", -1, 1 }, - { CRSPPERR, "PCI CMD channel response parity error", -1, 1 }, - { DCNTPERR, "PCI DMA channel count parity error", -1, 1 }, - { DREQPERR, "PCI DMA channel request parity error", -1, 1 }, - { DRSPPERR, "PCI DMA channel response parity error", -1, 1 }, - { HCNTPERR, "PCI HMA channel count parity error", -1, 1 }, - { HREQPERR, "PCI HMA channel request parity error", -1, 1 }, - { HRSPPERR, "PCI HMA channel response parity error", -1, 1 }, - { CFGSNPPERR, "PCI config snoop FIFO parity error", -1, 1 }, - { FIDPERR, "PCI FID parity error", -1, 1 }, - { INTXCLRPERR, "PCI INTx clear parity error", -1, 1 }, - { MATAGPERR, "PCI MA tag parity error", -1, 1 }, - { PIOTAGPERR, "PCI PIO tag parity error", -1, 1 }, - { RXCPLPERR, "PCI Rx completion parity error", -1, 1 }, - { RXWRPERR, "PCI Rx write parity error", -1, 1 }, - { RPLPERR, "PCI replay buffer parity error", -1, 1 }, - { PCIESINT, "PCI core secondary fault", -1, 1 }, - { PCIEPINT, "PCI core primary fault", -1, 1 }, - { UNXSPLCPLERR, "PCI unexpected split completion error", -1, 0 }, - { 0 } - }; - - int fat; - - fat = t4_handle_intr_status(adapter, - PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, - sysbus_intr_info) + - t4_handle_intr_status(adapter, - PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, - pcie_port_intr_info) + - t4_handle_intr_status(adapter, PCIE_INT_CAUSE, pcie_intr_info); - if (fat) - t4_fatal_err(adapter); -} - -/* - * TP interrupt handler. - */ -static void tp_intr_handler(struct adapter *adapter) -{ - static struct intr_info tp_intr_info[] = { - { 0x3fffffff, "TP parity error", -1, 1 }, - { FLMTXFLSTEMPTY, "TP out of Tx pages", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adapter, TP_INT_CAUSE, tp_intr_info)) - t4_fatal_err(adapter); -} - -/* - * SGE interrupt handler. - */ -static void sge_intr_handler(struct adapter *adapter) -{ - u64 v; - - static struct intr_info sge_intr_info[] = { - { ERR_CPL_EXCEED_IQE_SIZE, - "SGE received CPL exceeding IQE size", -1, 1 }, - { ERR_INVALID_CIDX_INC, - "SGE GTS CIDX increment too large", -1, 0 }, - { ERR_CPL_OPCODE_0, "SGE received 0-length CPL", -1, 0 }, - { ERR_DROPPED_DB, "SGE doorbell dropped", -1, 0 }, - { ERR_DATA_CPL_ON_HIGH_QID1 | ERR_DATA_CPL_ON_HIGH_QID0, - "SGE IQID > 1023 received CPL for FL", -1, 0 }, - { ERR_BAD_DB_PIDX3, "SGE DBP 3 pidx increment too large", -1, - 0 }, - { ERR_BAD_DB_PIDX2, "SGE DBP 2 pidx increment too large", -1, - 0 }, - { ERR_BAD_DB_PIDX1, "SGE DBP 1 pidx increment too large", -1, - 0 }, - { ERR_BAD_DB_PIDX0, "SGE DBP 0 pidx increment too large", -1, - 0 }, - { ERR_ING_CTXT_PRIO, - "SGE too many priority ingress contexts", -1, 0 }, - { ERR_EGR_CTXT_PRIO, - "SGE too many priority egress contexts", -1, 0 }, - { INGRESS_SIZE_ERR, "SGE illegal ingress QID", -1, 0 }, - { EGRESS_SIZE_ERR, "SGE illegal egress QID", -1, 0 }, - { 0 } - }; - - v = (u64)t4_read_reg(adapter, SGE_INT_CAUSE1) | - ((u64)t4_read_reg(adapter, SGE_INT_CAUSE2) << 32); - if (v) { - dev_alert(adapter->pdev_dev, "SGE parity error (%#llx)\n", - (unsigned long long)v); - t4_write_reg(adapter, SGE_INT_CAUSE1, v); - t4_write_reg(adapter, SGE_INT_CAUSE2, v >> 32); - } - - if (t4_handle_intr_status(adapter, SGE_INT_CAUSE3, sge_intr_info) || - v != 0) - t4_fatal_err(adapter); -} - -/* - * CIM interrupt handler. - */ -static void cim_intr_handler(struct adapter *adapter) -{ - static struct intr_info cim_intr_info[] = { - { PREFDROPINT, "CIM control register prefetch drop", -1, 1 }, - { OBQPARERR, "CIM OBQ parity error", -1, 1 }, - { IBQPARERR, "CIM IBQ parity error", -1, 1 }, - { MBUPPARERR, "CIM mailbox uP parity error", -1, 1 }, - { MBHOSTPARERR, "CIM mailbox host parity error", -1, 1 }, - { TIEQINPARERRINT, "CIM TIEQ outgoing parity error", -1, 1 }, - { TIEQOUTPARERRINT, "CIM TIEQ incoming parity error", -1, 1 }, - { 0 } - }; - static struct intr_info cim_upintr_info[] = { - { RSVDSPACEINT, "CIM reserved space access", -1, 1 }, - { ILLTRANSINT, "CIM illegal transaction", -1, 1 }, - { ILLWRINT, "CIM illegal write", -1, 1 }, - { ILLRDINT, "CIM illegal read", -1, 1 }, - { ILLRDBEINT, "CIM illegal read BE", -1, 1 }, - { ILLWRBEINT, "CIM illegal write BE", -1, 1 }, - { SGLRDBOOTINT, "CIM single read from boot space", -1, 1 }, - { SGLWRBOOTINT, "CIM single write to boot space", -1, 1 }, - { BLKWRBOOTINT, "CIM block write to boot space", -1, 1 }, - { SGLRDFLASHINT, "CIM single read from flash space", -1, 1 }, - { SGLWRFLASHINT, "CIM single write to flash space", -1, 1 }, - { BLKWRFLASHINT, "CIM block write to flash space", -1, 1 }, - { SGLRDEEPROMINT, "CIM single EEPROM read", -1, 1 }, - { SGLWREEPROMINT, "CIM single EEPROM write", -1, 1 }, - { BLKRDEEPROMINT, "CIM block EEPROM read", -1, 1 }, - { BLKWREEPROMINT, "CIM block EEPROM write", -1, 1 }, - { SGLRDCTLINT , "CIM single read from CTL space", -1, 1 }, - { SGLWRCTLINT , "CIM single write to CTL space", -1, 1 }, - { BLKRDCTLINT , "CIM block read from CTL space", -1, 1 }, - { BLKWRCTLINT , "CIM block write to CTL space", -1, 1 }, - { SGLRDPLINT , "CIM single read from PL space", -1, 1 }, - { SGLWRPLINT , "CIM single write to PL space", -1, 1 }, - { BLKRDPLINT , "CIM block read from PL space", -1, 1 }, - { BLKWRPLINT , "CIM block write to PL space", -1, 1 }, - { REQOVRLOOKUPINT , "CIM request FIFO overwrite", -1, 1 }, - { RSPOVRLOOKUPINT , "CIM response FIFO overwrite", -1, 1 }, - { TIMEOUTINT , "CIM PIF timeout", -1, 1 }, - { TIMEOUTMAINT , "CIM PIF MA timeout", -1, 1 }, - { 0 } - }; - - int fat; - - fat = t4_handle_intr_status(adapter, CIM_HOST_INT_CAUSE, - cim_intr_info) + - t4_handle_intr_status(adapter, CIM_HOST_UPACC_INT_CAUSE, - cim_upintr_info); - if (fat) - t4_fatal_err(adapter); -} - -/* - * ULP RX interrupt handler. - */ -static void ulprx_intr_handler(struct adapter *adapter) -{ - static struct intr_info ulprx_intr_info[] = { - { 0x7fffff, "ULPRX parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adapter, ULP_RX_INT_CAUSE, ulprx_intr_info)) - t4_fatal_err(adapter); -} - -/* - * ULP TX interrupt handler. - */ -static void ulptx_intr_handler(struct adapter *adapter) -{ - static struct intr_info ulptx_intr_info[] = { - { PBL_BOUND_ERR_CH3, "ULPTX channel 3 PBL out of bounds", -1, - 0 }, - { PBL_BOUND_ERR_CH2, "ULPTX channel 2 PBL out of bounds", -1, - 0 }, - { PBL_BOUND_ERR_CH1, "ULPTX channel 1 PBL out of bounds", -1, - 0 }, - { PBL_BOUND_ERR_CH0, "ULPTX channel 0 PBL out of bounds", -1, - 0 }, - { 0xfffffff, "ULPTX parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adapter, ULP_TX_INT_CAUSE, ulptx_intr_info)) - t4_fatal_err(adapter); -} - -/* - * PM TX interrupt handler. - */ -static void pmtx_intr_handler(struct adapter *adapter) -{ - static struct intr_info pmtx_intr_info[] = { - { PCMD_LEN_OVFL0, "PMTX channel 0 pcmd too large", -1, 1 }, - { PCMD_LEN_OVFL1, "PMTX channel 1 pcmd too large", -1, 1 }, - { PCMD_LEN_OVFL2, "PMTX channel 2 pcmd too large", -1, 1 }, - { ZERO_C_CMD_ERROR, "PMTX 0-length pcmd", -1, 1 }, - { PMTX_FRAMING_ERROR, "PMTX framing error", -1, 1 }, - { OESPI_PAR_ERROR, "PMTX oespi parity error", -1, 1 }, - { DB_OPTIONS_PAR_ERROR, "PMTX db_options parity error", -1, 1 }, - { ICSPI_PAR_ERROR, "PMTX icspi parity error", -1, 1 }, - { C_PCMD_PAR_ERROR, "PMTX c_pcmd parity error", -1, 1}, - { 0 } - }; - - if (t4_handle_intr_status(adapter, PM_TX_INT_CAUSE, pmtx_intr_info)) - t4_fatal_err(adapter); -} - -/* - * PM RX interrupt handler. - */ -static void pmrx_intr_handler(struct adapter *adapter) -{ - static struct intr_info pmrx_intr_info[] = { - { ZERO_E_CMD_ERROR, "PMRX 0-length pcmd", -1, 1 }, - { PMRX_FRAMING_ERROR, "PMRX framing error", -1, 1 }, - { OCSPI_PAR_ERROR, "PMRX ocspi parity error", -1, 1 }, - { DB_OPTIONS_PAR_ERROR, "PMRX db_options parity error", -1, 1 }, - { IESPI_PAR_ERROR, "PMRX iespi parity error", -1, 1 }, - { E_PCMD_PAR_ERROR, "PMRX e_pcmd parity error", -1, 1}, - { 0 } - }; - - if (t4_handle_intr_status(adapter, PM_RX_INT_CAUSE, pmrx_intr_info)) - t4_fatal_err(adapter); -} - -/* - * CPL switch interrupt handler. - */ -static void cplsw_intr_handler(struct adapter *adapter) -{ - static struct intr_info cplsw_intr_info[] = { - { CIM_OP_MAP_PERR, "CPLSW CIM op_map parity error", -1, 1 }, - { CIM_OVFL_ERROR, "CPLSW CIM overflow", -1, 1 }, - { TP_FRAMING_ERROR, "CPLSW TP framing error", -1, 1 }, - { SGE_FRAMING_ERROR, "CPLSW SGE framing error", -1, 1 }, - { CIM_FRAMING_ERROR, "CPLSW CIM framing error", -1, 1 }, - { ZERO_SWITCH_ERROR, "CPLSW no-switch error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adapter, CPL_INTR_CAUSE, cplsw_intr_info)) - t4_fatal_err(adapter); -} - -/* - * LE interrupt handler. - */ -static void le_intr_handler(struct adapter *adap) -{ - static struct intr_info le_intr_info[] = { - { LIPMISS, "LE LIP miss", -1, 0 }, - { LIP0, "LE 0 LIP error", -1, 0 }, - { PARITYERR, "LE parity error", -1, 1 }, - { UNKNOWNCMD, "LE unknown command", -1, 1 }, - { REQQPARERR, "LE request queue parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adap, LE_DB_INT_CAUSE, le_intr_info)) - t4_fatal_err(adap); -} - -/* - * MPS interrupt handler. - */ -static void mps_intr_handler(struct adapter *adapter) -{ - static struct intr_info mps_rx_intr_info[] = { - { 0xffffff, "MPS Rx parity error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_tx_intr_info[] = { - { TPFIFO, "MPS Tx TP FIFO parity error", -1, 1 }, - { NCSIFIFO, "MPS Tx NC-SI FIFO parity error", -1, 1 }, - { TXDATAFIFO, "MPS Tx data FIFO parity error", -1, 1 }, - { TXDESCFIFO, "MPS Tx desc FIFO parity error", -1, 1 }, - { BUBBLE, "MPS Tx underflow", -1, 1 }, - { SECNTERR, "MPS Tx SOP/EOP error", -1, 1 }, - { FRMERR, "MPS Tx framing error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_trc_intr_info[] = { - { FILTMEM, "MPS TRC filter parity error", -1, 1 }, - { PKTFIFO, "MPS TRC packet FIFO parity error", -1, 1 }, - { MISCPERR, "MPS TRC misc parity error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_stat_sram_intr_info[] = { - { 0x1fffff, "MPS statistics SRAM parity error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_stat_tx_intr_info[] = { - { 0xfffff, "MPS statistics Tx FIFO parity error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_stat_rx_intr_info[] = { - { 0xffffff, "MPS statistics Rx FIFO parity error", -1, 1 }, - { 0 } - }; - static struct intr_info mps_cls_intr_info[] = { - { MATCHSRAM, "MPS match SRAM parity error", -1, 1 }, - { MATCHTCAM, "MPS match TCAM parity error", -1, 1 }, - { HASHSRAM, "MPS hash SRAM parity error", -1, 1 }, - { 0 } - }; - - int fat; - - fat = t4_handle_intr_status(adapter, MPS_RX_PERR_INT_CAUSE, - mps_rx_intr_info) + - t4_handle_intr_status(adapter, MPS_TX_INT_CAUSE, - mps_tx_intr_info) + - t4_handle_intr_status(adapter, MPS_TRC_INT_CAUSE, - mps_trc_intr_info) + - t4_handle_intr_status(adapter, MPS_STAT_PERR_INT_CAUSE_SRAM, - mps_stat_sram_intr_info) + - t4_handle_intr_status(adapter, MPS_STAT_PERR_INT_CAUSE_TX_FIFO, - mps_stat_tx_intr_info) + - t4_handle_intr_status(adapter, MPS_STAT_PERR_INT_CAUSE_RX_FIFO, - mps_stat_rx_intr_info) + - t4_handle_intr_status(adapter, MPS_CLS_INT_CAUSE, - mps_cls_intr_info); - - t4_write_reg(adapter, MPS_INT_CAUSE, CLSINT | TRCINT | - RXINT | TXINT | STATINT); - t4_read_reg(adapter, MPS_INT_CAUSE); /* flush */ - if (fat) - t4_fatal_err(adapter); -} - -#define MEM_INT_MASK (PERR_INT_CAUSE | ECC_CE_INT_CAUSE | ECC_UE_INT_CAUSE) - -/* - * EDC/MC interrupt handler. - */ -static void mem_intr_handler(struct adapter *adapter, int idx) -{ - static const char name[3][5] = { "EDC0", "EDC1", "MC" }; - - unsigned int addr, cnt_addr, v; - - if (idx <= MEM_EDC1) { - addr = EDC_REG(EDC_INT_CAUSE, idx); - cnt_addr = EDC_REG(EDC_ECC_STATUS, idx); - } else { - addr = MC_INT_CAUSE; - cnt_addr = MC_ECC_STATUS; - } - - v = t4_read_reg(adapter, addr) & MEM_INT_MASK; - if (v & PERR_INT_CAUSE) - dev_alert(adapter->pdev_dev, "%s FIFO parity error\n", - name[idx]); - if (v & ECC_CE_INT_CAUSE) { - u32 cnt = ECC_CECNT_GET(t4_read_reg(adapter, cnt_addr)); - - t4_write_reg(adapter, cnt_addr, ECC_CECNT_MASK); - if (printk_ratelimit()) - dev_warn(adapter->pdev_dev, - "%u %s correctable ECC data error%s\n", - cnt, name[idx], cnt > 1 ? "s" : ""); - } - if (v & ECC_UE_INT_CAUSE) - dev_alert(adapter->pdev_dev, - "%s uncorrectable ECC data error\n", name[idx]); - - t4_write_reg(adapter, addr, v); - if (v & (PERR_INT_CAUSE | ECC_UE_INT_CAUSE)) - t4_fatal_err(adapter); -} - -/* - * MA interrupt handler. - */ -static void ma_intr_handler(struct adapter *adap) -{ - u32 v, status = t4_read_reg(adap, MA_INT_CAUSE); - - if (status & MEM_PERR_INT_CAUSE) - dev_alert(adap->pdev_dev, - "MA parity error, parity status %#x\n", - t4_read_reg(adap, MA_PARITY_ERROR_STATUS)); - if (status & MEM_WRAP_INT_CAUSE) { - v = t4_read_reg(adap, MA_INT_WRAP_STATUS); - dev_alert(adap->pdev_dev, "MA address wrap-around error by " - "client %u to address %#x\n", - MEM_WRAP_CLIENT_NUM_GET(v), - MEM_WRAP_ADDRESS_GET(v) << 4); - } - t4_write_reg(adap, MA_INT_CAUSE, status); - t4_fatal_err(adap); -} - -/* - * SMB interrupt handler. - */ -static void smb_intr_handler(struct adapter *adap) -{ - static struct intr_info smb_intr_info[] = { - { MSTTXFIFOPARINT, "SMB master Tx FIFO parity error", -1, 1 }, - { MSTRXFIFOPARINT, "SMB master Rx FIFO parity error", -1, 1 }, - { SLVFIFOPARINT, "SMB slave FIFO parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adap, SMB_INT_CAUSE, smb_intr_info)) - t4_fatal_err(adap); -} - -/* - * NC-SI interrupt handler. - */ -static void ncsi_intr_handler(struct adapter *adap) -{ - static struct intr_info ncsi_intr_info[] = { - { CIM_DM_PRTY_ERR, "NC-SI CIM parity error", -1, 1 }, - { MPS_DM_PRTY_ERR, "NC-SI MPS parity error", -1, 1 }, - { TXFIFO_PRTY_ERR, "NC-SI Tx FIFO parity error", -1, 1 }, - { RXFIFO_PRTY_ERR, "NC-SI Rx FIFO parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adap, NCSI_INT_CAUSE, ncsi_intr_info)) - t4_fatal_err(adap); -} - -/* - * XGMAC interrupt handler. - */ -static void xgmac_intr_handler(struct adapter *adap, int port) -{ - u32 v = t4_read_reg(adap, PORT_REG(port, XGMAC_PORT_INT_CAUSE)); - - v &= TXFIFO_PRTY_ERR | RXFIFO_PRTY_ERR; - if (!v) - return; - - if (v & TXFIFO_PRTY_ERR) - dev_alert(adap->pdev_dev, "XGMAC %d Tx FIFO parity error\n", - port); - if (v & RXFIFO_PRTY_ERR) - dev_alert(adap->pdev_dev, "XGMAC %d Rx FIFO parity error\n", - port); - t4_write_reg(adap, PORT_REG(port, XGMAC_PORT_INT_CAUSE), v); - t4_fatal_err(adap); -} - -/* - * PL interrupt handler. - */ -static void pl_intr_handler(struct adapter *adap) -{ - static struct intr_info pl_intr_info[] = { - { FATALPERR, "T4 fatal parity error", -1, 1 }, - { PERRVFID, "PL VFID_MAP parity error", -1, 1 }, - { 0 } - }; - - if (t4_handle_intr_status(adap, PL_PL_INT_CAUSE, pl_intr_info)) - t4_fatal_err(adap); -} - -#define PF_INTR_MASK (PFSW | PFCIM) -#define GLBL_INTR_MASK (CIM | MPS | PL | PCIE | MC | EDC0 | \ - EDC1 | LE | TP | MA | PM_TX | PM_RX | ULP_RX | \ - CPL_SWITCH | SGE | ULP_TX) - -/** - * t4_slow_intr_handler - control path interrupt handler - * @adapter: the adapter - * - * T4 interrupt handler for non-data global interrupt events, e.g., errors. - * The designation 'slow' is because it involves register reads, while - * data interrupts typically don't involve any MMIOs. - */ -int t4_slow_intr_handler(struct adapter *adapter) -{ - u32 cause = t4_read_reg(adapter, PL_INT_CAUSE); - - if (!(cause & GLBL_INTR_MASK)) - return 0; - if (cause & CIM) - cim_intr_handler(adapter); - if (cause & MPS) - mps_intr_handler(adapter); - if (cause & NCSI) - ncsi_intr_handler(adapter); - if (cause & PL) - pl_intr_handler(adapter); - if (cause & SMB) - smb_intr_handler(adapter); - if (cause & XGMAC0) - xgmac_intr_handler(adapter, 0); - if (cause & XGMAC1) - xgmac_intr_handler(adapter, 1); - if (cause & XGMAC_KR0) - xgmac_intr_handler(adapter, 2); - if (cause & XGMAC_KR1) - xgmac_intr_handler(adapter, 3); - if (cause & PCIE) - pcie_intr_handler(adapter); - if (cause & MC) - mem_intr_handler(adapter, MEM_MC); - if (cause & EDC0) - mem_intr_handler(adapter, MEM_EDC0); - if (cause & EDC1) - mem_intr_handler(adapter, MEM_EDC1); - if (cause & LE) - le_intr_handler(adapter); - if (cause & TP) - tp_intr_handler(adapter); - if (cause & MA) - ma_intr_handler(adapter); - if (cause & PM_TX) - pmtx_intr_handler(adapter); - if (cause & PM_RX) - pmrx_intr_handler(adapter); - if (cause & ULP_RX) - ulprx_intr_handler(adapter); - if (cause & CPL_SWITCH) - cplsw_intr_handler(adapter); - if (cause & SGE) - sge_intr_handler(adapter); - if (cause & ULP_TX) - ulptx_intr_handler(adapter); - - /* Clear the interrupts just processed for which we are the master. */ - t4_write_reg(adapter, PL_INT_CAUSE, cause & GLBL_INTR_MASK); - (void) t4_read_reg(adapter, PL_INT_CAUSE); /* flush */ - return 1; -} - -/** - * t4_intr_enable - enable interrupts - * @adapter: the adapter whose interrupts should be enabled - * - * Enable PF-specific interrupts for the calling function and the top-level - * interrupt concentrator for global interrupts. Interrupts are already - * enabled at each module, here we just enable the roots of the interrupt - * hierarchies. - * - * Note: this function should be called only when the driver manages - * non PF-specific interrupts from the various HW modules. Only one PCI - * function at a time should be doing this. - */ -void t4_intr_enable(struct adapter *adapter) -{ - u32 pf = SOURCEPF_GET(t4_read_reg(adapter, PL_WHOAMI)); - - t4_write_reg(adapter, SGE_INT_ENABLE3, ERR_CPL_EXCEED_IQE_SIZE | - ERR_INVALID_CIDX_INC | ERR_CPL_OPCODE_0 | - ERR_DROPPED_DB | ERR_DATA_CPL_ON_HIGH_QID1 | - ERR_DATA_CPL_ON_HIGH_QID0 | ERR_BAD_DB_PIDX3 | - ERR_BAD_DB_PIDX2 | ERR_BAD_DB_PIDX1 | - ERR_BAD_DB_PIDX0 | ERR_ING_CTXT_PRIO | - ERR_EGR_CTXT_PRIO | INGRESS_SIZE_ERR | - EGRESS_SIZE_ERR); - t4_write_reg(adapter, MYPF_REG(PL_PF_INT_ENABLE), PF_INTR_MASK); - t4_set_reg_field(adapter, PL_INT_MAP0, 0, 1 << pf); -} - -/** - * t4_intr_disable - disable interrupts - * @adapter: the adapter whose interrupts should be disabled - * - * Disable interrupts. We only disable the top-level interrupt - * concentrators. The caller must be a PCI function managing global - * interrupts. - */ -void t4_intr_disable(struct adapter *adapter) -{ - u32 pf = SOURCEPF_GET(t4_read_reg(adapter, PL_WHOAMI)); - - t4_write_reg(adapter, MYPF_REG(PL_PF_INT_ENABLE), 0); - t4_set_reg_field(adapter, PL_INT_MAP0, 1 << pf, 0); -} - -/** - * t4_intr_clear - clear all interrupts - * @adapter: the adapter whose interrupts should be cleared - * - * Clears all interrupts. The caller must be a PCI function managing - * global interrupts. - */ -void t4_intr_clear(struct adapter *adapter) -{ - static const unsigned int cause_reg[] = { - SGE_INT_CAUSE1, SGE_INT_CAUSE2, SGE_INT_CAUSE3, - PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS, - PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS, - PCIE_NONFAT_ERR, PCIE_INT_CAUSE, - MC_INT_CAUSE, - MA_INT_WRAP_STATUS, MA_PARITY_ERROR_STATUS, MA_INT_CAUSE, - EDC_INT_CAUSE, EDC_REG(EDC_INT_CAUSE, 1), - CIM_HOST_INT_CAUSE, CIM_HOST_UPACC_INT_CAUSE, - MYPF_REG(CIM_PF_HOST_INT_CAUSE), - TP_INT_CAUSE, - ULP_RX_INT_CAUSE, ULP_TX_INT_CAUSE, - PM_RX_INT_CAUSE, PM_TX_INT_CAUSE, - MPS_RX_PERR_INT_CAUSE, - CPL_INTR_CAUSE, - MYPF_REG(PL_PF_INT_CAUSE), - PL_PL_INT_CAUSE, - LE_DB_INT_CAUSE, - }; - - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(cause_reg); ++i) - t4_write_reg(adapter, cause_reg[i], 0xffffffff); - - t4_write_reg(adapter, PL_INT_CAUSE, GLBL_INTR_MASK); - (void) t4_read_reg(adapter, PL_INT_CAUSE); /* flush */ -} - -/** - * hash_mac_addr - return the hash value of a MAC address - * @addr: the 48-bit Ethernet MAC address - * - * Hashes a MAC address according to the hash function used by HW inexact - * (hash) address matching. - */ -static int hash_mac_addr(const u8 *addr) -{ - u32 a = ((u32)addr[0] << 16) | ((u32)addr[1] << 8) | addr[2]; - u32 b = ((u32)addr[3] << 16) | ((u32)addr[4] << 8) | addr[5]; - a ^= b; - a ^= (a >> 12); - a ^= (a >> 6); - return a & 0x3f; -} - -/** - * t4_config_rss_range - configure a portion of the RSS mapping table - * @adapter: the adapter - * @mbox: mbox to use for the FW command - * @viid: virtual interface whose RSS subtable is to be written - * @start: start entry in the table to write - * @n: how many table entries to write - * @rspq: values for the response queue lookup table - * @nrspq: number of values in @rspq - * - * Programs the selected part of the VI's RSS mapping table with the - * provided values. If @nrspq < @n the supplied values are used repeatedly - * until the full table range is populated. - * - * The caller must ensure the values in @rspq are in the range allowed for - * @viid. - */ -int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid, - int start, int n, const u16 *rspq, unsigned int nrspq) -{ - int ret; - const u16 *rsp = rspq; - const u16 *rsp_end = rspq + nrspq; - struct fw_rss_ind_tbl_cmd cmd; - - memset(&cmd, 0, sizeof(cmd)); - cmd.op_to_viid = htonl(FW_CMD_OP(FW_RSS_IND_TBL_CMD) | - FW_CMD_REQUEST | FW_CMD_WRITE | - FW_RSS_IND_TBL_CMD_VIID(viid)); - cmd.retval_len16 = htonl(FW_LEN16(cmd)); - - /* each fw_rss_ind_tbl_cmd takes up to 32 entries */ - while (n > 0) { - int nq = min(n, 32); - __be32 *qp = &cmd.iq0_to_iq2; - - cmd.niqid = htons(nq); - cmd.startidx = htons(start); - - start += nq; - n -= nq; - - while (nq > 0) { - unsigned int v; - - v = FW_RSS_IND_TBL_CMD_IQ0(*rsp); - if (++rsp >= rsp_end) - rsp = rspq; - v |= FW_RSS_IND_TBL_CMD_IQ1(*rsp); - if (++rsp >= rsp_end) - rsp = rspq; - v |= FW_RSS_IND_TBL_CMD_IQ2(*rsp); - if (++rsp >= rsp_end) - rsp = rspq; - - *qp++ = htonl(v); - nq -= 3; - } - - ret = t4_wr_mbox(adapter, mbox, &cmd, sizeof(cmd), NULL); - if (ret) - return ret; - } - return 0; -} - -/** - * t4_config_glbl_rss - configure the global RSS mode - * @adapter: the adapter - * @mbox: mbox to use for the FW command - * @mode: global RSS mode - * @flags: mode-specific flags - * - * Sets the global RSS mode. - */ -int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, - unsigned int flags) -{ - struct fw_rss_glb_config_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_write = htonl(FW_CMD_OP(FW_RSS_GLB_CONFIG_CMD) | - FW_CMD_REQUEST | FW_CMD_WRITE); - c.retval_len16 = htonl(FW_LEN16(c)); - if (mode == FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL) { - c.u.manual.mode_pkd = htonl(FW_RSS_GLB_CONFIG_CMD_MODE(mode)); - } else if (mode == FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL) { - c.u.basicvirtual.mode_pkd = - htonl(FW_RSS_GLB_CONFIG_CMD_MODE(mode)); - c.u.basicvirtual.synmapen_to_hashtoeplitz = htonl(flags); - } else - return -EINVAL; - return t4_wr_mbox(adapter, mbox, &c, sizeof(c), NULL); -} - -/* Read an RSS table row */ -static int rd_rss_row(struct adapter *adap, int row, u32 *val) -{ - t4_write_reg(adap, TP_RSS_LKP_TABLE, 0xfff00000 | row); - return t4_wait_op_done_val(adap, TP_RSS_LKP_TABLE, LKPTBLROWVLD, 1, - 5, 0, val); -} - -/** - * t4_read_rss - read the contents of the RSS mapping table - * @adapter: the adapter - * @map: holds the contents of the RSS mapping table - * - * Reads the contents of the RSS hash->queue mapping table. - */ -int t4_read_rss(struct adapter *adapter, u16 *map) -{ - u32 val; - int i, ret; - - for (i = 0; i < RSS_NENTRIES / 2; ++i) { - ret = rd_rss_row(adapter, i, &val); - if (ret) - return ret; - *map++ = LKPTBLQUEUE0_GET(val); - *map++ = LKPTBLQUEUE1_GET(val); - } - return 0; -} - -/** - * t4_tp_get_tcp_stats - read TP's TCP MIB counters - * @adap: the adapter - * @v4: holds the TCP/IP counter values - * @v6: holds the TCP/IPv6 counter values - * - * Returns the values of TP's TCP/IP and TCP/IPv6 MIB counters. - * Either @v4 or @v6 may be %NULL to skip the corresponding stats. - */ -void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, - struct tp_tcp_stats *v6) -{ - u32 val[TP_MIB_TCP_RXT_SEG_LO - TP_MIB_TCP_OUT_RST + 1]; - -#define STAT_IDX(x) ((TP_MIB_TCP_##x) - TP_MIB_TCP_OUT_RST) -#define STAT(x) val[STAT_IDX(x)] -#define STAT64(x) (((u64)STAT(x##_HI) << 32) | STAT(x##_LO)) - - if (v4) { - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, val, - ARRAY_SIZE(val), TP_MIB_TCP_OUT_RST); - v4->tcpOutRsts = STAT(OUT_RST); - v4->tcpInSegs = STAT64(IN_SEG); - v4->tcpOutSegs = STAT64(OUT_SEG); - v4->tcpRetransSegs = STAT64(RXT_SEG); - } - if (v6) { - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, val, - ARRAY_SIZE(val), TP_MIB_TCP_V6OUT_RST); - v6->tcpOutRsts = STAT(OUT_RST); - v6->tcpInSegs = STAT64(IN_SEG); - v6->tcpOutSegs = STAT64(OUT_SEG); - v6->tcpRetransSegs = STAT64(RXT_SEG); - } -#undef STAT64 -#undef STAT -#undef STAT_IDX -} - -/** - * t4_tp_get_err_stats - read TP's error MIB counters - * @adap: the adapter - * @st: holds the counter values - * - * Returns the values of TP's error counters. - */ -void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st) -{ - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, st->macInErrs, - 12, TP_MIB_MAC_IN_ERR_0); - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, st->tnlCongDrops, - 8, TP_MIB_TNL_CNG_DROP_0); - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, st->tnlTxDrops, - 4, TP_MIB_TNL_DROP_0); - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, st->ofldVlanDrops, - 4, TP_MIB_OFD_VLN_DROP_0); - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, st->tcp6InErrs, - 4, TP_MIB_TCP_V6IN_ERR_0); - t4_read_indirect(adap, TP_MIB_INDEX, TP_MIB_DATA, &st->ofldNoNeigh, - 2, TP_MIB_OFD_ARP_DROP); -} - -/** - * t4_read_mtu_tbl - returns the values in the HW path MTU table - * @adap: the adapter - * @mtus: where to store the MTU values - * @mtu_log: where to store the MTU base-2 log (may be %NULL) - * - * Reads the HW path MTU table. - */ -void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log) -{ - u32 v; - int i; - - for (i = 0; i < NMTUS; ++i) { - t4_write_reg(adap, TP_MTU_TABLE, - MTUINDEX(0xff) | MTUVALUE(i)); - v = t4_read_reg(adap, TP_MTU_TABLE); - mtus[i] = MTUVALUE_GET(v); - if (mtu_log) - mtu_log[i] = MTUWIDTH_GET(v); - } -} - -/** - * init_cong_ctrl - initialize congestion control parameters - * @a: the alpha values for congestion control - * @b: the beta values for congestion control - * - * Initialize the congestion control parameters. - */ -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; - a[10] = 3; - a[11] = 4; - a[12] = 5; - a[13] = 6; - a[14] = 7; - a[15] = 8; - a[16] = 9; - a[17] = 10; - a[18] = 14; - a[19] = 17; - a[20] = 21; - a[21] = 25; - a[22] = 30; - a[23] = 35; - a[24] = 45; - a[25] = 60; - a[26] = 80; - a[27] = 100; - a[28] = 200; - a[29] = 300; - a[30] = 400; - a[31] = 500; - - b[0] = b[1] = b[2] = b[3] = b[4] = b[5] = b[6] = b[7] = b[8] = 0; - b[9] = b[10] = 1; - b[11] = b[12] = 2; - b[13] = b[14] = b[15] = b[16] = 3; - b[17] = b[18] = b[19] = b[20] = b[21] = 4; - b[22] = b[23] = b[24] = b[25] = b[26] = b[27] = 5; - b[28] = b[29] = 6; - b[30] = b[31] = 7; -} - -/* The minimum additive increment value for the congestion control table */ -#define CC_MIN_INCR 2U - -/** - * t4_load_mtus - write the MTU and congestion control HW tables - * @adap: the adapter - * @mtus: the values for the MTU table - * @alpha: the values for the congestion control alpha parameter - * @beta: the values for the congestion control beta parameter - * - * Write the HW MTU table with the supplied MTUs and the high-speed - * congestion control table with the supplied alpha, beta, and MTUs. - * We write the two tables together because the additive increments - * depend on the MTUs. - */ -void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, - const unsigned short *alpha, const unsigned short *beta) -{ - static const unsigned int avg_pkts[NCCTRL_WIN] = { - 2, 6, 10, 14, 20, 28, 40, 56, 80, 112, 160, 224, 320, 448, 640, - 896, 1281, 1792, 2560, 3584, 5120, 7168, 10240, 14336, 20480, - 28672, 40960, 57344, 81920, 114688, 163840, 229376 - }; - - unsigned int i, w; - - for (i = 0; i < NMTUS; ++i) { - unsigned int mtu = mtus[i]; - unsigned int log2 = fls(mtu); - - if (!(mtu & ((1 << log2) >> 2))) /* round */ - log2--; - t4_write_reg(adap, TP_MTU_TABLE, MTUINDEX(i) | - MTUWIDTH(log2) | MTUVALUE(mtu)); - - for (w = 0; w < NCCTRL_WIN; ++w) { - unsigned int inc; - - inc = max(((mtu - 40) * alpha[w]) / avg_pkts[w], - CC_MIN_INCR); - - t4_write_reg(adap, TP_CCTRL_TABLE, (i << 21) | - (w << 16) | (beta[w] << 13) | inc); - } - } -} - -/** - * t4_set_trace_filter - configure one of the tracing filters - * @adap: the adapter - * @tp: the desired trace filter parameters - * @idx: which filter to configure - * @enable: whether to enable or disable the filter - * - * Configures one of the tracing filters available in HW. If @enable is - * %0 @tp is not examined and may be %NULL. - */ -int t4_set_trace_filter(struct adapter *adap, const struct trace_params *tp, - int idx, int enable) -{ - int i, ofst = idx * 4; - u32 data_reg, mask_reg, cfg; - u32 multitrc = TRCMULTIFILTER; - - if (!enable) { - t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - goto out; - } - - if (tp->port > 11 || tp->invert > 1 || tp->skip_len > 0x1f || - tp->skip_ofst > 0x1f || tp->min_len > 0x1ff || - tp->snap_len > 9600 || (idx && tp->snap_len > 256)) - return -EINVAL; - - if (tp->snap_len > 256) { /* must be tracer 0 */ - if ((t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + 4) | - t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + 8) | - t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + 12)) & TFEN) - return -EINVAL; /* other tracers are enabled */ - multitrc = 0; - } else if (idx) { - i = t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_B); - if (TFCAPTUREMAX_GET(i) > 256 && - (t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A) & TFEN)) - return -EINVAL; - } - - /* stop the tracer we'll be changing */ - t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - - /* disable tracing globally if running in the wrong single/multi mode */ - cfg = t4_read_reg(adap, MPS_TRC_CFG); - if ((cfg & TRCEN) && multitrc != (cfg & TRCMULTIFILTER)) { - t4_write_reg(adap, MPS_TRC_CFG, cfg ^ TRCEN); - t4_read_reg(adap, MPS_TRC_CFG); /* flush */ - msleep(1); - if (!(t4_read_reg(adap, MPS_TRC_CFG) & TRCFIFOEMPTY)) - return -ETIMEDOUT; - } - /* - * At this point either the tracing is enabled and in the right mode or - * disabled. - */ - - idx *= (MPS_TRC_FILTER1_MATCH - MPS_TRC_FILTER0_MATCH); - data_reg = MPS_TRC_FILTER0_MATCH + idx; - mask_reg = MPS_TRC_FILTER0_DONT_CARE + idx; - - for (i = 0; i < TRACE_LEN / 4; i++, data_reg += 4, mask_reg += 4) { - t4_write_reg(adap, data_reg, tp->data[i]); - t4_write_reg(adap, mask_reg, ~tp->mask[i]); - } - t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_B + ofst, - TFCAPTUREMAX(tp->snap_len) | - TFMINPKTSIZE(tp->min_len)); - t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + ofst, - TFOFFSET(tp->skip_ofst) | TFLENGTH(tp->skip_len) | - TFPORT(tp->port) | TFEN | - (tp->invert ? TFINVERTMATCH : 0)); - - cfg &= ~TRCMULTIFILTER; - t4_write_reg(adap, MPS_TRC_CFG, cfg | TRCEN | multitrc); -out: t4_read_reg(adap, MPS_TRC_CFG); /* flush */ - return 0; -} - -/** - * t4_get_trace_filter - query one of the tracing filters - * @adap: the adapter - * @tp: the current trace filter parameters - * @idx: which trace filter to query - * @enabled: non-zero if the filter is enabled - * - * Returns the current settings of one of the HW tracing filters. - */ -void t4_get_trace_filter(struct adapter *adap, struct trace_params *tp, int idx, - int *enabled) -{ - u32 ctla, ctlb; - int i, ofst = idx * 4; - u32 data_reg, mask_reg; - - ctla = t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A + ofst); - ctlb = t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_B + ofst); - - *enabled = !!(ctla & TFEN); - tp->snap_len = TFCAPTUREMAX_GET(ctlb); - tp->min_len = TFMINPKTSIZE_GET(ctlb); - tp->skip_ofst = TFOFFSET_GET(ctla); - tp->skip_len = TFLENGTH_GET(ctla); - tp->invert = !!(ctla & TFINVERTMATCH); - tp->port = TFPORT_GET(ctla); - - ofst = (MPS_TRC_FILTER1_MATCH - MPS_TRC_FILTER0_MATCH) * idx; - data_reg = MPS_TRC_FILTER0_MATCH + ofst; - mask_reg = MPS_TRC_FILTER0_DONT_CARE + ofst; - - for (i = 0; i < TRACE_LEN / 4; i++, data_reg += 4, mask_reg += 4) { - tp->mask[i] = ~t4_read_reg(adap, mask_reg); - tp->data[i] = t4_read_reg(adap, data_reg) & tp->mask[i]; - } -} - -/** - * get_mps_bg_map - return the buffer groups associated with a port - * @adap: the adapter - * @idx: the port index - * - * Returns a bitmap indicating which MPS buffer groups are associated - * with the given port. Bit i is set if buffer group i is used by the - * port. - */ -static unsigned int get_mps_bg_map(struct adapter *adap, int idx) -{ - u32 n = NUMPORTS_GET(t4_read_reg(adap, MPS_CMN_CTL)); - - if (n == 0) - return idx == 0 ? 0xf : 0; - if (n == 1) - return idx < 2 ? (3 << (2 * idx)) : 0; - return 1 << idx; -} - -/** - * t4_get_port_stats - collect port statistics - * @adap: the adapter - * @idx: the port index - * @p: the stats structure to fill - * - * Collect statistics related to the given port from HW. - */ -void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p) -{ - u32 bgmap = get_mps_bg_map(adap, idx); - -#define GET_STAT(name) \ - t4_read_reg64(adap, PORT_REG(idx, MPS_PORT_STAT_##name##_L)) -#define GET_STAT_COM(name) t4_read_reg64(adap, MPS_STAT_##name##_L) - - p->tx_octets = GET_STAT(TX_PORT_BYTES); - p->tx_frames = GET_STAT(TX_PORT_FRAMES); - p->tx_bcast_frames = GET_STAT(TX_PORT_BCAST); - p->tx_mcast_frames = GET_STAT(TX_PORT_MCAST); - p->tx_ucast_frames = GET_STAT(TX_PORT_UCAST); - p->tx_error_frames = GET_STAT(TX_PORT_ERROR); - p->tx_frames_64 = GET_STAT(TX_PORT_64B); - p->tx_frames_65_127 = GET_STAT(TX_PORT_65B_127B); - p->tx_frames_128_255 = GET_STAT(TX_PORT_128B_255B); - p->tx_frames_256_511 = GET_STAT(TX_PORT_256B_511B); - p->tx_frames_512_1023 = GET_STAT(TX_PORT_512B_1023B); - p->tx_frames_1024_1518 = GET_STAT(TX_PORT_1024B_1518B); - p->tx_frames_1519_max = GET_STAT(TX_PORT_1519B_MAX); - p->tx_drop = GET_STAT(TX_PORT_DROP); - p->tx_pause = GET_STAT(TX_PORT_PAUSE); - p->tx_ppp0 = GET_STAT(TX_PORT_PPP0); - p->tx_ppp1 = GET_STAT(TX_PORT_PPP1); - p->tx_ppp2 = GET_STAT(TX_PORT_PPP2); - p->tx_ppp3 = GET_STAT(TX_PORT_PPP3); - p->tx_ppp4 = GET_STAT(TX_PORT_PPP4); - p->tx_ppp5 = GET_STAT(TX_PORT_PPP5); - p->tx_ppp6 = GET_STAT(TX_PORT_PPP6); - p->tx_ppp7 = GET_STAT(TX_PORT_PPP7); - - p->rx_octets = GET_STAT(RX_PORT_BYTES); - p->rx_frames = GET_STAT(RX_PORT_FRAMES); - p->rx_bcast_frames = GET_STAT(RX_PORT_BCAST); - p->rx_mcast_frames = GET_STAT(RX_PORT_MCAST); - p->rx_ucast_frames = GET_STAT(RX_PORT_UCAST); - p->rx_too_long = GET_STAT(RX_PORT_MTU_ERROR); - p->rx_jabber = GET_STAT(RX_PORT_MTU_CRC_ERROR); - p->rx_fcs_err = GET_STAT(RX_PORT_CRC_ERROR); - p->rx_len_err = GET_STAT(RX_PORT_LEN_ERROR); - p->rx_symbol_err = GET_STAT(RX_PORT_SYM_ERROR); - p->rx_runt = GET_STAT(RX_PORT_LESS_64B); - p->rx_frames_64 = GET_STAT(RX_PORT_64B); - p->rx_frames_65_127 = GET_STAT(RX_PORT_65B_127B); - p->rx_frames_128_255 = GET_STAT(RX_PORT_128B_255B); - p->rx_frames_256_511 = GET_STAT(RX_PORT_256B_511B); - p->rx_frames_512_1023 = GET_STAT(RX_PORT_512B_1023B); - p->rx_frames_1024_1518 = GET_STAT(RX_PORT_1024B_1518B); - p->rx_frames_1519_max = GET_STAT(RX_PORT_1519B_MAX); - p->rx_pause = GET_STAT(RX_PORT_PAUSE); - p->rx_ppp0 = GET_STAT(RX_PORT_PPP0); - p->rx_ppp1 = GET_STAT(RX_PORT_PPP1); - p->rx_ppp2 = GET_STAT(RX_PORT_PPP2); - p->rx_ppp3 = GET_STAT(RX_PORT_PPP3); - p->rx_ppp4 = GET_STAT(RX_PORT_PPP4); - p->rx_ppp5 = GET_STAT(RX_PORT_PPP5); - p->rx_ppp6 = GET_STAT(RX_PORT_PPP6); - p->rx_ppp7 = GET_STAT(RX_PORT_PPP7); - - p->rx_ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_MAC_DROP_FRAME) : 0; - p->rx_ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_MAC_DROP_FRAME) : 0; - p->rx_ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_MAC_DROP_FRAME) : 0; - p->rx_ovflow3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_MAC_DROP_FRAME) : 0; - p->rx_trunc0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_MAC_TRUNC_FRAME) : 0; - p->rx_trunc1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_MAC_TRUNC_FRAME) : 0; - p->rx_trunc2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_MAC_TRUNC_FRAME) : 0; - p->rx_trunc3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_MAC_TRUNC_FRAME) : 0; - -#undef GET_STAT -#undef GET_STAT_COM -} - -/** - * t4_get_lb_stats - collect loopback port statistics - * @adap: the adapter - * @idx: the loopback port index - * @p: the stats structure to fill - * - * Return HW statistics for the given loopback port. - */ -void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p) -{ - u32 bgmap = get_mps_bg_map(adap, idx); - -#define GET_STAT(name) \ - t4_read_reg64(adap, PORT_REG(idx, MPS_PORT_STAT_LB_PORT_##name##_L)) -#define GET_STAT_COM(name) t4_read_reg64(adap, MPS_STAT_##name##_L) - - p->octets = GET_STAT(BYTES); - p->frames = GET_STAT(FRAMES); - p->bcast_frames = GET_STAT(BCAST); - p->mcast_frames = GET_STAT(MCAST); - p->ucast_frames = GET_STAT(UCAST); - p->error_frames = GET_STAT(ERROR); - - p->frames_64 = GET_STAT(64B); - p->frames_65_127 = GET_STAT(65B_127B); - p->frames_128_255 = GET_STAT(128B_255B); - p->frames_256_511 = GET_STAT(256B_511B); - p->frames_512_1023 = GET_STAT(512B_1023B); - p->frames_1024_1518 = GET_STAT(1024B_1518B); - p->frames_1519_max = GET_STAT(1519B_MAX); - p->drop = t4_read_reg(adap, PORT_REG(idx, - MPS_PORT_STAT_LB_PORT_DROP_FRAMES)); - - p->ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_LB_DROP_FRAME) : 0; - p->ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_LB_DROP_FRAME) : 0; - p->ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_LB_DROP_FRAME) : 0; - p->ovflow3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_LB_DROP_FRAME) : 0; - p->trunc0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_LB_TRUNC_FRAME) : 0; - p->trunc1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_LB_TRUNC_FRAME) : 0; - p->trunc2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_LB_TRUNC_FRAME) : 0; - p->trunc3 = (bgmap & 8) ? GET_STAT_COM(RX_BG_3_LB_TRUNC_FRAME) : 0; - -#undef GET_STAT -#undef GET_STAT_COM -} - -/** - * t4_wol_magic_enable - enable/disable magic packet WoL - * @adap: the adapter - * @port: the physical port index - * @addr: MAC address expected in magic packets, %NULL to disable - * - * Enables/disables magic packet wake-on-LAN for the selected port. - */ -void t4_wol_magic_enable(struct adapter *adap, unsigned int port, - const u8 *addr) -{ - if (addr) { - t4_write_reg(adap, PORT_REG(port, XGMAC_PORT_MAGIC_MACID_LO), - (addr[2] << 24) | (addr[3] << 16) | - (addr[4] << 8) | addr[5]); - t4_write_reg(adap, PORT_REG(port, XGMAC_PORT_MAGIC_MACID_HI), - (addr[0] << 8) | addr[1]); - } - t4_set_reg_field(adap, PORT_REG(port, XGMAC_PORT_CFG2), MAGICEN, - addr ? MAGICEN : 0); -} - -/** - * t4_wol_pat_enable - enable/disable pattern-based WoL - * @adap: the adapter - * @port: the physical port index - * @map: bitmap of which HW pattern filters to set - * @mask0: byte mask for bytes 0-63 of a packet - * @mask1: byte mask for bytes 64-127 of a packet - * @crc: Ethernet CRC for selected bytes - * @enable: enable/disable switch - * - * Sets the pattern filters indicated in @map to mask out the bytes - * specified in @mask0/@mask1 in received packets and compare the CRC of - * the resulting packet against @crc. If @enable is %true pattern-based - * WoL is enabled, otherwise disabled. - */ -int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, - u64 mask0, u64 mask1, unsigned int crc, bool enable) -{ - int i; - - if (!enable) { - t4_set_reg_field(adap, PORT_REG(port, XGMAC_PORT_CFG2), - PATEN, 0); - return 0; - } - if (map > 0xff) - return -EINVAL; - -#define EPIO_REG(name) PORT_REG(port, XGMAC_PORT_EPIO_##name) - - t4_write_reg(adap, EPIO_REG(DATA1), mask0 >> 32); - t4_write_reg(adap, EPIO_REG(DATA2), mask1); - t4_write_reg(adap, EPIO_REG(DATA3), mask1 >> 32); - - for (i = 0; i < NWOL_PAT; i++, map >>= 1) { - if (!(map & 1)) - continue; - - /* write byte masks */ - t4_write_reg(adap, EPIO_REG(DATA0), mask0); - t4_write_reg(adap, EPIO_REG(OP), ADDRESS(i) | EPIOWR); - t4_read_reg(adap, EPIO_REG(OP)); /* flush */ - if (t4_read_reg(adap, EPIO_REG(OP)) & BUSY) - return -ETIMEDOUT; - - /* write CRC */ - t4_write_reg(adap, EPIO_REG(DATA0), crc); - t4_write_reg(adap, EPIO_REG(OP), ADDRESS(i + 32) | EPIOWR); - t4_read_reg(adap, EPIO_REG(OP)); /* flush */ - if (t4_read_reg(adap, EPIO_REG(OP)) & BUSY) - return -ETIMEDOUT; - } -#undef EPIO_REG - - t4_set_reg_field(adap, PORT_REG(port, XGMAC_PORT_CFG2), 0, PATEN); - return 0; -} - -#define INIT_CMD(var, cmd, rd_wr) do { \ - (var).op_to_write = htonl(FW_CMD_OP(FW_##cmd##_CMD) | \ - FW_CMD_REQUEST | FW_CMD_##rd_wr); \ - (var).retval_len16 = htonl(FW_LEN16(var)); \ -} while (0) - -/** - * t4_mdio_rd - read a PHY register through MDIO - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @phy_addr: the PHY address - * @mmd: the PHY MMD to access (0 for clause 22 PHYs) - * @reg: the register to read - * @valp: where to store the value - * - * Issues a FW command through the given mailbox to read a PHY register. - */ -int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, - unsigned int mmd, unsigned int reg, u16 *valp) -{ - int ret; - struct fw_ldst_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_addrspace = htonl(FW_CMD_OP(FW_LDST_CMD) | FW_CMD_REQUEST | - FW_CMD_READ | FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_MDIO)); - c.cycles_to_len16 = htonl(FW_LEN16(c)); - c.u.mdio.paddr_mmd = htons(FW_LDST_CMD_PADDR(phy_addr) | - FW_LDST_CMD_MMD(mmd)); - c.u.mdio.raddr = htons(reg); - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret == 0) - *valp = ntohs(c.u.mdio.rval); - return ret; -} - -/** - * t4_mdio_wr - write a PHY register through MDIO - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @phy_addr: the PHY address - * @mmd: the PHY MMD to access (0 for clause 22 PHYs) - * @reg: the register to write - * @valp: value to write - * - * Issues a FW command through the given mailbox to write a PHY register. - */ -int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, - unsigned int mmd, unsigned int reg, u16 val) -{ - struct fw_ldst_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_addrspace = htonl(FW_CMD_OP(FW_LDST_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_MDIO)); - c.cycles_to_len16 = htonl(FW_LEN16(c)); - c.u.mdio.paddr_mmd = htons(FW_LDST_CMD_PADDR(phy_addr) | - FW_LDST_CMD_MMD(mmd)); - c.u.mdio.raddr = htons(reg); - c.u.mdio.rval = htons(val); - - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_fw_hello - establish communication with FW - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @evt_mbox: mailbox to receive async FW events - * @master: specifies the caller's willingness to be the device master - * @state: returns the current device state - * - * Issues a command to establish communication with FW. - */ -int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, - enum dev_master master, enum dev_state *state) -{ - int ret; - struct fw_hello_cmd c; - - INIT_CMD(c, HELLO, WRITE); - c.err_to_mbasyncnot = htonl( - FW_HELLO_CMD_MASTERDIS(master == MASTER_CANT) | - FW_HELLO_CMD_MASTERFORCE(master == MASTER_MUST) | - FW_HELLO_CMD_MBMASTER(master == MASTER_MUST ? mbox : 0xff) | - FW_HELLO_CMD_MBASYNCNOT(evt_mbox)); - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret == 0 && state) { - u32 v = ntohl(c.err_to_mbasyncnot); - if (v & FW_HELLO_CMD_INIT) - *state = DEV_STATE_INIT; - else if (v & FW_HELLO_CMD_ERR) - *state = DEV_STATE_ERR; - else - *state = DEV_STATE_UNINIT; - } - return ret; -} - -/** - * t4_fw_bye - end communication with FW - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * - * Issues a command to terminate communication with FW. - */ -int t4_fw_bye(struct adapter *adap, unsigned int mbox) -{ - struct fw_bye_cmd c; - - INIT_CMD(c, BYE, WRITE); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_init_cmd - ask FW to initialize the device - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * - * Issues a command to FW to partially initialize the device. This - * performs initialization that generally doesn't depend on user input. - */ -int t4_early_init(struct adapter *adap, unsigned int mbox) -{ - struct fw_initialize_cmd c; - - INIT_CMD(c, INITIALIZE, WRITE); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_fw_reset - issue a reset to FW - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @reset: specifies the type of reset to perform - * - * Issues a reset command of the specified type to FW. - */ -int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset) -{ - struct fw_reset_cmd c; - - INIT_CMD(c, RESET, WRITE); - c.val = htonl(reset); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_query_params - query FW or device parameters - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF - * @vf: the VF - * @nparams: the number of parameters - * @params: the parameter names - * @val: the parameter values - * - * Reads the value of FW or device parameters. Up to 7 parameters can be - * queried at once. - */ -int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int nparams, const u32 *params, - u32 *val) -{ - int i, ret; - struct fw_params_cmd c; - __be32 *p = &c.param[0].mnem; - - if (nparams > 7) - return -EINVAL; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_PARAMS_CMD) | FW_CMD_REQUEST | - FW_CMD_READ | FW_PARAMS_CMD_PFN(pf) | - FW_PARAMS_CMD_VFN(vf)); - c.retval_len16 = htonl(FW_LEN16(c)); - for (i = 0; i < nparams; i++, p += 2) - *p = htonl(*params++); - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret == 0) - for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2) - *val++ = ntohl(*p); - return ret; -} - -/** - * t4_set_params - sets FW or device parameters - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF - * @vf: the VF - * @nparams: the number of parameters - * @params: the parameter names - * @val: the parameter values - * - * Sets the value of FW or device parameters. Up to 7 parameters can be - * specified at once. - */ -int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int nparams, const u32 *params, - const u32 *val) -{ - struct fw_params_cmd c; - __be32 *p = &c.param[0].mnem; - - if (nparams > 7) - return -EINVAL; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_PARAMS_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_PARAMS_CMD_PFN(pf) | - FW_PARAMS_CMD_VFN(vf)); - c.retval_len16 = htonl(FW_LEN16(c)); - while (nparams--) { - *p++ = htonl(*params++); - *p++ = htonl(*val++); - } - - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_cfg_pfvf - configure PF/VF resource limits - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF being configured - * @vf: the VF being configured - * @txq: the max number of egress queues - * @txq_eth_ctrl: the max number of egress Ethernet or control queues - * @rxqi: the max number of interrupt-capable ingress queues - * @rxq: the max number of interruptless ingress queues - * @tc: the PCI traffic class - * @vi: the max number of virtual interfaces - * @cmask: the channel access rights mask for the PF/VF - * @pmask: the port access rights mask for the PF/VF - * @nexact: the maximum number of exact MPS filters - * @rcaps: read capabilities - * @wxcaps: write/execute capabilities - * - * Configures resource limits and capabilities for a physical or virtual - * function. - */ -int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int txq, unsigned int txq_eth_ctrl, - unsigned int rxqi, unsigned int rxq, unsigned int tc, - unsigned int vi, unsigned int cmask, unsigned int pmask, - unsigned int nexact, unsigned int rcaps, unsigned int wxcaps) -{ - struct fw_pfvf_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_PFVF_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_PFVF_CMD_PFN(pf) | - FW_PFVF_CMD_VFN(vf)); - c.retval_len16 = htonl(FW_LEN16(c)); - c.niqflint_niq = htonl(FW_PFVF_CMD_NIQFLINT(rxqi) | - FW_PFVF_CMD_NIQ(rxq)); - c.cmask_to_neq = htonl(FW_PFVF_CMD_CMASK(cmask) | - FW_PFVF_CMD_PMASK(pmask) | - FW_PFVF_CMD_NEQ(txq)); - c.tc_to_nexactf = htonl(FW_PFVF_CMD_TC(tc) | FW_PFVF_CMD_NVI(vi) | - FW_PFVF_CMD_NEXACTF(nexact)); - c.r_caps_to_nethctrl = htonl(FW_PFVF_CMD_R_CAPS(rcaps) | - FW_PFVF_CMD_WX_CAPS(wxcaps) | - FW_PFVF_CMD_NETHCTRL(txq_eth_ctrl)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_alloc_vi - allocate a virtual interface - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @port: physical port associated with the VI - * @pf: the PF owning the VI - * @vf: the VF owning the VI - * @nmac: number of MAC addresses needed (1 to 5) - * @mac: the MAC addresses of the VI - * @rss_size: size of RSS table slice associated with this VI - * - * Allocates a virtual interface for the given physical port. If @mac is - * not %NULL it contains the MAC addresses of the VI as assigned by FW. - * @mac should be large enough to hold @nmac Ethernet addresses, they are - * stored consecutively so the space needed is @nmac * 6 bytes. - * Returns a negative error number or the non-negative VI id. - */ -int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, - unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, - unsigned int *rss_size) -{ - int ret; - struct fw_vi_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_VI_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_CMD_EXEC | - FW_VI_CMD_PFN(pf) | FW_VI_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_VI_CMD_ALLOC | FW_LEN16(c)); - c.portid_pkd = FW_VI_CMD_PORTID(port); - c.nmac = nmac - 1; - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret) - return ret; - - if (mac) { - memcpy(mac, c.mac, sizeof(c.mac)); - switch (nmac) { - case 5: - memcpy(mac + 24, c.nmac3, sizeof(c.nmac3)); - case 4: - memcpy(mac + 18, c.nmac2, sizeof(c.nmac2)); - case 3: - memcpy(mac + 12, c.nmac1, sizeof(c.nmac1)); - case 2: - memcpy(mac + 6, c.nmac0, sizeof(c.nmac0)); - } - } - if (rss_size) - *rss_size = FW_VI_CMD_RSSSIZE_GET(ntohs(c.rsssize_pkd)); - return ntohs(c.viid_pkd); -} - -/** - * t4_free_vi - free a virtual interface - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF owning the VI - * @vf: the VF owning the VI - * @viid: virtual interface identifiler - * - * Free a previously allocated virtual interface. - */ -int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int viid) -{ - struct fw_vi_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_VI_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_VI_CMD_PFN(pf) | - FW_VI_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_VI_CMD_FREE | FW_LEN16(c)); - c.viid_pkd = htons(FW_VI_CMD_VIID(viid)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); -} - -/** - * t4_set_rxmode - set Rx properties of a virtual interface - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @mtu: the new MTU or -1 - * @promisc: 1 to enable promiscuous mode, 0 to disable it, -1 no change - * @all_multi: 1 to enable all-multi mode, 0 to disable it, -1 no change - * @bcast: 1 to enable broadcast Rx, 0 to disable it, -1 no change - * @sleep_ok: if true we may sleep while awaiting command completion - * - * Sets Rx properties of a virtual interface. - */ -int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid, - int mtu, int promisc, int all_multi, int bcast, bool sleep_ok) -{ - struct fw_vi_rxmode_cmd c; - - /* convert to FW values */ - if (mtu < 0) - mtu = FW_RXMODE_MTU_NO_CHG; - if (promisc < 0) - promisc = FW_VI_RXMODE_CMD_PROMISCEN_MASK; - if (all_multi < 0) - all_multi = FW_VI_RXMODE_CMD_ALLMULTIEN_MASK; - if (bcast < 0) - bcast = FW_VI_RXMODE_CMD_BROADCASTEN_MASK; - - memset(&c, 0, sizeof(c)); - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_RXMODE_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_VI_RXMODE_CMD_VIID(viid)); - c.retval_len16 = htonl(FW_LEN16(c)); - c.mtu_to_broadcasten = htonl(FW_VI_RXMODE_CMD_MTU(mtu) | - FW_VI_RXMODE_CMD_PROMISCEN(promisc) | - FW_VI_RXMODE_CMD_ALLMULTIEN(all_multi) | - FW_VI_RXMODE_CMD_BROADCASTEN(bcast)); - return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); -} - -/** - * t4_alloc_mac_filt - allocates exact-match filters for MAC addresses - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @free: if true any existing filters for this VI id are first removed - * @naddr: the number of MAC addresses to allocate filters for (up to 7) - * @addr: the MAC address(es) - * @idx: where to store the index of each allocated filter - * @hash: pointer to hash address filter bitmap - * @sleep_ok: call is allowed to sleep - * - * Allocates an exact-match filter for each of the supplied addresses and - * sets it to the corresponding address. If @idx is not %NULL it should - * have at least @naddr entries, each of which will be set to the index of - * the filter allocated for the corresponding MAC address. If a filter - * could not be allocated for an address its index is set to 0xffff. - * If @hash is not %NULL addresses that fail to allocate an exact filter - * are hashed and update the hash filter bitmap pointed at by @hash. - * - * Returns a negative error number or the number of filters allocated. - */ -int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, - unsigned int viid, bool free, unsigned int naddr, - const u8 **addr, u16 *idx, u64 *hash, bool sleep_ok) -{ - int i, ret; - struct fw_vi_mac_cmd c; - struct fw_vi_mac_exact *p; - - if (naddr > 7) - return -EINVAL; - - memset(&c, 0, sizeof(c)); - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_MAC_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | (free ? FW_CMD_EXEC : 0) | - FW_VI_MAC_CMD_VIID(viid)); - c.freemacs_to_len16 = htonl(FW_VI_MAC_CMD_FREEMACS(free) | - FW_CMD_LEN16((naddr + 2) / 2)); - - for (i = 0, p = c.u.exact; i < naddr; i++, p++) { - p->valid_to_idx = htons(FW_VI_MAC_CMD_VALID | - FW_VI_MAC_CMD_IDX(FW_VI_MAC_ADD_MAC)); - memcpy(p->macaddr, addr[i], sizeof(p->macaddr)); - } - - ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); - if (ret) - return ret; - - for (i = 0, p = c.u.exact; i < naddr; i++, p++) { - u16 index = FW_VI_MAC_CMD_IDX_GET(ntohs(p->valid_to_idx)); - - if (idx) - idx[i] = index >= NEXACT_MAC ? 0xffff : index; - if (index < NEXACT_MAC) - ret++; - else if (hash) - *hash |= (1 << hash_mac_addr(addr[i])); - } - return ret; -} - -/** - * t4_change_mac - modifies the exact-match filter for a MAC address - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @idx: index of existing filter for old value of MAC address, or -1 - * @addr: the new MAC address value - * @persist: whether a new MAC allocation should be persistent - * @add_smt: if true also add the address to the HW SMT - * - * Modifies an exact-match filter and sets it to the new MAC address. - * Note that in general it is not possible to modify the value of a given - * filter so the generic way to modify an address filter is to free the one - * being used by the old address value and allocate a new filter for the - * new address value. @idx can be -1 if the address is a new addition. - * - * Returns a negative error number or the index of the filter with the new - * MAC value. - */ -int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, - int idx, const u8 *addr, bool persist, bool add_smt) -{ - int ret, mode; - struct fw_vi_mac_cmd c; - struct fw_vi_mac_exact *p = c.u.exact; - - if (idx < 0) /* new allocation */ - idx = persist ? FW_VI_MAC_ADD_PERSIST_MAC : FW_VI_MAC_ADD_MAC; - mode = add_smt ? FW_VI_MAC_SMT_AND_MPSTCAM : FW_VI_MAC_MPS_TCAM_ENTRY; - - memset(&c, 0, sizeof(c)); - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_MAC_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_VI_MAC_CMD_VIID(viid)); - c.freemacs_to_len16 = htonl(FW_CMD_LEN16(1)); - p->valid_to_idx = htons(FW_VI_MAC_CMD_VALID | - FW_VI_MAC_CMD_SMAC_RESULT(mode) | - FW_VI_MAC_CMD_IDX(idx)); - memcpy(p->macaddr, addr, sizeof(p->macaddr)); - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret == 0) { - ret = FW_VI_MAC_CMD_IDX_GET(ntohs(p->valid_to_idx)); - if (ret >= NEXACT_MAC) - ret = -ENOMEM; - } - return ret; -} - -/** - * t4_set_addr_hash - program the MAC inexact-match hash filter - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @ucast: whether the hash filter should also match unicast addresses - * @vec: the value to be written to the hash filter - * @sleep_ok: call is allowed to sleep - * - * Sets the 64-bit inexact-match hash filter for a virtual interface. - */ -int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, - bool ucast, u64 vec, bool sleep_ok) -{ - struct fw_vi_mac_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_MAC_CMD) | FW_CMD_REQUEST | - FW_CMD_WRITE | FW_VI_ENABLE_CMD_VIID(viid)); - c.freemacs_to_len16 = htonl(FW_VI_MAC_CMD_HASHVECEN | - FW_VI_MAC_CMD_HASHUNIEN(ucast) | - FW_CMD_LEN16(1)); - c.u.hash.hashvec = cpu_to_be64(vec); - return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); -} - -/** - * t4_enable_vi - enable/disable a virtual interface - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @rx_en: 1=enable Rx, 0=disable Rx - * @tx_en: 1=enable Tx, 0=disable Tx - * - * Enables/disables a virtual interface. - */ -int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid, - bool rx_en, bool tx_en) -{ - struct fw_vi_enable_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_VI_ENABLE_CMD_VIID(viid)); - c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_IEN(rx_en) | - FW_VI_ENABLE_CMD_EEN(tx_en) | FW_LEN16(c)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_identify_port - identify a VI's port by blinking its LED - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @viid: the VI id - * @nblinks: how many times to blink LED at 2.5 Hz - * - * Identifies a VI's port by blinking its LED. - */ -int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, - unsigned int nblinks) -{ - struct fw_vi_enable_cmd c; - - c.op_to_viid = htonl(FW_CMD_OP(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_VI_ENABLE_CMD_VIID(viid)); - c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_LED | FW_LEN16(c)); - c.blinkdur = htons(nblinks); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_iq_start_stop - enable/disable an ingress queue and its FLs - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @start: %true to enable the queues, %false to disable them - * @pf: the PF owning the queues - * @vf: the VF owning the queues - * @iqid: ingress queue id - * @fl0id: FL0 queue id or 0xffff if no attached FL0 - * @fl1id: FL1 queue id or 0xffff if no attached FL1 - * - * Starts or stops an ingress queue and its associated FLs, if any. - */ -int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start, - unsigned int pf, unsigned int vf, unsigned int iqid, - unsigned int fl0id, unsigned int fl1id) -{ - struct fw_iq_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_IQ_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_IQ_CMD_PFN(pf) | - FW_IQ_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_IQ_CMD_IQSTART(start) | - FW_IQ_CMD_IQSTOP(!start) | FW_LEN16(c)); - c.iqid = htons(iqid); - c.fl0id = htons(fl0id); - c.fl1id = htons(fl1id); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_iq_free - free an ingress queue and its FLs - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF owning the queues - * @vf: the VF owning the queues - * @iqtype: the ingress queue type - * @iqid: ingress queue id - * @fl0id: FL0 queue id or 0xffff if no attached FL0 - * @fl1id: FL1 queue id or 0xffff if no attached FL1 - * - * Frees an ingress queue and its associated FLs, if any. - */ -int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int iqtype, unsigned int iqid, - unsigned int fl0id, unsigned int fl1id) -{ - struct fw_iq_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_IQ_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_IQ_CMD_PFN(pf) | - FW_IQ_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_IQ_CMD_FREE | FW_LEN16(c)); - c.type_to_iqandstindex = htonl(FW_IQ_CMD_TYPE(iqtype)); - c.iqid = htons(iqid); - c.fl0id = htons(fl0id); - c.fl1id = htons(fl1id); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_eth_eq_free - free an Ethernet egress queue - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF owning the queue - * @vf: the VF owning the queue - * @eqid: egress queue id - * - * Frees an Ethernet egress queue. - */ -int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid) -{ - struct fw_eq_eth_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_ETH_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_EQ_ETH_CMD_PFN(pf) | - FW_EQ_ETH_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_EQ_ETH_CMD_FREE | FW_LEN16(c)); - c.eqid_pkd = htonl(FW_EQ_ETH_CMD_EQID(eqid)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_ctrl_eq_free - free a control egress queue - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF owning the queue - * @vf: the VF owning the queue - * @eqid: egress queue id - * - * Frees a control egress queue. - */ -int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid) -{ - struct fw_eq_ctrl_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_CTRL_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_EQ_CTRL_CMD_PFN(pf) | - FW_EQ_CTRL_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_EQ_CTRL_CMD_FREE | FW_LEN16(c)); - c.cmpliqid_eqid = htonl(FW_EQ_CTRL_CMD_EQID(eqid)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_ofld_eq_free - free an offload egress queue - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @pf: the PF owning the queue - * @vf: the VF owning the queue - * @eqid: egress queue id - * - * Frees a control egress queue. - */ -int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, - unsigned int vf, unsigned int eqid) -{ - struct fw_eq_ofld_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_vfn = htonl(FW_CMD_OP(FW_EQ_OFLD_CMD) | FW_CMD_REQUEST | - FW_CMD_EXEC | FW_EQ_OFLD_CMD_PFN(pf) | - FW_EQ_OFLD_CMD_VFN(vf)); - c.alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_FREE | FW_LEN16(c)); - c.eqid_pkd = htonl(FW_EQ_OFLD_CMD_EQID(eqid)); - return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); -} - -/** - * t4_handle_fw_rpl - process a FW reply message - * @adap: the adapter - * @rpl: start of the FW message - * - * Processes a FW message, such as link state change messages. - */ -int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl) -{ - u8 opcode = *(const u8 *)rpl; - - if (opcode == FW_PORT_CMD) { /* link/module state change message */ - int speed = 0, fc = 0; - const struct fw_port_cmd *p = (void *)rpl; - int chan = FW_PORT_CMD_PORTID_GET(ntohl(p->op_to_portid)); - int port = adap->chan_map[chan]; - struct port_info *pi = adap2pinfo(adap, port); - struct link_config *lc = &pi->link_cfg; - u32 stat = ntohl(p->u.info.lstatus_to_modtype); - int link_ok = (stat & FW_PORT_CMD_LSTATUS) != 0; - u32 mod = FW_PORT_CMD_MODTYPE_GET(stat); - - if (stat & FW_PORT_CMD_RXPAUSE) - fc |= PAUSE_RX; - if (stat & FW_PORT_CMD_TXPAUSE) - fc |= PAUSE_TX; - if (stat & FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_100M)) - speed = SPEED_100; - else if (stat & FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_1G)) - speed = SPEED_1000; - else if (stat & FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_10G)) - speed = SPEED_10000; - - if (link_ok != lc->link_ok || speed != lc->speed || - fc != lc->fc) { /* something changed */ - lc->link_ok = link_ok; - lc->speed = speed; - lc->fc = fc; - t4_os_link_changed(adap, port, link_ok); - } - if (mod != pi->mod_type) { - pi->mod_type = mod; - t4_os_portmod_changed(adap, port); - } - } - return 0; -} - -static void __devinit get_pci_mode(struct adapter *adapter, - struct pci_params *p) -{ - u16 val; - u32 pcie_cap = pci_pcie_cap(adapter->pdev); - - if (pcie_cap) { - pci_read_config_word(adapter->pdev, pcie_cap + PCI_EXP_LNKSTA, - &val); - p->speed = val & PCI_EXP_LNKSTA_CLS; - p->width = (val & PCI_EXP_LNKSTA_NLW) >> 4; - } -} - -/** - * init_link_config - initialize a link's SW state - * @lc: structure holding the link state - * @caps: link capabilities - * - * Initializes the SW state maintained for each link, including the link's - * capabilities and default speed/flow-control/autonegotiation settings. - */ -static void __devinit init_link_config(struct link_config *lc, - unsigned int caps) -{ - lc->supported = caps; - lc->requested_speed = 0; - lc->speed = 0; - lc->requested_fc = lc->fc = PAUSE_RX | PAUSE_TX; - if (lc->supported & FW_PORT_CAP_ANEG) { - lc->advertising = lc->supported & ADVERT_MASK; - lc->autoneg = AUTONEG_ENABLE; - lc->requested_fc |= PAUSE_AUTONEG; - } else { - lc->advertising = 0; - lc->autoneg = AUTONEG_DISABLE; - } -} - -static int __devinit wait_dev_ready(struct adapter *adap) -{ - if (t4_read_reg(adap, PL_WHOAMI) != 0xffffffff) - return 0; - msleep(500); - return t4_read_reg(adap, PL_WHOAMI) != 0xffffffff ? 0 : -EIO; -} - -/** - * t4_prep_adapter - prepare SW and HW for operation - * @adapter: the adapter - * @reset: if true perform a HW reset - * - * Initialize adapter SW state for the various HW modules, set initial - * values for some adapter tunables, take PHYs out of reset, and - * initialize the MDIO interface. - */ -int __devinit t4_prep_adapter(struct adapter *adapter) -{ - int ret; - - ret = wait_dev_ready(adapter); - if (ret < 0) - return ret; - - get_pci_mode(adapter, &adapter->params.pci); - adapter->params.rev = t4_read_reg(adapter, PL_REV); - - ret = get_vpd_params(adapter, &adapter->params.vpd); - if (ret < 0) - return ret; - - init_cong_ctrl(adapter->params.a_wnd, adapter->params.b_wnd); - - /* - * Default port for debugging in case we can't reach FW. - */ - adapter->params.nports = 1; - adapter->params.portvec = 1; - return 0; -} - -int __devinit t4_port_init(struct adapter *adap, int mbox, int pf, int vf) -{ - u8 addr[6]; - int ret, i, j = 0; - struct fw_port_cmd c; - - memset(&c, 0, sizeof(c)); - - for_each_port(adap, i) { - unsigned int rss_size; - struct port_info *p = adap2pinfo(adap, i); - - while ((adap->params.portvec & (1 << j)) == 0) - j++; - - c.op_to_portid = htonl(FW_CMD_OP(FW_PORT_CMD) | - FW_CMD_REQUEST | FW_CMD_READ | - FW_PORT_CMD_PORTID(j)); - c.action_to_len16 = htonl( - FW_PORT_CMD_ACTION(FW_PORT_ACTION_GET_PORT_INFO) | - FW_LEN16(c)); - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret) - return ret; - - ret = t4_alloc_vi(adap, mbox, j, pf, vf, 1, addr, &rss_size); - if (ret < 0) - return ret; - - p->viid = ret; - p->tx_chan = j; - p->lport = j; - p->rss_size = rss_size; - memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN); - memcpy(adap->port[i]->perm_addr, addr, ETH_ALEN); - - ret = ntohl(c.u.info.lstatus_to_modtype); - p->mdio_addr = (ret & FW_PORT_CMD_MDIOCAP) ? - FW_PORT_CMD_MDIOADDR_GET(ret) : -1; - p->port_type = FW_PORT_CMD_PTYPE_GET(ret); - p->mod_type = FW_PORT_CMD_MODTYPE_GET(ret); - - init_link_config(&p->link_cfg, ntohs(c.u.info.pcap)); - j++; - } - return 0; -} diff --git a/trunk/drivers/net/cxgb4/t4_hw.h b/trunk/drivers/net/cxgb4/t4_hw.h deleted file mode 100644 index 025623285c93..000000000000 --- a/trunk/drivers/net/cxgb4/t4_hw.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __T4_HW_H -#define __T4_HW_H - -#include - -enum { - NCHAN = 4, /* # of HW channels */ - MAX_MTU = 9600, /* max MAC MTU, excluding header + FCS */ - EEPROMSIZE = 17408, /* Serial EEPROM physical size */ - EEPROMVSIZE = 32768, /* Serial EEPROM virtual address space size */ - RSS_NENTRIES = 2048, /* # of entries in RSS mapping table */ - TCB_SIZE = 128, /* TCB size */ - NMTUS = 16, /* size of MTU table */ - NCCTRL_WIN = 32, /* # of congestion control windows */ - NEXACT_MAC = 336, /* # of exact MAC address filters */ - L2T_SIZE = 4096, /* # of L2T entries */ - MBOX_LEN = 64, /* mailbox size in bytes */ - TRACE_LEN = 112, /* length of trace data and mask */ - FILTER_OPT_LEN = 36, /* filter tuple width for optional components */ - NWOL_PAT = 8, /* # of WoL patterns */ - WOL_PAT_LEN = 128, /* length of WoL patterns */ -}; - -enum { - SF_PAGE_SIZE = 256, /* serial flash page size */ - SF_SEC_SIZE = 64 * 1024, /* serial flash sector size */ - SF_SIZE = SF_SEC_SIZE * 16, /* serial flash size */ -}; - -enum { RSP_TYPE_FLBUF, RSP_TYPE_CPL, RSP_TYPE_INTR }; /* response entry types */ - -enum { MBOX_OWNER_NONE, MBOX_OWNER_FW, MBOX_OWNER_DRV }; /* mailbox owners */ - -enum { - SGE_MAX_WR_LEN = 512, /* max WR size in bytes */ - SGE_NTIMERS = 6, /* # of interrupt holdoff timer values */ - SGE_NCOUNTERS = 4, /* # of interrupt packet counter values */ -}; - -struct sge_qstat { /* data written to SGE queue status entries */ - __be32 qid; - __be16 cidx; - __be16 pidx; -}; - -/* - * Structure for last 128 bits of response descriptors - */ -struct rsp_ctrl { - __be32 hdrbuflen_pidx; - __be32 pldbuflen_qid; - union { - u8 type_gen; - __be64 last_flit; - }; -}; - -#define RSPD_NEWBUF 0x80000000U -#define RSPD_LEN 0x7fffffffU - -#define RSPD_GEN(x) ((x) >> 7) -#define RSPD_TYPE(x) (((x) >> 4) & 3) - -#define QINTR_CNT_EN 0x1 -#define QINTR_TIMER_IDX(x) ((x) << 1) -#endif /* __T4_HW_H */ diff --git a/trunk/drivers/net/cxgb4/t4_msg.h b/trunk/drivers/net/cxgb4/t4_msg.h deleted file mode 100644 index fdb117443144..000000000000 --- a/trunk/drivers/net/cxgb4/t4_msg.h +++ /dev/null @@ -1,664 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2003-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __T4_MSG_H -#define __T4_MSG_H - -#include - -enum { - CPL_PASS_OPEN_REQ = 0x1, - CPL_PASS_ACCEPT_RPL = 0x2, - CPL_ACT_OPEN_REQ = 0x3, - CPL_SET_TCB_FIELD = 0x5, - CPL_GET_TCB = 0x6, - CPL_CLOSE_CON_REQ = 0x8, - CPL_CLOSE_LISTSRV_REQ = 0x9, - CPL_ABORT_REQ = 0xA, - CPL_ABORT_RPL = 0xB, - CPL_RX_DATA_ACK = 0xD, - CPL_TX_PKT = 0xE, - CPL_L2T_WRITE_REQ = 0x12, - CPL_TID_RELEASE = 0x1A, - - CPL_CLOSE_LISTSRV_RPL = 0x20, - CPL_L2T_WRITE_RPL = 0x23, - CPL_PASS_OPEN_RPL = 0x24, - CPL_ACT_OPEN_RPL = 0x25, - CPL_PEER_CLOSE = 0x26, - CPL_ABORT_REQ_RSS = 0x2B, - CPL_ABORT_RPL_RSS = 0x2D, - - CPL_CLOSE_CON_RPL = 0x32, - CPL_ISCSI_HDR = 0x33, - CPL_RDMA_CQE = 0x35, - CPL_RDMA_CQE_READ_RSP = 0x36, - CPL_RDMA_CQE_ERR = 0x37, - CPL_RX_DATA = 0x39, - CPL_SET_TCB_RPL = 0x3A, - CPL_RX_PKT = 0x3B, - CPL_RX_DDP_COMPLETE = 0x3F, - - CPL_ACT_ESTABLISH = 0x40, - CPL_PASS_ESTABLISH = 0x41, - CPL_RX_DATA_DDP = 0x42, - CPL_PASS_ACCEPT_REQ = 0x44, - - CPL_RDMA_READ_REQ = 0x60, - - CPL_PASS_OPEN_REQ6 = 0x81, - CPL_ACT_OPEN_REQ6 = 0x83, - - CPL_RDMA_TERMINATE = 0xA2, - CPL_RDMA_WRITE = 0xA4, - CPL_SGE_EGR_UPDATE = 0xA5, - - CPL_TRACE_PKT = 0xB0, - - CPL_FW4_MSG = 0xC0, - CPL_FW4_PLD = 0xC1, - CPL_FW4_ACK = 0xC3, - - CPL_FW6_MSG = 0xE0, - CPL_FW6_PLD = 0xE1, - CPL_TX_PKT_LSO = 0xED, - CPL_TX_PKT_XT = 0xEE, - - NUM_CPL_CMDS -}; - -enum CPL_error { - CPL_ERR_NONE = 0, - CPL_ERR_TCAM_FULL = 3, - CPL_ERR_BAD_LENGTH = 15, - CPL_ERR_BAD_ROUTE = 18, - CPL_ERR_CONN_RESET = 20, - CPL_ERR_CONN_EXIST_SYNRECV = 21, - CPL_ERR_CONN_EXIST = 22, - CPL_ERR_ARP_MISS = 23, - CPL_ERR_BAD_SYN = 24, - CPL_ERR_CONN_TIMEDOUT = 30, - CPL_ERR_XMIT_TIMEDOUT = 31, - CPL_ERR_PERSIST_TIMEDOUT = 32, - CPL_ERR_FINWAIT2_TIMEDOUT = 33, - CPL_ERR_KEEPALIVE_TIMEDOUT = 34, - CPL_ERR_RTX_NEG_ADVICE = 35, - CPL_ERR_PERSIST_NEG_ADVICE = 36, - CPL_ERR_ABORT_FAILED = 42, - CPL_ERR_IWARP_FLM = 50, -}; - -enum { - ULP_MODE_NONE = 0, - ULP_MODE_ISCSI = 2, - ULP_MODE_RDMA = 4, - ULP_MODE_FCOE = 6, -}; - -enum { - ULP_CRC_HEADER = 1 << 0, - ULP_CRC_DATA = 1 << 1 -}; - -enum { - CPL_ABORT_SEND_RST = 0, - CPL_ABORT_NO_RST, -}; - -enum { /* TX_PKT_XT checksum types */ - TX_CSUM_TCP = 0, - TX_CSUM_UDP = 1, - TX_CSUM_CRC16 = 4, - TX_CSUM_CRC32 = 5, - TX_CSUM_CRC32C = 6, - TX_CSUM_FCOE = 7, - TX_CSUM_TCPIP = 8, - TX_CSUM_UDPIP = 9, - TX_CSUM_TCPIP6 = 10, - TX_CSUM_UDPIP6 = 11, - TX_CSUM_IP = 12, -}; - -union opcode_tid { - __be32 opcode_tid; - u8 opcode; -}; - -#define CPL_OPCODE(x) ((x) << 24) -#define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE(opcode) | (tid)) -#define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid) -#define GET_TID(cmd) (ntohl(OPCODE_TID(cmd)) & 0xFFFFFF) - -/* partitioning of TID fields that also carry a queue id */ -#define GET_TID_TID(x) ((x) & 0x3fff) -#define GET_TID_QID(x) (((x) >> 14) & 0x3ff) -#define TID_QID(x) ((x) << 14) - -struct rss_header { - u8 opcode; -#if defined(__LITTLE_ENDIAN_BITFIELD) - u8 channel:2; - u8 filter_hit:1; - u8 filter_tid:1; - u8 hash_type:2; - u8 ipv6:1; - u8 send2fw:1; -#else - u8 send2fw:1; - u8 ipv6:1; - u8 hash_type:2; - u8 filter_tid:1; - u8 filter_hit:1; - u8 channel:2; -#endif - __be16 qid; - __be32 hash_val; -}; - -struct work_request_hdr { - __be32 wr_hi; - __be32 wr_mid; - __be64 wr_lo; -}; - -#define WR_HDR struct work_request_hdr wr - -struct cpl_pass_open_req { - WR_HDR; - union opcode_tid ot; - __be16 local_port; - __be16 peer_port; - __be32 local_ip; - __be32 peer_ip; - __be64 opt0; -#define TX_CHAN(x) ((x) << 2) -#define DELACK(x) ((x) << 5) -#define ULP_MODE(x) ((x) << 8) -#define RCV_BUFSIZ(x) ((x) << 12) -#define DSCP(x) ((x) << 22) -#define SMAC_SEL(x) ((u64)(x) << 28) -#define L2T_IDX(x) ((u64)(x) << 36) -#define NAGLE(x) ((u64)(x) << 49) -#define WND_SCALE(x) ((u64)(x) << 50) -#define KEEP_ALIVE(x) ((u64)(x) << 54) -#define MSS_IDX(x) ((u64)(x) << 60) - __be64 opt1; -#define SYN_RSS_ENABLE (1 << 0) -#define SYN_RSS_QUEUE(x) ((x) << 2) -#define CONN_POLICY_ASK (1 << 22) -}; - -struct cpl_pass_open_req6 { - WR_HDR; - union opcode_tid ot; - __be16 local_port; - __be16 peer_port; - __be64 local_ip_hi; - __be64 local_ip_lo; - __be64 peer_ip_hi; - __be64 peer_ip_lo; - __be64 opt0; - __be64 opt1; -}; - -struct cpl_pass_open_rpl { - union opcode_tid ot; - u8 rsvd[3]; - u8 status; -}; - -struct cpl_pass_accept_rpl { - WR_HDR; - union opcode_tid ot; - __be32 opt2; -#define RSS_QUEUE(x) ((x) << 0) -#define RSS_QUEUE_VALID (1 << 10) -#define RX_COALESCE_VALID(x) ((x) << 11) -#define RX_COALESCE(x) ((x) << 12) -#define TX_QUEUE(x) ((x) << 23) -#define RX_CHANNEL(x) ((x) << 26) -#define WND_SCALE_EN(x) ((x) << 28) -#define TSTAMPS_EN(x) ((x) << 29) -#define SACK_EN(x) ((x) << 30) - __be64 opt0; -}; - -struct cpl_act_open_req { - WR_HDR; - union opcode_tid ot; - __be16 local_port; - __be16 peer_port; - __be32 local_ip; - __be32 peer_ip; - __be64 opt0; - __be32 params; - __be32 opt2; -}; - -struct cpl_act_open_req6 { - WR_HDR; - union opcode_tid ot; - __be16 local_port; - __be16 peer_port; - __be64 local_ip_hi; - __be64 local_ip_lo; - __be64 peer_ip_hi; - __be64 peer_ip_lo; - __be64 opt0; - __be32 params; - __be32 opt2; -}; - -struct cpl_act_open_rpl { - union opcode_tid ot; - __be32 atid_status; -#define GET_AOPEN_STATUS(x) ((x) & 0xff) -#define GET_AOPEN_ATID(x) (((x) >> 8) & 0xffffff) -}; - -struct cpl_pass_establish { - union opcode_tid ot; - __be32 rsvd; - __be32 tos_stid; -#define GET_POPEN_TID(x) ((x) & 0xffffff) -#define GET_POPEN_TOS(x) (((x) >> 24) & 0xff) - __be16 mac_idx; - __be16 tcp_opt; -#define GET_TCPOPT_WSCALE_OK(x) (((x) >> 5) & 1) -#define GET_TCPOPT_SACK(x) (((x) >> 6) & 1) -#define GET_TCPOPT_TSTAMP(x) (((x) >> 7) & 1) -#define GET_TCPOPT_SND_WSCALE(x) (((x) >> 8) & 0xf) -#define GET_TCPOPT_MSS(x) (((x) >> 12) & 0xf) - __be32 snd_isn; - __be32 rcv_isn; -}; - -struct cpl_act_establish { - union opcode_tid ot; - __be32 rsvd; - __be32 tos_atid; - __be16 mac_idx; - __be16 tcp_opt; - __be32 snd_isn; - __be32 rcv_isn; -}; - -struct cpl_get_tcb { - WR_HDR; - union opcode_tid ot; - __be16 reply_ctrl; -#define QUEUENO(x) ((x) << 0) -#define REPLY_CHAN(x) ((x) << 14) -#define NO_REPLY(x) ((x) << 15) - __be16 cookie; -}; - -struct cpl_set_tcb_field { - WR_HDR; - union opcode_tid ot; - __be16 reply_ctrl; - __be16 word_cookie; -#define TCB_WORD(x) ((x) << 0) -#define TCB_COOKIE(x) ((x) << 5) - __be64 mask; - __be64 val; -}; - -struct cpl_set_tcb_rpl { - union opcode_tid ot; - __be16 rsvd; - u8 cookie; - u8 status; - __be64 oldval; -}; - -struct cpl_close_con_req { - WR_HDR; - union opcode_tid ot; - __be32 rsvd; -}; - -struct cpl_close_con_rpl { - union opcode_tid ot; - u8 rsvd[3]; - u8 status; - __be32 snd_nxt; - __be32 rcv_nxt; -}; - -struct cpl_close_listsvr_req { - WR_HDR; - union opcode_tid ot; - __be16 reply_ctrl; -#define LISTSVR_IPV6 (1 << 14) - __be16 rsvd; -}; - -struct cpl_close_listsvr_rpl { - union opcode_tid ot; - u8 rsvd[3]; - u8 status; -}; - -struct cpl_abort_req_rss { - union opcode_tid ot; - u8 rsvd[3]; - u8 status; -}; - -struct cpl_abort_req { - WR_HDR; - union opcode_tid ot; - __be32 rsvd0; - u8 rsvd1; - u8 cmd; - u8 rsvd2[6]; -}; - -struct cpl_abort_rpl_rss { - union opcode_tid ot; - u8 rsvd[3]; - u8 status; -}; - -struct cpl_abort_rpl { - WR_HDR; - union opcode_tid ot; - __be32 rsvd0; - u8 rsvd1; - u8 cmd; - u8 rsvd2[6]; -}; - -struct cpl_peer_close { - union opcode_tid ot; - __be32 rcv_nxt; -}; - -struct cpl_tid_release { - WR_HDR; - union opcode_tid ot; - __be32 rsvd; -}; - -struct cpl_tx_pkt_core { - __be32 ctrl0; -#define TXPKT_VF(x) ((x) << 0) -#define TXPKT_PF(x) ((x) << 8) -#define TXPKT_VF_VLD (1 << 11) -#define TXPKT_OVLAN_IDX(x) ((x) << 12) -#define TXPKT_INTF(x) ((x) << 16) -#define TXPKT_INS_OVLAN (1 << 21) -#define TXPKT_OPCODE(x) ((x) << 24) - __be16 pack; - __be16 len; - __be64 ctrl1; -#define TXPKT_CSUM_END(x) ((x) << 12) -#define TXPKT_CSUM_START(x) ((x) << 20) -#define TXPKT_IPHDR_LEN(x) ((u64)(x) << 20) -#define TXPKT_CSUM_LOC(x) ((u64)(x) << 30) -#define TXPKT_ETHHDR_LEN(x) ((u64)(x) << 34) -#define TXPKT_CSUM_TYPE(x) ((u64)(x) << 40) -#define TXPKT_VLAN(x) ((u64)(x) << 44) -#define TXPKT_VLAN_VLD (1ULL << 60) -#define TXPKT_IPCSUM_DIS (1ULL << 62) -#define TXPKT_L4CSUM_DIS (1ULL << 63) -}; - -struct cpl_tx_pkt { - WR_HDR; - struct cpl_tx_pkt_core c; -}; - -#define cpl_tx_pkt_xt cpl_tx_pkt - -struct cpl_tx_pkt_lso { - WR_HDR; - __be32 lso_ctrl; -#define LSO_TCPHDR_LEN(x) ((x) << 0) -#define LSO_IPHDR_LEN(x) ((x) << 4) -#define LSO_ETHHDR_LEN(x) ((x) << 16) -#define LSO_IPV6(x) ((x) << 20) -#define LSO_LAST_SLICE (1 << 22) -#define LSO_FIRST_SLICE (1 << 23) -#define LSO_OPCODE(x) ((x) << 24) - __be16 ipid_ofst; - __be16 mss; - __be32 seqno_offset; - __be32 len; - /* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */ -}; - -struct cpl_iscsi_hdr { - union opcode_tid ot; - __be16 pdu_len_ddp; -#define ISCSI_PDU_LEN(x) ((x) & 0x7FFF) -#define ISCSI_DDP (1 << 15) - __be16 len; - __be32 seq; - __be16 urg; - u8 rsvd; - u8 status; -}; - -struct cpl_rx_data { - union opcode_tid ot; - __be16 rsvd; - __be16 len; - __be32 seq; - __be16 urg; -#if defined(__LITTLE_ENDIAN_BITFIELD) - u8 dack_mode:2; - u8 psh:1; - u8 heartbeat:1; - u8 ddp_off:1; - u8 :3; -#else - u8 :3; - u8 ddp_off:1; - u8 heartbeat:1; - u8 psh:1; - u8 dack_mode:2; -#endif - u8 status; -}; - -struct cpl_rx_data_ack { - WR_HDR; - union opcode_tid ot; - __be32 credit_dack; -#define RX_CREDITS(x) ((x) << 0) -#define RX_FORCE_ACK(x) ((x) << 28) -}; - -struct cpl_rx_pkt { - u8 opcode; -#if defined(__LITTLE_ENDIAN_BITFIELD) - u8 iff:4; - u8 csum_calc:1; - u8 ipmi_pkt:1; - u8 vlan_ex:1; - u8 ip_frag:1; -#else - u8 ip_frag:1; - u8 vlan_ex:1; - u8 ipmi_pkt:1; - u8 csum_calc:1; - u8 iff:4; -#endif - __be16 csum; - __be16 vlan; - __be16 len; - __be32 l2info; -#define RXF_UDP (1 << 22) -#define RXF_TCP (1 << 23) - __be16 hdr_len; - __be16 err_vec; -}; - -struct cpl_trace_pkt { - u8 opcode; - u8 intf; -#if defined(__LITTLE_ENDIAN_BITFIELD) - u8 runt:4; - u8 filter_hit:4; - u8 :6; - u8 err:1; - u8 trunc:1; -#else - u8 filter_hit:4; - u8 runt:4; - u8 trunc:1; - u8 err:1; - u8 :6; -#endif - __be16 rsvd; - __be16 len; - __be64 tstamp; -}; - -struct cpl_l2t_write_req { - WR_HDR; - union opcode_tid ot; - __be16 params; -#define L2T_W_INFO(x) ((x) << 2) -#define L2T_W_PORT(x) ((x) << 8) -#define L2T_W_NOREPLY(x) ((x) << 15) - __be16 l2t_idx; - __be16 vlan; - u8 dst_mac[6]; -}; - -struct cpl_l2t_write_rpl { - union opcode_tid ot; - u8 status; - u8 rsvd[3]; -}; - -struct cpl_rdma_terminate { - union opcode_tid ot; - __be16 rsvd; - __be16 len; -}; - -struct cpl_sge_egr_update { - __be32 opcode_qid; -#define EGR_QID(x) ((x) & 0x1FFFF) - __be16 cidx; - __be16 pidx; -}; - -struct cpl_fw4_pld { - u8 opcode; - u8 rsvd0[3]; - u8 type; - u8 rsvd1; - __be16 len; - __be64 data; - __be64 rsvd2; -}; - -struct cpl_fw6_pld { - u8 opcode; - u8 rsvd[5]; - __be16 len; - __be64 data[4]; -}; - -struct cpl_fw4_msg { - u8 opcode; - u8 type; - __be16 rsvd0; - __be32 rsvd1; - __be64 data[2]; -}; - -struct cpl_fw4_ack { - union opcode_tid ot; - u8 credits; - u8 rsvd0[2]; - u8 seq_vld; - __be32 snd_nxt; - __be32 snd_una; - __be64 rsvd1; -}; - -struct cpl_fw6_msg { - u8 opcode; - u8 type; - __be16 rsvd0; - __be32 rsvd1; - __be64 data[4]; -}; - -enum { - ULP_TX_MEM_READ = 2, - ULP_TX_MEM_WRITE = 3, - ULP_TX_PKT = 4 -}; - -enum { - ULP_TX_SC_NOOP = 0x80, - ULP_TX_SC_IMM = 0x81, - ULP_TX_SC_DSGL = 0x82, - ULP_TX_SC_ISGL = 0x83 -}; - -struct ulptx_sge_pair { - __be32 len[2]; - __be64 addr[2]; -}; - -struct ulptx_sgl { - __be32 cmd_nsge; -#define ULPTX_CMD(x) ((x) << 24) -#define ULPTX_NSGE(x) ((x) << 0) - __be32 len0; - __be64 addr0; - struct ulptx_sge_pair sge[0]; -}; - -struct ulp_mem_io { - WR_HDR; - __be32 cmd; -#define ULP_MEMIO_ORDER(x) ((x) << 23) - __be32 len16; /* command length */ - __be32 dlen; /* data length in 32-byte units */ -#define ULP_MEMIO_DATA_LEN(x) ((x) << 0) - __be32 lock_addr; -#define ULP_MEMIO_ADDR(x) ((x) << 0) -#define ULP_MEMIO_LOCK(x) ((x) << 31) -}; - -#endif /* __T4_MSG_H */ diff --git a/trunk/drivers/net/cxgb4/t4_regs.h b/trunk/drivers/net/cxgb4/t4_regs.h deleted file mode 100644 index 5ed56483cbc2..000000000000 --- a/trunk/drivers/net/cxgb4/t4_regs.h +++ /dev/null @@ -1,878 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __T4_REGS_H -#define __T4_REGS_H - -#define MYPF_BASE 0x1b000 -#define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) - -#define PF0_BASE 0x1e000 -#define PF0_REG(reg_addr) (PF0_BASE + (reg_addr)) - -#define PF_STRIDE 0x400 -#define PF_BASE(idx) (PF0_BASE + (idx) * PF_STRIDE) -#define PF_REG(idx, reg) (PF_BASE(idx) + (reg)) - -#define MYPORT_BASE 0x1c000 -#define MYPORT_REG(reg_addr) (MYPORT_BASE + (reg_addr)) - -#define PORT0_BASE 0x20000 -#define PORT0_REG(reg_addr) (PORT0_BASE + (reg_addr)) - -#define PORT_STRIDE 0x2000 -#define PORT_BASE(idx) (PORT0_BASE + (idx) * PORT_STRIDE) -#define PORT_REG(idx, reg) (PORT_BASE(idx) + (reg)) - -#define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR) -#define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx) - -#define PCIE_MEM_ACCESS_REG(reg_addr, idx) ((reg_addr) + (idx) * 8) -#define PCIE_MAILBOX_REG(reg_addr, idx) ((reg_addr) + (idx) * 8) -#define MC_BIST_STATUS_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) -#define EDC_BIST_STATUS_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) - -#define SGE_PF_KDOORBELL 0x0 -#define QID_MASK 0xffff8000U -#define QID_SHIFT 15 -#define QID(x) ((x) << QID_SHIFT) -#define DBPRIO 0x00004000U -#define PIDX_MASK 0x00003fffU -#define PIDX_SHIFT 0 -#define PIDX(x) ((x) << PIDX_SHIFT) - -#define SGE_PF_GTS 0x4 -#define INGRESSQID_MASK 0xffff0000U -#define INGRESSQID_SHIFT 16 -#define INGRESSQID(x) ((x) << INGRESSQID_SHIFT) -#define TIMERREG_MASK 0x0000e000U -#define TIMERREG_SHIFT 13 -#define TIMERREG(x) ((x) << TIMERREG_SHIFT) -#define SEINTARM_MASK 0x00001000U -#define SEINTARM_SHIFT 12 -#define SEINTARM(x) ((x) << SEINTARM_SHIFT) -#define CIDXINC_MASK 0x00000fffU -#define CIDXINC_SHIFT 0 -#define CIDXINC(x) ((x) << CIDXINC_SHIFT) - -#define SGE_CONTROL 0x1008 -#define DCASYSTYPE 0x00080000U -#define RXPKTCPLMODE 0x00040000U -#define EGRSTATUSPAGESIZE 0x00020000U -#define PKTSHIFT_MASK 0x00001c00U -#define PKTSHIFT_SHIFT 10 -#define PKTSHIFT(x) ((x) << PKTSHIFT_SHIFT) -#define INGPCIEBOUNDARY_MASK 0x00000380U -#define INGPCIEBOUNDARY_SHIFT 7 -#define INGPCIEBOUNDARY(x) ((x) << INGPCIEBOUNDARY_SHIFT) -#define INGPADBOUNDARY_MASK 0x00000070U -#define INGPADBOUNDARY_SHIFT 4 -#define INGPADBOUNDARY(x) ((x) << INGPADBOUNDARY_SHIFT) -#define EGRPCIEBOUNDARY_MASK 0x0000000eU -#define EGRPCIEBOUNDARY_SHIFT 1 -#define EGRPCIEBOUNDARY(x) ((x) << EGRPCIEBOUNDARY_SHIFT) -#define GLOBALENABLE 0x00000001U - -#define SGE_HOST_PAGE_SIZE 0x100c -#define HOSTPAGESIZEPF0_MASK 0x0000000fU -#define HOSTPAGESIZEPF0_SHIFT 0 -#define HOSTPAGESIZEPF0(x) ((x) << HOSTPAGESIZEPF0_SHIFT) - -#define SGE_EGRESS_QUEUES_PER_PAGE_PF 0x1010 -#define QUEUESPERPAGEPF0_MASK 0x0000000fU -#define QUEUESPERPAGEPF0_GET(x) ((x) & QUEUESPERPAGEPF0_MASK) - -#define SGE_INT_CAUSE1 0x1024 -#define SGE_INT_CAUSE2 0x1030 -#define SGE_INT_CAUSE3 0x103c -#define ERR_FLM_DBP 0x80000000U -#define ERR_FLM_IDMA1 0x40000000U -#define ERR_FLM_IDMA0 0x20000000U -#define ERR_FLM_HINT 0x10000000U -#define ERR_PCIE_ERROR3 0x08000000U -#define ERR_PCIE_ERROR2 0x04000000U -#define ERR_PCIE_ERROR1 0x02000000U -#define ERR_PCIE_ERROR0 0x01000000U -#define ERR_TIMER_ABOVE_MAX_QID 0x00800000U -#define ERR_CPL_EXCEED_IQE_SIZE 0x00400000U -#define ERR_INVALID_CIDX_INC 0x00200000U -#define ERR_ITP_TIME_PAUSED 0x00100000U -#define ERR_CPL_OPCODE_0 0x00080000U -#define ERR_DROPPED_DB 0x00040000U -#define ERR_DATA_CPL_ON_HIGH_QID1 0x00020000U -#define ERR_DATA_CPL_ON_HIGH_QID0 0x00010000U -#define ERR_BAD_DB_PIDX3 0x00008000U -#define ERR_BAD_DB_PIDX2 0x00004000U -#define ERR_BAD_DB_PIDX1 0x00002000U -#define ERR_BAD_DB_PIDX0 0x00001000U -#define ERR_ING_PCIE_CHAN 0x00000800U -#define ERR_ING_CTXT_PRIO 0x00000400U -#define ERR_EGR_CTXT_PRIO 0x00000200U -#define DBFIFO_HP_INT 0x00000100U -#define DBFIFO_LP_INT 0x00000080U -#define REG_ADDRESS_ERR 0x00000040U -#define INGRESS_SIZE_ERR 0x00000020U -#define EGRESS_SIZE_ERR 0x00000010U -#define ERR_INV_CTXT3 0x00000008U -#define ERR_INV_CTXT2 0x00000004U -#define ERR_INV_CTXT1 0x00000002U -#define ERR_INV_CTXT0 0x00000001U - -#define SGE_INT_ENABLE3 0x1040 -#define SGE_FL_BUFFER_SIZE0 0x1044 -#define SGE_FL_BUFFER_SIZE1 0x1048 -#define SGE_INGRESS_RX_THRESHOLD 0x10a0 -#define THRESHOLD_0_MASK 0x3f000000U -#define THRESHOLD_0_SHIFT 24 -#define THRESHOLD_0(x) ((x) << THRESHOLD_0_SHIFT) -#define THRESHOLD_0_GET(x) (((x) & THRESHOLD_0_MASK) >> THRESHOLD_0_SHIFT) -#define THRESHOLD_1_MASK 0x003f0000U -#define THRESHOLD_1_SHIFT 16 -#define THRESHOLD_1(x) ((x) << THRESHOLD_1_SHIFT) -#define THRESHOLD_1_GET(x) (((x) & THRESHOLD_1_MASK) >> THRESHOLD_1_SHIFT) -#define THRESHOLD_2_MASK 0x00003f00U -#define THRESHOLD_2_SHIFT 8 -#define THRESHOLD_2(x) ((x) << THRESHOLD_2_SHIFT) -#define THRESHOLD_2_GET(x) (((x) & THRESHOLD_2_MASK) >> THRESHOLD_2_SHIFT) -#define THRESHOLD_3_MASK 0x0000003fU -#define THRESHOLD_3_SHIFT 0 -#define THRESHOLD_3(x) ((x) << THRESHOLD_3_SHIFT) -#define THRESHOLD_3_GET(x) (((x) & THRESHOLD_3_MASK) >> THRESHOLD_3_SHIFT) - -#define SGE_TIMER_VALUE_0_AND_1 0x10b8 -#define TIMERVALUE0_MASK 0xffff0000U -#define TIMERVALUE0_SHIFT 16 -#define TIMERVALUE0(x) ((x) << TIMERVALUE0_SHIFT) -#define TIMERVALUE0_GET(x) (((x) & TIMERVALUE0_MASK) >> TIMERVALUE0_SHIFT) -#define TIMERVALUE1_MASK 0x0000ffffU -#define TIMERVALUE1_SHIFT 0 -#define TIMERVALUE1(x) ((x) << TIMERVALUE1_SHIFT) -#define TIMERVALUE1_GET(x) (((x) & TIMERVALUE1_MASK) >> TIMERVALUE1_SHIFT) - -#define SGE_TIMER_VALUE_2_AND_3 0x10bc -#define SGE_TIMER_VALUE_4_AND_5 0x10c0 -#define SGE_DEBUG_INDEX 0x10cc -#define SGE_DEBUG_DATA_HIGH 0x10d0 -#define SGE_DEBUG_DATA_LOW 0x10d4 -#define SGE_INGRESS_QUEUES_PER_PAGE_PF 0x10f4 - -#define PCIE_PF_CLI 0x44 -#define PCIE_INT_CAUSE 0x3004 -#define UNXSPLCPLERR 0x20000000U -#define PCIEPINT 0x10000000U -#define PCIESINT 0x08000000U -#define RPLPERR 0x04000000U -#define RXWRPERR 0x02000000U -#define RXCPLPERR 0x01000000U -#define PIOTAGPERR 0x00800000U -#define MATAGPERR 0x00400000U -#define INTXCLRPERR 0x00200000U -#define FIDPERR 0x00100000U -#define CFGSNPPERR 0x00080000U -#define HRSPPERR 0x00040000U -#define HREQPERR 0x00020000U -#define HCNTPERR 0x00010000U -#define DRSPPERR 0x00008000U -#define DREQPERR 0x00004000U -#define DCNTPERR 0x00002000U -#define CRSPPERR 0x00001000U -#define CREQPERR 0x00000800U -#define CCNTPERR 0x00000400U -#define TARTAGPERR 0x00000200U -#define PIOREQPERR 0x00000100U -#define PIOCPLPERR 0x00000080U -#define MSIXDIPERR 0x00000040U -#define MSIXDATAPERR 0x00000020U -#define MSIXADDRHPERR 0x00000010U -#define MSIXADDRLPERR 0x00000008U -#define MSIDATAPERR 0x00000004U -#define MSIADDRHPERR 0x00000002U -#define MSIADDRLPERR 0x00000001U - -#define PCIE_NONFAT_ERR 0x3010 -#define PCIE_MEM_ACCESS_BASE_WIN 0x3068 -#define PCIEOFST_MASK 0xfffffc00U -#define BIR_MASK 0x00000300U -#define BIR_SHIFT 8 -#define BIR(x) ((x) << BIR_SHIFT) -#define WINDOW_MASK 0x000000ffU -#define WINDOW_SHIFT 0 -#define WINDOW(x) ((x) << WINDOW_SHIFT) - -#define PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS 0x5908 -#define RNPP 0x80000000U -#define RPCP 0x20000000U -#define RCIP 0x08000000U -#define RCCP 0x04000000U -#define RFTP 0x00800000U -#define PTRP 0x00100000U - -#define PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS 0x59a4 -#define TPCP 0x40000000U -#define TNPP 0x20000000U -#define TFTP 0x10000000U -#define TCAP 0x08000000U -#define TCIP 0x04000000U -#define RCAP 0x02000000U -#define PLUP 0x00800000U -#define PLDN 0x00400000U -#define OTDD 0x00200000U -#define GTRP 0x00100000U -#define RDPE 0x00040000U -#define TDCE 0x00020000U -#define TDUE 0x00010000U - -#define MC_INT_CAUSE 0x7518 -#define ECC_UE_INT_CAUSE 0x00000004U -#define ECC_CE_INT_CAUSE 0x00000002U -#define PERR_INT_CAUSE 0x00000001U - -#define MC_ECC_STATUS 0x751c -#define ECC_CECNT_MASK 0xffff0000U -#define ECC_CECNT_SHIFT 16 -#define ECC_CECNT(x) ((x) << ECC_CECNT_SHIFT) -#define ECC_CECNT_GET(x) (((x) & ECC_CECNT_MASK) >> ECC_CECNT_SHIFT) -#define ECC_UECNT_MASK 0x0000ffffU -#define ECC_UECNT_SHIFT 0 -#define ECC_UECNT(x) ((x) << ECC_UECNT_SHIFT) -#define ECC_UECNT_GET(x) (((x) & ECC_UECNT_MASK) >> ECC_UECNT_SHIFT) - -#define MC_BIST_CMD 0x7600 -#define START_BIST 0x80000000U -#define BIST_CMD_GAP_MASK 0x0000ff00U -#define BIST_CMD_GAP_SHIFT 8 -#define BIST_CMD_GAP(x) ((x) << BIST_CMD_GAP_SHIFT) -#define BIST_OPCODE_MASK 0x00000003U -#define BIST_OPCODE_SHIFT 0 -#define BIST_OPCODE(x) ((x) << BIST_OPCODE_SHIFT) - -#define MC_BIST_CMD_ADDR 0x7604 -#define MC_BIST_CMD_LEN 0x7608 -#define MC_BIST_DATA_PATTERN 0x760c -#define BIST_DATA_TYPE_MASK 0x0000000fU -#define BIST_DATA_TYPE_SHIFT 0 -#define BIST_DATA_TYPE(x) ((x) << BIST_DATA_TYPE_SHIFT) - -#define MC_BIST_STATUS_RDATA 0x7688 - -#define MA_EXT_MEMORY_BAR 0x77c8 -#define EXT_MEM_SIZE_MASK 0x00000fffU -#define EXT_MEM_SIZE_SHIFT 0 -#define EXT_MEM_SIZE_GET(x) (((x) & EXT_MEM_SIZE_MASK) >> EXT_MEM_SIZE_SHIFT) - -#define MA_TARGET_MEM_ENABLE 0x77d8 -#define EXT_MEM_ENABLE 0x00000004U -#define EDRAM1_ENABLE 0x00000002U -#define EDRAM0_ENABLE 0x00000001U - -#define MA_INT_CAUSE 0x77e0 -#define MEM_PERR_INT_CAUSE 0x00000002U -#define MEM_WRAP_INT_CAUSE 0x00000001U - -#define MA_INT_WRAP_STATUS 0x77e4 -#define MEM_WRAP_ADDRESS_MASK 0xfffffff0U -#define MEM_WRAP_ADDRESS_SHIFT 4 -#define MEM_WRAP_ADDRESS_GET(x) (((x) & MEM_WRAP_ADDRESS_MASK) >> MEM_WRAP_ADDRESS_SHIFT) -#define MEM_WRAP_CLIENT_NUM_MASK 0x0000000fU -#define MEM_WRAP_CLIENT_NUM_SHIFT 0 -#define MEM_WRAP_CLIENT_NUM_GET(x) (((x) & MEM_WRAP_CLIENT_NUM_MASK) >> MEM_WRAP_CLIENT_NUM_SHIFT) - -#define MA_PARITY_ERROR_STATUS 0x77f4 - -#define EDC_0_BASE_ADDR 0x7900 - -#define EDC_BIST_CMD 0x7904 -#define EDC_BIST_CMD_ADDR 0x7908 -#define EDC_BIST_CMD_LEN 0x790c -#define EDC_BIST_DATA_PATTERN 0x7910 -#define EDC_BIST_STATUS_RDATA 0x7928 -#define EDC_INT_CAUSE 0x7978 -#define ECC_UE_PAR 0x00000020U -#define ECC_CE_PAR 0x00000010U -#define PERR_PAR_CAUSE 0x00000008U - -#define EDC_ECC_STATUS 0x797c - -#define EDC_1_BASE_ADDR 0x7980 - -#define CIM_PF_MAILBOX_DATA 0x240 -#define CIM_PF_MAILBOX_CTRL 0x280 -#define MBMSGVALID 0x00000008U -#define MBINTREQ 0x00000004U -#define MBOWNER_MASK 0x00000003U -#define MBOWNER_SHIFT 0 -#define MBOWNER(x) ((x) << MBOWNER_SHIFT) -#define MBOWNER_GET(x) (((x) & MBOWNER_MASK) >> MBOWNER_SHIFT) - -#define CIM_PF_HOST_INT_CAUSE 0x28c -#define MBMSGRDYINT 0x00080000U - -#define CIM_HOST_INT_CAUSE 0x7b2c -#define TIEQOUTPARERRINT 0x00100000U -#define TIEQINPARERRINT 0x00080000U -#define MBHOSTPARERR 0x00040000U -#define MBUPPARERR 0x00020000U -#define IBQPARERR 0x0001f800U -#define IBQTP0PARERR 0x00010000U -#define IBQTP1PARERR 0x00008000U -#define IBQULPPARERR 0x00004000U -#define IBQSGELOPARERR 0x00002000U -#define IBQSGEHIPARERR 0x00001000U -#define IBQNCSIPARERR 0x00000800U -#define OBQPARERR 0x000007e0U -#define OBQULP0PARERR 0x00000400U -#define OBQULP1PARERR 0x00000200U -#define OBQULP2PARERR 0x00000100U -#define OBQULP3PARERR 0x00000080U -#define OBQSGEPARERR 0x00000040U -#define OBQNCSIPARERR 0x00000020U -#define PREFDROPINT 0x00000002U -#define UPACCNONZERO 0x00000001U - -#define CIM_HOST_UPACC_INT_CAUSE 0x7b34 -#define EEPROMWRINT 0x40000000U -#define TIMEOUTMAINT 0x20000000U -#define TIMEOUTINT 0x10000000U -#define RSPOVRLOOKUPINT 0x08000000U -#define REQOVRLOOKUPINT 0x04000000U -#define BLKWRPLINT 0x02000000U -#define BLKRDPLINT 0x01000000U -#define SGLWRPLINT 0x00800000U -#define SGLRDPLINT 0x00400000U -#define BLKWRCTLINT 0x00200000U -#define BLKRDCTLINT 0x00100000U -#define SGLWRCTLINT 0x00080000U -#define SGLRDCTLINT 0x00040000U -#define BLKWREEPROMINT 0x00020000U -#define BLKRDEEPROMINT 0x00010000U -#define SGLWREEPROMINT 0x00008000U -#define SGLRDEEPROMINT 0x00004000U -#define BLKWRFLASHINT 0x00002000U -#define BLKRDFLASHINT 0x00001000U -#define SGLWRFLASHINT 0x00000800U -#define SGLRDFLASHINT 0x00000400U -#define BLKWRBOOTINT 0x00000200U -#define BLKRDBOOTINT 0x00000100U -#define SGLWRBOOTINT 0x00000080U -#define SGLRDBOOTINT 0x00000040U -#define ILLWRBEINT 0x00000020U -#define ILLRDBEINT 0x00000010U -#define ILLRDINT 0x00000008U -#define ILLWRINT 0x00000004U -#define ILLTRANSINT 0x00000002U -#define RSVDSPACEINT 0x00000001U - -#define TP_OUT_CONFIG 0x7d04 -#define VLANEXTENABLE_MASK 0x0000f000U -#define VLANEXTENABLE_SHIFT 12 - -#define TP_PARA_REG2 0x7d68 -#define MAXRXDATA_MASK 0xffff0000U -#define MAXRXDATA_SHIFT 16 -#define MAXRXDATA_GET(x) (((x) & MAXRXDATA_MASK) >> MAXRXDATA_SHIFT) - -#define TP_TIMER_RESOLUTION 0x7d90 -#define TIMERRESOLUTION_MASK 0x00ff0000U -#define TIMERRESOLUTION_SHIFT 16 -#define TIMERRESOLUTION_GET(x) (((x) & TIMERRESOLUTION_MASK) >> TIMERRESOLUTION_SHIFT) - -#define TP_SHIFT_CNT 0x7dc0 - -#define TP_CCTRL_TABLE 0x7ddc -#define TP_MTU_TABLE 0x7de4 -#define MTUINDEX_MASK 0xff000000U -#define MTUINDEX_SHIFT 24 -#define MTUINDEX(x) ((x) << MTUINDEX_SHIFT) -#define MTUWIDTH_MASK 0x000f0000U -#define MTUWIDTH_SHIFT 16 -#define MTUWIDTH(x) ((x) << MTUWIDTH_SHIFT) -#define MTUWIDTH_GET(x) (((x) & MTUWIDTH_MASK) >> MTUWIDTH_SHIFT) -#define MTUVALUE_MASK 0x00003fffU -#define MTUVALUE_SHIFT 0 -#define MTUVALUE(x) ((x) << MTUVALUE_SHIFT) -#define MTUVALUE_GET(x) (((x) & MTUVALUE_MASK) >> MTUVALUE_SHIFT) - -#define TP_RSS_LKP_TABLE 0x7dec -#define LKPTBLROWVLD 0x80000000U -#define LKPTBLQUEUE1_MASK 0x000ffc00U -#define LKPTBLQUEUE1_SHIFT 10 -#define LKPTBLQUEUE1(x) ((x) << LKPTBLQUEUE1_SHIFT) -#define LKPTBLQUEUE1_GET(x) (((x) & LKPTBLQUEUE1_MASK) >> LKPTBLQUEUE1_SHIFT) -#define LKPTBLQUEUE0_MASK 0x000003ffU -#define LKPTBLQUEUE0_SHIFT 0 -#define LKPTBLQUEUE0(x) ((x) << LKPTBLQUEUE0_SHIFT) -#define LKPTBLQUEUE0_GET(x) (((x) & LKPTBLQUEUE0_MASK) >> LKPTBLQUEUE0_SHIFT) - -#define TP_PIO_ADDR 0x7e40 -#define TP_PIO_DATA 0x7e44 -#define TP_MIB_INDEX 0x7e50 -#define TP_MIB_DATA 0x7e54 -#define TP_INT_CAUSE 0x7e74 -#define FLMTXFLSTEMPTY 0x40000000U - -#define TP_INGRESS_CONFIG 0x141 -#define VNIC 0x00000800U -#define CSUM_HAS_PSEUDO_HDR 0x00000400U -#define RM_OVLAN 0x00000200U -#define LOOKUPEVERYPKT 0x00000100U - -#define TP_MIB_MAC_IN_ERR_0 0x0 -#define TP_MIB_TCP_OUT_RST 0xc -#define TP_MIB_TCP_IN_SEG_HI 0x10 -#define TP_MIB_TCP_IN_SEG_LO 0x11 -#define TP_MIB_TCP_OUT_SEG_HI 0x12 -#define TP_MIB_TCP_OUT_SEG_LO 0x13 -#define TP_MIB_TCP_RXT_SEG_HI 0x14 -#define TP_MIB_TCP_RXT_SEG_LO 0x15 -#define TP_MIB_TNL_CNG_DROP_0 0x18 -#define TP_MIB_TCP_V6IN_ERR_0 0x28 -#define TP_MIB_TCP_V6OUT_RST 0x2c -#define TP_MIB_OFD_ARP_DROP 0x36 -#define TP_MIB_TNL_DROP_0 0x44 -#define TP_MIB_OFD_VLN_DROP_0 0x58 - -#define ULP_TX_INT_CAUSE 0x8dcc -#define PBL_BOUND_ERR_CH3 0x80000000U -#define PBL_BOUND_ERR_CH2 0x40000000U -#define PBL_BOUND_ERR_CH1 0x20000000U -#define PBL_BOUND_ERR_CH0 0x10000000U - -#define PM_RX_INT_CAUSE 0x8fdc -#define ZERO_E_CMD_ERROR 0x00400000U -#define PMRX_FRAMING_ERROR 0x003ffff0U -#define OCSPI_PAR_ERROR 0x00000008U -#define DB_OPTIONS_PAR_ERROR 0x00000004U -#define IESPI_PAR_ERROR 0x00000002U -#define E_PCMD_PAR_ERROR 0x00000001U - -#define PM_TX_INT_CAUSE 0x8ffc -#define PCMD_LEN_OVFL0 0x80000000U -#define PCMD_LEN_OVFL1 0x40000000U -#define PCMD_LEN_OVFL2 0x20000000U -#define ZERO_C_CMD_ERROR 0x10000000U -#define PMTX_FRAMING_ERROR 0x0ffffff0U -#define OESPI_PAR_ERROR 0x00000008U -#define ICSPI_PAR_ERROR 0x00000002U -#define C_PCMD_PAR_ERROR 0x00000001U - -#define MPS_PORT_STAT_TX_PORT_BYTES_L 0x400 -#define MPS_PORT_STAT_TX_PORT_BYTES_H 0x404 -#define MPS_PORT_STAT_TX_PORT_FRAMES_L 0x408 -#define MPS_PORT_STAT_TX_PORT_FRAMES_H 0x40c -#define MPS_PORT_STAT_TX_PORT_BCAST_L 0x410 -#define MPS_PORT_STAT_TX_PORT_BCAST_H 0x414 -#define MPS_PORT_STAT_TX_PORT_MCAST_L 0x418 -#define MPS_PORT_STAT_TX_PORT_MCAST_H 0x41c -#define MPS_PORT_STAT_TX_PORT_UCAST_L 0x420 -#define MPS_PORT_STAT_TX_PORT_UCAST_H 0x424 -#define MPS_PORT_STAT_TX_PORT_ERROR_L 0x428 -#define MPS_PORT_STAT_TX_PORT_ERROR_H 0x42c -#define MPS_PORT_STAT_TX_PORT_64B_L 0x430 -#define MPS_PORT_STAT_TX_PORT_64B_H 0x434 -#define MPS_PORT_STAT_TX_PORT_65B_127B_L 0x438 -#define MPS_PORT_STAT_TX_PORT_65B_127B_H 0x43c -#define MPS_PORT_STAT_TX_PORT_128B_255B_L 0x440 -#define MPS_PORT_STAT_TX_PORT_128B_255B_H 0x444 -#define MPS_PORT_STAT_TX_PORT_256B_511B_L 0x448 -#define MPS_PORT_STAT_TX_PORT_256B_511B_H 0x44c -#define MPS_PORT_STAT_TX_PORT_512B_1023B_L 0x450 -#define MPS_PORT_STAT_TX_PORT_512B_1023B_H 0x454 -#define MPS_PORT_STAT_TX_PORT_1024B_1518B_L 0x458 -#define MPS_PORT_STAT_TX_PORT_1024B_1518B_H 0x45c -#define MPS_PORT_STAT_TX_PORT_1519B_MAX_L 0x460 -#define MPS_PORT_STAT_TX_PORT_1519B_MAX_H 0x464 -#define MPS_PORT_STAT_TX_PORT_DROP_L 0x468 -#define MPS_PORT_STAT_TX_PORT_DROP_H 0x46c -#define MPS_PORT_STAT_TX_PORT_PAUSE_L 0x470 -#define MPS_PORT_STAT_TX_PORT_PAUSE_H 0x474 -#define MPS_PORT_STAT_TX_PORT_PPP0_L 0x478 -#define MPS_PORT_STAT_TX_PORT_PPP0_H 0x47c -#define MPS_PORT_STAT_TX_PORT_PPP1_L 0x480 -#define MPS_PORT_STAT_TX_PORT_PPP1_H 0x484 -#define MPS_PORT_STAT_TX_PORT_PPP2_L 0x488 -#define MPS_PORT_STAT_TX_PORT_PPP2_H 0x48c -#define MPS_PORT_STAT_TX_PORT_PPP3_L 0x490 -#define MPS_PORT_STAT_TX_PORT_PPP3_H 0x494 -#define MPS_PORT_STAT_TX_PORT_PPP4_L 0x498 -#define MPS_PORT_STAT_TX_PORT_PPP4_H 0x49c -#define MPS_PORT_STAT_TX_PORT_PPP5_L 0x4a0 -#define MPS_PORT_STAT_TX_PORT_PPP5_H 0x4a4 -#define MPS_PORT_STAT_TX_PORT_PPP6_L 0x4a8 -#define MPS_PORT_STAT_TX_PORT_PPP6_H 0x4ac -#define MPS_PORT_STAT_TX_PORT_PPP7_L 0x4b0 -#define MPS_PORT_STAT_TX_PORT_PPP7_H 0x4b4 -#define MPS_PORT_STAT_LB_PORT_BYTES_L 0x4c0 -#define MPS_PORT_STAT_LB_PORT_BYTES_H 0x4c4 -#define MPS_PORT_STAT_LB_PORT_FRAMES_L 0x4c8 -#define MPS_PORT_STAT_LB_PORT_FRAMES_H 0x4cc -#define MPS_PORT_STAT_LB_PORT_BCAST_L 0x4d0 -#define MPS_PORT_STAT_LB_PORT_BCAST_H 0x4d4 -#define MPS_PORT_STAT_LB_PORT_MCAST_L 0x4d8 -#define MPS_PORT_STAT_LB_PORT_MCAST_H 0x4dc -#define MPS_PORT_STAT_LB_PORT_UCAST_L 0x4e0 -#define MPS_PORT_STAT_LB_PORT_UCAST_H 0x4e4 -#define MPS_PORT_STAT_LB_PORT_ERROR_L 0x4e8 -#define MPS_PORT_STAT_LB_PORT_ERROR_H 0x4ec -#define MPS_PORT_STAT_LB_PORT_64B_L 0x4f0 -#define MPS_PORT_STAT_LB_PORT_64B_H 0x4f4 -#define MPS_PORT_STAT_LB_PORT_65B_127B_L 0x4f8 -#define MPS_PORT_STAT_LB_PORT_65B_127B_H 0x4fc -#define MPS_PORT_STAT_LB_PORT_128B_255B_L 0x500 -#define MPS_PORT_STAT_LB_PORT_128B_255B_H 0x504 -#define MPS_PORT_STAT_LB_PORT_256B_511B_L 0x508 -#define MPS_PORT_STAT_LB_PORT_256B_511B_H 0x50c -#define MPS_PORT_STAT_LB_PORT_512B_1023B_L 0x510 -#define MPS_PORT_STAT_LB_PORT_512B_1023B_H 0x514 -#define MPS_PORT_STAT_LB_PORT_1024B_1518B_L 0x518 -#define MPS_PORT_STAT_LB_PORT_1024B_1518B_H 0x51c -#define MPS_PORT_STAT_LB_PORT_1519B_MAX_L 0x520 -#define MPS_PORT_STAT_LB_PORT_1519B_MAX_H 0x524 -#define MPS_PORT_STAT_LB_PORT_DROP_FRAMES 0x528 -#define MPS_PORT_STAT_RX_PORT_BYTES_L 0x540 -#define MPS_PORT_STAT_RX_PORT_BYTES_H 0x544 -#define MPS_PORT_STAT_RX_PORT_FRAMES_L 0x548 -#define MPS_PORT_STAT_RX_PORT_FRAMES_H 0x54c -#define MPS_PORT_STAT_RX_PORT_BCAST_L 0x550 -#define MPS_PORT_STAT_RX_PORT_BCAST_H 0x554 -#define MPS_PORT_STAT_RX_PORT_MCAST_L 0x558 -#define MPS_PORT_STAT_RX_PORT_MCAST_H 0x55c -#define MPS_PORT_STAT_RX_PORT_UCAST_L 0x560 -#define MPS_PORT_STAT_RX_PORT_UCAST_H 0x564 -#define MPS_PORT_STAT_RX_PORT_MTU_ERROR_L 0x568 -#define MPS_PORT_STAT_RX_PORT_MTU_ERROR_H 0x56c -#define MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_L 0x570 -#define MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_H 0x574 -#define MPS_PORT_STAT_RX_PORT_CRC_ERROR_L 0x578 -#define MPS_PORT_STAT_RX_PORT_CRC_ERROR_H 0x57c -#define MPS_PORT_STAT_RX_PORT_LEN_ERROR_L 0x580 -#define MPS_PORT_STAT_RX_PORT_LEN_ERROR_H 0x584 -#define MPS_PORT_STAT_RX_PORT_SYM_ERROR_L 0x588 -#define MPS_PORT_STAT_RX_PORT_SYM_ERROR_H 0x58c -#define MPS_PORT_STAT_RX_PORT_64B_L 0x590 -#define MPS_PORT_STAT_RX_PORT_64B_H 0x594 -#define MPS_PORT_STAT_RX_PORT_65B_127B_L 0x598 -#define MPS_PORT_STAT_RX_PORT_65B_127B_H 0x59c -#define MPS_PORT_STAT_RX_PORT_128B_255B_L 0x5a0 -#define MPS_PORT_STAT_RX_PORT_128B_255B_H 0x5a4 -#define MPS_PORT_STAT_RX_PORT_256B_511B_L 0x5a8 -#define MPS_PORT_STAT_RX_PORT_256B_511B_H 0x5ac -#define MPS_PORT_STAT_RX_PORT_512B_1023B_L 0x5b0 -#define MPS_PORT_STAT_RX_PORT_512B_1023B_H 0x5b4 -#define MPS_PORT_STAT_RX_PORT_1024B_1518B_L 0x5b8 -#define MPS_PORT_STAT_RX_PORT_1024B_1518B_H 0x5bc -#define MPS_PORT_STAT_RX_PORT_1519B_MAX_L 0x5c0 -#define MPS_PORT_STAT_RX_PORT_1519B_MAX_H 0x5c4 -#define MPS_PORT_STAT_RX_PORT_PAUSE_L 0x5c8 -#define MPS_PORT_STAT_RX_PORT_PAUSE_H 0x5cc -#define MPS_PORT_STAT_RX_PORT_PPP0_L 0x5d0 -#define MPS_PORT_STAT_RX_PORT_PPP0_H 0x5d4 -#define MPS_PORT_STAT_RX_PORT_PPP1_L 0x5d8 -#define MPS_PORT_STAT_RX_PORT_PPP1_H 0x5dc -#define MPS_PORT_STAT_RX_PORT_PPP2_L 0x5e0 -#define MPS_PORT_STAT_RX_PORT_PPP2_H 0x5e4 -#define MPS_PORT_STAT_RX_PORT_PPP3_L 0x5e8 -#define MPS_PORT_STAT_RX_PORT_PPP3_H 0x5ec -#define MPS_PORT_STAT_RX_PORT_PPP4_L 0x5f0 -#define MPS_PORT_STAT_RX_PORT_PPP4_H 0x5f4 -#define MPS_PORT_STAT_RX_PORT_PPP5_L 0x5f8 -#define MPS_PORT_STAT_RX_PORT_PPP5_H 0x5fc -#define MPS_PORT_STAT_RX_PORT_PPP6_L 0x600 -#define MPS_PORT_STAT_RX_PORT_PPP6_H 0x604 -#define MPS_PORT_STAT_RX_PORT_PPP7_L 0x608 -#define MPS_PORT_STAT_RX_PORT_PPP7_H 0x60c -#define MPS_PORT_STAT_RX_PORT_LESS_64B_L 0x610 -#define MPS_PORT_STAT_RX_PORT_LESS_64B_H 0x614 -#define MPS_CMN_CTL 0x9000 -#define NUMPORTS_MASK 0x00000003U -#define NUMPORTS_SHIFT 0 -#define NUMPORTS_GET(x) (((x) & NUMPORTS_MASK) >> NUMPORTS_SHIFT) - -#define MPS_INT_CAUSE 0x9008 -#define STATINT 0x00000020U -#define TXINT 0x00000010U -#define RXINT 0x00000008U -#define TRCINT 0x00000004U -#define CLSINT 0x00000002U -#define PLINT 0x00000001U - -#define MPS_TX_INT_CAUSE 0x9408 -#define PORTERR 0x00010000U -#define FRMERR 0x00008000U -#define SECNTERR 0x00004000U -#define BUBBLE 0x00002000U -#define TXDESCFIFO 0x00001e00U -#define TXDATAFIFO 0x000001e0U -#define NCSIFIFO 0x00000010U -#define TPFIFO 0x0000000fU - -#define MPS_STAT_PERR_INT_CAUSE_SRAM 0x9614 -#define MPS_STAT_PERR_INT_CAUSE_TX_FIFO 0x9620 -#define MPS_STAT_PERR_INT_CAUSE_RX_FIFO 0x962c - -#define MPS_STAT_RX_BG_0_MAC_DROP_FRAME_L 0x9640 -#define MPS_STAT_RX_BG_0_MAC_DROP_FRAME_H 0x9644 -#define MPS_STAT_RX_BG_1_MAC_DROP_FRAME_L 0x9648 -#define MPS_STAT_RX_BG_1_MAC_DROP_FRAME_H 0x964c -#define MPS_STAT_RX_BG_2_MAC_DROP_FRAME_L 0x9650 -#define MPS_STAT_RX_BG_2_MAC_DROP_FRAME_H 0x9654 -#define MPS_STAT_RX_BG_3_MAC_DROP_FRAME_L 0x9658 -#define MPS_STAT_RX_BG_3_MAC_DROP_FRAME_H 0x965c -#define MPS_STAT_RX_BG_0_LB_DROP_FRAME_L 0x9660 -#define MPS_STAT_RX_BG_0_LB_DROP_FRAME_H 0x9664 -#define MPS_STAT_RX_BG_1_LB_DROP_FRAME_L 0x9668 -#define MPS_STAT_RX_BG_1_LB_DROP_FRAME_H 0x966c -#define MPS_STAT_RX_BG_2_LB_DROP_FRAME_L 0x9670 -#define MPS_STAT_RX_BG_2_LB_DROP_FRAME_H 0x9674 -#define MPS_STAT_RX_BG_3_LB_DROP_FRAME_L 0x9678 -#define MPS_STAT_RX_BG_3_LB_DROP_FRAME_H 0x967c -#define MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_L 0x9680 -#define MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_H 0x9684 -#define MPS_STAT_RX_BG_1_MAC_TRUNC_FRAME_L 0x9688 -#define MPS_STAT_RX_BG_1_MAC_TRUNC_FRAME_H 0x968c -#define MPS_STAT_RX_BG_2_MAC_TRUNC_FRAME_L 0x9690 -#define MPS_STAT_RX_BG_2_MAC_TRUNC_FRAME_H 0x9694 -#define MPS_STAT_RX_BG_3_MAC_TRUNC_FRAME_L 0x9698 -#define MPS_STAT_RX_BG_3_MAC_TRUNC_FRAME_H 0x969c -#define MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_L 0x96a0 -#define MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_H 0x96a4 -#define MPS_STAT_RX_BG_1_LB_TRUNC_FRAME_L 0x96a8 -#define MPS_STAT_RX_BG_1_LB_TRUNC_FRAME_H 0x96ac -#define MPS_STAT_RX_BG_2_LB_TRUNC_FRAME_L 0x96b0 -#define MPS_STAT_RX_BG_2_LB_TRUNC_FRAME_H 0x96b4 -#define MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_L 0x96b8 -#define MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_H 0x96bc -#define MPS_TRC_CFG 0x9800 -#define TRCFIFOEMPTY 0x00000010U -#define TRCIGNOREDROPINPUT 0x00000008U -#define TRCKEEPDUPLICATES 0x00000004U -#define TRCEN 0x00000002U -#define TRCMULTIFILTER 0x00000001U - -#define MPS_TRC_RSS_CONTROL 0x9808 -#define RSSCONTROL_MASK 0x00ff0000U -#define RSSCONTROL_SHIFT 16 -#define RSSCONTROL(x) ((x) << RSSCONTROL_SHIFT) -#define QUEUENUMBER_MASK 0x0000ffffU -#define QUEUENUMBER_SHIFT 0 -#define QUEUENUMBER(x) ((x) << QUEUENUMBER_SHIFT) - -#define MPS_TRC_FILTER_MATCH_CTL_A 0x9810 -#define TFINVERTMATCH 0x01000000U -#define TFPKTTOOLARGE 0x00800000U -#define TFEN 0x00400000U -#define TFPORT_MASK 0x003c0000U -#define TFPORT_SHIFT 18 -#define TFPORT(x) ((x) << TFPORT_SHIFT) -#define TFPORT_GET(x) (((x) & TFPORT_MASK) >> TFPORT_SHIFT) -#define TFDROP 0x00020000U -#define TFSOPEOPERR 0x00010000U -#define TFLENGTH_MASK 0x00001f00U -#define TFLENGTH_SHIFT 8 -#define TFLENGTH(x) ((x) << TFLENGTH_SHIFT) -#define TFLENGTH_GET(x) (((x) & TFLENGTH_MASK) >> TFLENGTH_SHIFT) -#define TFOFFSET_MASK 0x0000001fU -#define TFOFFSET_SHIFT 0 -#define TFOFFSET(x) ((x) << TFOFFSET_SHIFT) -#define TFOFFSET_GET(x) (((x) & TFOFFSET_MASK) >> TFOFFSET_SHIFT) - -#define MPS_TRC_FILTER_MATCH_CTL_B 0x9820 -#define TFMINPKTSIZE_MASK 0x01ff0000U -#define TFMINPKTSIZE_SHIFT 16 -#define TFMINPKTSIZE(x) ((x) << TFMINPKTSIZE_SHIFT) -#define TFMINPKTSIZE_GET(x) (((x) & TFMINPKTSIZE_MASK) >> TFMINPKTSIZE_SHIFT) -#define TFCAPTUREMAX_MASK 0x00003fffU -#define TFCAPTUREMAX_SHIFT 0 -#define TFCAPTUREMAX(x) ((x) << TFCAPTUREMAX_SHIFT) -#define TFCAPTUREMAX_GET(x) (((x) & TFCAPTUREMAX_MASK) >> TFCAPTUREMAX_SHIFT) - -#define MPS_TRC_INT_CAUSE 0x985c -#define MISCPERR 0x00000100U -#define PKTFIFO 0x000000f0U -#define FILTMEM 0x0000000fU - -#define MPS_TRC_FILTER0_MATCH 0x9c00 -#define MPS_TRC_FILTER0_DONT_CARE 0x9c80 -#define MPS_TRC_FILTER1_MATCH 0x9d00 -#define MPS_CLS_INT_CAUSE 0xd028 -#define PLERRENB 0x00000008U -#define HASHSRAM 0x00000004U -#define MATCHTCAM 0x00000002U -#define MATCHSRAM 0x00000001U - -#define MPS_RX_PERR_INT_CAUSE 0x11074 - -#define CPL_INTR_CAUSE 0x19054 -#define CIM_OP_MAP_PERR 0x00000020U -#define CIM_OVFL_ERROR 0x00000010U -#define TP_FRAMING_ERROR 0x00000008U -#define SGE_FRAMING_ERROR 0x00000004U -#define CIM_FRAMING_ERROR 0x00000002U -#define ZERO_SWITCH_ERROR 0x00000001U - -#define SMB_INT_CAUSE 0x19090 -#define MSTTXFIFOPARINT 0x00200000U -#define MSTRXFIFOPARINT 0x00100000U -#define SLVFIFOPARINT 0x00080000U - -#define ULP_RX_INT_CAUSE 0x19158 -#define ULP_RX_ISCSI_TAGMASK 0x19164 -#define ULP_RX_ISCSI_PSZ 0x19168 -#define HPZ3_MASK 0x0f000000U -#define HPZ3_SHIFT 24 -#define HPZ3(x) ((x) << HPZ3_SHIFT) -#define HPZ2_MASK 0x000f0000U -#define HPZ2_SHIFT 16 -#define HPZ2(x) ((x) << HPZ2_SHIFT) -#define HPZ1_MASK 0x00000f00U -#define HPZ1_SHIFT 8 -#define HPZ1(x) ((x) << HPZ1_SHIFT) -#define HPZ0_MASK 0x0000000fU -#define HPZ0_SHIFT 0 -#define HPZ0(x) ((x) << HPZ0_SHIFT) - -#define ULP_RX_TDDP_PSZ 0x19178 - -#define SF_DATA 0x193f8 -#define SF_OP 0x193fc -#define BUSY 0x80000000U -#define SF_LOCK 0x00000010U -#define SF_CONT 0x00000008U -#define BYTECNT_MASK 0x00000006U -#define BYTECNT_SHIFT 1 -#define BYTECNT(x) ((x) << BYTECNT_SHIFT) -#define OP_WR 0x00000001U - -#define PL_PF_INT_CAUSE 0x3c0 -#define PFSW 0x00000008U -#define PFSGE 0x00000004U -#define PFCIM 0x00000002U -#define PFMPS 0x00000001U - -#define PL_PF_INT_ENABLE 0x3c4 -#define PL_PF_CTL 0x3c8 -#define SWINT 0x00000001U - -#define PL_WHOAMI 0x19400 -#define SOURCEPF_MASK 0x00000700U -#define SOURCEPF_SHIFT 8 -#define SOURCEPF(x) ((x) << SOURCEPF_SHIFT) -#define SOURCEPF_GET(x) (((x) & SOURCEPF_MASK) >> SOURCEPF_SHIFT) -#define ISVF 0x00000080U -#define VFID_MASK 0x0000007fU -#define VFID_SHIFT 0 -#define VFID(x) ((x) << VFID_SHIFT) -#define VFID_GET(x) (((x) & VFID_MASK) >> VFID_SHIFT) - -#define PL_INT_CAUSE 0x1940c -#define ULP_TX 0x08000000U -#define SGE 0x04000000U -#define HMA 0x02000000U -#define CPL_SWITCH 0x01000000U -#define ULP_RX 0x00800000U -#define PM_RX 0x00400000U -#define PM_TX 0x00200000U -#define MA 0x00100000U -#define TP 0x00080000U -#define LE 0x00040000U -#define EDC1 0x00020000U -#define EDC0 0x00010000U -#define MC 0x00008000U -#define PCIE 0x00004000U -#define PMU 0x00002000U -#define XGMAC_KR1 0x00001000U -#define XGMAC_KR0 0x00000800U -#define XGMAC1 0x00000400U -#define XGMAC0 0x00000200U -#define SMB 0x00000100U -#define SF 0x00000080U -#define PL 0x00000040U -#define NCSI 0x00000020U -#define MPS 0x00000010U -#define MI 0x00000008U -#define DBG 0x00000004U -#define I2CM 0x00000002U -#define CIM 0x00000001U - -#define PL_INT_MAP0 0x19414 -#define PL_RST 0x19428 -#define PIORST 0x00000002U -#define PIORSTMODE 0x00000001U - -#define PL_PL_INT_CAUSE 0x19430 -#define FATALPERR 0x00000010U -#define PERRVFID 0x00000001U - -#define PL_REV 0x1943c - -#define LE_DB_CONFIG 0x19c04 -#define HASHEN 0x00100000U - -#define LE_DB_SERVER_INDEX 0x19c18 -#define LE_DB_ACT_CNT_IPV4 0x19c20 -#define LE_DB_ACT_CNT_IPV6 0x19c24 - -#define LE_DB_INT_CAUSE 0x19c3c -#define REQQPARERR 0x00010000U -#define UNKNOWNCMD 0x00008000U -#define PARITYERR 0x00000040U -#define LIPMISS 0x00000020U -#define LIP0 0x00000010U - -#define LE_DB_TID_HASHBASE 0x19df8 - -#define NCSI_INT_CAUSE 0x1a0d8 -#define CIM_DM_PRTY_ERR 0x00000100U -#define MPS_DM_PRTY_ERR 0x00000080U -#define TXFIFO_PRTY_ERR 0x00000002U -#define RXFIFO_PRTY_ERR 0x00000001U - -#define XGMAC_PORT_CFG2 0x1018 -#define PATEN 0x00040000U -#define MAGICEN 0x00020000U - -#define XGMAC_PORT_MAGIC_MACID_LO 0x1024 -#define XGMAC_PORT_MAGIC_MACID_HI 0x1028 - -#define XGMAC_PORT_EPIO_DATA0 0x10c0 -#define XGMAC_PORT_EPIO_DATA1 0x10c4 -#define XGMAC_PORT_EPIO_DATA2 0x10c8 -#define XGMAC_PORT_EPIO_DATA3 0x10cc -#define XGMAC_PORT_EPIO_OP 0x10d0 -#define EPIOWR 0x00000100U -#define ADDRESS_MASK 0x000000ffU -#define ADDRESS_SHIFT 0 -#define ADDRESS(x) ((x) << ADDRESS_SHIFT) - -#define XGMAC_PORT_INT_CAUSE 0x10dc -#endif /* __T4_REGS_H */ diff --git a/trunk/drivers/net/cxgb4/t4fw_api.h b/trunk/drivers/net/cxgb4/t4fw_api.h deleted file mode 100644 index 3393d05a388a..000000000000 --- a/trunk/drivers/net/cxgb4/t4fw_api.h +++ /dev/null @@ -1,1580 +0,0 @@ -/* - * This file is part of the Chelsio T4 Ethernet driver for Linux. - * - * Copyright (c) 2009-2010 Chelsio Communications, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef _T4FW_INTERFACE_H_ -#define _T4FW_INTERFACE_H_ - -#define FW_T4VF_SGE_BASE_ADDR 0x0000 -#define FW_T4VF_MPS_BASE_ADDR 0x0100 -#define FW_T4VF_PL_BASE_ADDR 0x0200 -#define FW_T4VF_MBDATA_BASE_ADDR 0x0240 -#define FW_T4VF_CIM_BASE_ADDR 0x0300 - -enum fw_wr_opcodes { - FW_FILTER_WR = 0x02, - FW_ULPTX_WR = 0x04, - FW_TP_WR = 0x05, - FW_ETH_TX_PKT_WR = 0x08, - FW_FLOWC_WR = 0x0a, - FW_OFLD_TX_DATA_WR = 0x0b, - FW_CMD_WR = 0x10, - FW_ETH_TX_PKT_VM_WR = 0x11, - FW_RI_RES_WR = 0x0c, - FW_RI_INIT_WR = 0x0d, - FW_RI_RDMA_WRITE_WR = 0x14, - FW_RI_SEND_WR = 0x15, - FW_RI_RDMA_READ_WR = 0x16, - FW_RI_RECV_WR = 0x17, - FW_RI_BIND_MW_WR = 0x18, - FW_RI_FR_NSMR_WR = 0x19, - FW_RI_INV_LSTAG_WR = 0x1a, - FW_LASTC2E_WR = 0x40 -}; - -struct fw_wr_hdr { - __be32 hi; - __be32 lo; -}; - -#define FW_WR_OP(x) ((x) << 24) -#define FW_WR_ATOMIC(x) ((x) << 23) -#define FW_WR_FLUSH(x) ((x) << 22) -#define FW_WR_COMPL(x) ((x) << 21) -#define FW_WR_IMMDLEN(x) ((x) << 0) - -#define FW_WR_EQUIQ (1U << 31) -#define FW_WR_EQUEQ (1U << 30) -#define FW_WR_FLOWID(x) ((x) << 8) -#define FW_WR_LEN16(x) ((x) << 0) - -struct fw_ulptx_wr { - __be32 op_to_compl; - __be32 flowid_len16; - u64 cookie; -}; - -struct fw_tp_wr { - __be32 op_to_immdlen; - __be32 flowid_len16; - u64 cookie; -}; - -struct fw_eth_tx_pkt_wr { - __be32 op_immdlen; - __be32 equiq_to_len16; - __be64 r3; -}; - -enum fw_flowc_mnem { - FW_FLOWC_MNEM_PFNVFN, /* PFN [15:8] VFN [7:0] */ - FW_FLOWC_MNEM_CH, - FW_FLOWC_MNEM_PORT, - FW_FLOWC_MNEM_IQID, - FW_FLOWC_MNEM_SNDNXT, - FW_FLOWC_MNEM_RCVNXT, - FW_FLOWC_MNEM_SNDBUF, - FW_FLOWC_MNEM_MSS, -}; - -struct fw_flowc_mnemval { - u8 mnemonic; - u8 r4[3]; - __be32 val; -}; - -struct fw_flowc_wr { - __be32 op_to_nparams; -#define FW_FLOWC_WR_NPARAMS(x) ((x) << 0) - __be32 flowid_len16; - struct fw_flowc_mnemval mnemval[0]; -}; - -struct fw_ofld_tx_data_wr { - __be32 op_to_immdlen; - __be32 flowid_len16; - __be32 plen; - __be32 tunnel_to_proxy; -#define FW_OFLD_TX_DATA_WR_TUNNEL(x) ((x) << 19) -#define FW_OFLD_TX_DATA_WR_SAVE(x) ((x) << 18) -#define FW_OFLD_TX_DATA_WR_FLUSH(x) ((x) << 17) -#define FW_OFLD_TX_DATA_WR_URGENT(x) ((x) << 16) -#define FW_OFLD_TX_DATA_WR_MORE(x) ((x) << 15) -#define FW_OFLD_TX_DATA_WR_SHOVE(x) ((x) << 14) -#define FW_OFLD_TX_DATA_WR_ULPMODE(x) ((x) << 10) -#define FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) ((x) << 6) -}; - -struct fw_cmd_wr { - __be32 op_dma; -#define FW_CMD_WR_DMA (1U << 17) - __be32 len16_pkd; - __be64 cookie_daddr; -}; - -struct fw_eth_tx_pkt_vm_wr { - __be32 op_immdlen; - __be32 equiq_to_len16; - __be32 r3[2]; - u8 ethmacdst[6]; - u8 ethmacsrc[6]; - __be16 ethtype; - __be16 vlantci; -}; - -#define FW_CMD_MAX_TIMEOUT 3000 - -enum fw_cmd_opcodes { - FW_LDST_CMD = 0x01, - FW_RESET_CMD = 0x03, - FW_HELLO_CMD = 0x04, - FW_BYE_CMD = 0x05, - FW_INITIALIZE_CMD = 0x06, - FW_CAPS_CONFIG_CMD = 0x07, - FW_PARAMS_CMD = 0x08, - FW_PFVF_CMD = 0x09, - FW_IQ_CMD = 0x10, - FW_EQ_MNGT_CMD = 0x11, - FW_EQ_ETH_CMD = 0x12, - FW_EQ_CTRL_CMD = 0x13, - FW_EQ_OFLD_CMD = 0x21, - FW_VI_CMD = 0x14, - FW_VI_MAC_CMD = 0x15, - FW_VI_RXMODE_CMD = 0x16, - FW_VI_ENABLE_CMD = 0x17, - FW_ACL_MAC_CMD = 0x18, - FW_ACL_VLAN_CMD = 0x19, - FW_VI_STATS_CMD = 0x1a, - FW_PORT_CMD = 0x1b, - FW_PORT_STATS_CMD = 0x1c, - FW_PORT_LB_STATS_CMD = 0x1d, - FW_PORT_TRACE_CMD = 0x1e, - FW_PORT_TRACE_MMAP_CMD = 0x1f, - FW_RSS_IND_TBL_CMD = 0x20, - FW_RSS_GLB_CONFIG_CMD = 0x22, - FW_RSS_VI_CONFIG_CMD = 0x23, - FW_LASTC2E_CMD = 0x40, - FW_ERROR_CMD = 0x80, - FW_DEBUG_CMD = 0x81, -}; - -enum fw_cmd_cap { - FW_CMD_CAP_PF = 0x01, - FW_CMD_CAP_DMAQ = 0x02, - FW_CMD_CAP_PORT = 0x04, - FW_CMD_CAP_PORTPROMISC = 0x08, - FW_CMD_CAP_PORTSTATS = 0x10, - FW_CMD_CAP_VF = 0x80, -}; - -/* - * Generic command header flit0 - */ -struct fw_cmd_hdr { - __be32 hi; - __be32 lo; -}; - -#define FW_CMD_OP(x) ((x) << 24) -#define FW_CMD_OP_GET(x) (((x) >> 24) & 0xff) -#define FW_CMD_REQUEST (1U << 23) -#define FW_CMD_READ (1U << 22) -#define FW_CMD_WRITE (1U << 21) -#define FW_CMD_EXEC (1U << 20) -#define FW_CMD_RAMASK(x) ((x) << 20) -#define FW_CMD_RETVAL(x) ((x) << 8) -#define FW_CMD_RETVAL_GET(x) (((x) >> 8) & 0xff) -#define FW_CMD_LEN16(x) ((x) << 0) - -enum fw_ldst_addrspc { - FW_LDST_ADDRSPC_FIRMWARE = 0x0001, - FW_LDST_ADDRSPC_SGE_EGRC = 0x0008, - FW_LDST_ADDRSPC_SGE_INGC = 0x0009, - FW_LDST_ADDRSPC_SGE_FLMC = 0x000a, - FW_LDST_ADDRSPC_SGE_CONMC = 0x000b, - FW_LDST_ADDRSPC_TP_PIO = 0x0010, - FW_LDST_ADDRSPC_TP_TM_PIO = 0x0011, - FW_LDST_ADDRSPC_TP_MIB = 0x0012, - FW_LDST_ADDRSPC_MDIO = 0x0018, - FW_LDST_ADDRSPC_MPS = 0x0020, - FW_LDST_ADDRSPC_FUNC = 0x0028 -}; - -enum fw_ldst_mps_fid { - FW_LDST_MPS_ATRB, - FW_LDST_MPS_RPLC -}; - -enum fw_ldst_func_access_ctl { - FW_LDST_FUNC_ACC_CTL_VIID, - FW_LDST_FUNC_ACC_CTL_FID -}; - -enum fw_ldst_func_mod_index { - FW_LDST_FUNC_MPS -}; - -struct fw_ldst_cmd { - __be32 op_to_addrspace; -#define FW_LDST_CMD_ADDRSPACE(x) ((x) << 0) - __be32 cycles_to_len16; - union fw_ldst { - struct fw_ldst_addrval { - __be32 addr; - __be32 val; - } addrval; - struct fw_ldst_idctxt { - __be32 physid; - __be32 msg_pkd; - __be32 ctxt_data7; - __be32 ctxt_data6; - __be32 ctxt_data5; - __be32 ctxt_data4; - __be32 ctxt_data3; - __be32 ctxt_data2; - __be32 ctxt_data1; - __be32 ctxt_data0; - } idctxt; - struct fw_ldst_mdio { - __be16 paddr_mmd; - __be16 raddr; - __be16 vctl; - __be16 rval; - } mdio; - struct fw_ldst_mps { - __be16 fid_ctl; - __be16 rplcpf_pkd; - __be32 rplc127_96; - __be32 rplc95_64; - __be32 rplc63_32; - __be32 rplc31_0; - __be32 atrb; - __be16 vlan[16]; - } mps; - struct fw_ldst_func { - u8 access_ctl; - u8 mod_index; - __be16 ctl_id; - __be32 offset; - __be64 data0; - __be64 data1; - } func; - } u; -}; - -#define FW_LDST_CMD_MSG(x) ((x) << 31) -#define FW_LDST_CMD_PADDR(x) ((x) << 8) -#define FW_LDST_CMD_MMD(x) ((x) << 0) -#define FW_LDST_CMD_FID(x) ((x) << 15) -#define FW_LDST_CMD_CTL(x) ((x) << 0) -#define FW_LDST_CMD_RPLCPF(x) ((x) << 0) - -struct fw_reset_cmd { - __be32 op_to_write; - __be32 retval_len16; - __be32 val; - __be32 r3; -}; - -struct fw_hello_cmd { - __be32 op_to_write; - __be32 retval_len16; - __be32 err_to_mbasyncnot; -#define FW_HELLO_CMD_ERR (1U << 31) -#define FW_HELLO_CMD_INIT (1U << 30) -#define FW_HELLO_CMD_MASTERDIS(x) ((x) << 29) -#define FW_HELLO_CMD_MASTERFORCE(x) ((x) << 28) -#define FW_HELLO_CMD_MBMASTER(x) ((x) << 24) -#define FW_HELLO_CMD_MBASYNCNOT(x) ((x) << 20) - __be32 fwrev; -}; - -struct fw_bye_cmd { - __be32 op_to_write; - __be32 retval_len16; - __be64 r3; -}; - -struct fw_initialize_cmd { - __be32 op_to_write; - __be32 retval_len16; - __be64 r3; -}; - -enum fw_caps_config_hm { - FW_CAPS_CONFIG_HM_PCIE = 0x00000001, - FW_CAPS_CONFIG_HM_PL = 0x00000002, - FW_CAPS_CONFIG_HM_SGE = 0x00000004, - FW_CAPS_CONFIG_HM_CIM = 0x00000008, - FW_CAPS_CONFIG_HM_ULPTX = 0x00000010, - FW_CAPS_CONFIG_HM_TP = 0x00000020, - FW_CAPS_CONFIG_HM_ULPRX = 0x00000040, - FW_CAPS_CONFIG_HM_PMRX = 0x00000080, - FW_CAPS_CONFIG_HM_PMTX = 0x00000100, - FW_CAPS_CONFIG_HM_MC = 0x00000200, - FW_CAPS_CONFIG_HM_LE = 0x00000400, - FW_CAPS_CONFIG_HM_MPS = 0x00000800, - FW_CAPS_CONFIG_HM_XGMAC = 0x00001000, - FW_CAPS_CONFIG_HM_CPLSWITCH = 0x00002000, - FW_CAPS_CONFIG_HM_T4DBG = 0x00004000, - FW_CAPS_CONFIG_HM_MI = 0x00008000, - FW_CAPS_CONFIG_HM_I2CM = 0x00010000, - FW_CAPS_CONFIG_HM_NCSI = 0x00020000, - FW_CAPS_CONFIG_HM_SMB = 0x00040000, - FW_CAPS_CONFIG_HM_MA = 0x00080000, - FW_CAPS_CONFIG_HM_EDRAM = 0x00100000, - FW_CAPS_CONFIG_HM_PMU = 0x00200000, - FW_CAPS_CONFIG_HM_UART = 0x00400000, - FW_CAPS_CONFIG_HM_SF = 0x00800000, -}; - -enum fw_caps_config_nbm { - FW_CAPS_CONFIG_NBM_IPMI = 0x00000001, - FW_CAPS_CONFIG_NBM_NCSI = 0x00000002, -}; - -enum fw_caps_config_link { - FW_CAPS_CONFIG_LINK_PPP = 0x00000001, - FW_CAPS_CONFIG_LINK_QFC = 0x00000002, - FW_CAPS_CONFIG_LINK_DCBX = 0x00000004, -}; - -enum fw_caps_config_switch { - FW_CAPS_CONFIG_SWITCH_INGRESS = 0x00000001, - FW_CAPS_CONFIG_SWITCH_EGRESS = 0x00000002, -}; - -enum fw_caps_config_nic { - FW_CAPS_CONFIG_NIC = 0x00000001, - FW_CAPS_CONFIG_NIC_VM = 0x00000002, -}; - -enum fw_caps_config_ofld { - FW_CAPS_CONFIG_OFLD = 0x00000001, -}; - -enum fw_caps_config_rdma { - FW_CAPS_CONFIG_RDMA_RDDP = 0x00000001, - FW_CAPS_CONFIG_RDMA_RDMAC = 0x00000002, -}; - -enum fw_caps_config_iscsi { - FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU = 0x00000001, - FW_CAPS_CONFIG_ISCSI_TARGET_PDU = 0x00000002, - FW_CAPS_CONFIG_ISCSI_INITIATOR_CNXOFLD = 0x00000004, - FW_CAPS_CONFIG_ISCSI_TARGET_CNXOFLD = 0x00000008, -}; - -enum fw_caps_config_fcoe { - FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001, - FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002, -}; - -struct fw_caps_config_cmd { - __be32 op_to_write; - __be32 retval_len16; - __be32 r2; - __be32 hwmbitmap; - __be16 nbmcaps; - __be16 linkcaps; - __be16 switchcaps; - __be16 r3; - __be16 niccaps; - __be16 ofldcaps; - __be16 rdmacaps; - __be16 r4; - __be16 iscsicaps; - __be16 fcoecaps; - __be32 r5; - __be64 r6; -}; - -/* - * params command mnemonics - */ -enum fw_params_mnem { - FW_PARAMS_MNEM_DEV = 1, /* device params */ - FW_PARAMS_MNEM_PFVF = 2, /* function params */ - FW_PARAMS_MNEM_REG = 3, /* limited register access */ - FW_PARAMS_MNEM_DMAQ = 4, /* dma queue params */ - FW_PARAMS_MNEM_LAST -}; - -/* - * device parameters - */ -enum fw_params_param_dev { - FW_PARAMS_PARAM_DEV_CCLK = 0x00, /* chip core clock in khz */ - FW_PARAMS_PARAM_DEV_PORTVEC = 0x01, /* the port vector */ - FW_PARAMS_PARAM_DEV_NTID = 0x02, /* reads the number of TIDs - * allocated by the device's - * Lookup Engine - */ - FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ = 0x03, - FW_PARAMS_PARAM_DEV_INTVER_NIC = 0x04, - FW_PARAMS_PARAM_DEV_INTVER_VNIC = 0x05, - FW_PARAMS_PARAM_DEV_INTVER_OFLD = 0x06, - FW_PARAMS_PARAM_DEV_INTVER_RI = 0x07, - FW_PARAMS_PARAM_DEV_INTVER_ISCSIPDU = 0x08, - FW_PARAMS_PARAM_DEV_INTVER_ISCSI = 0x09, - FW_PARAMS_PARAM_DEV_INTVER_FCOE = 0x0A -}; - -/* - * physical and virtual function parameters - */ -enum fw_params_param_pfvf { - FW_PARAMS_PARAM_PFVF_RWXCAPS = 0x00, - FW_PARAMS_PARAM_PFVF_ROUTE_START = 0x01, - FW_PARAMS_PARAM_PFVF_ROUTE_END = 0x02, - FW_PARAMS_PARAM_PFVF_CLIP_START = 0x03, - FW_PARAMS_PARAM_PFVF_CLIP_END = 0x04, - FW_PARAMS_PARAM_PFVF_FILTER_START = 0x05, - FW_PARAMS_PARAM_PFVF_FILTER_END = 0x06, - FW_PARAMS_PARAM_PFVF_SERVER_START = 0x07, - FW_PARAMS_PARAM_PFVF_SERVER_END = 0x08, - FW_PARAMS_PARAM_PFVF_TDDP_START = 0x09, - FW_PARAMS_PARAM_PFVF_TDDP_END = 0x0A, - FW_PARAMS_PARAM_PFVF_ISCSI_START = 0x0B, - FW_PARAMS_PARAM_PFVF_ISCSI_END = 0x0C, - FW_PARAMS_PARAM_PFVF_STAG_START = 0x0D, - FW_PARAMS_PARAM_PFVF_STAG_END = 0x0E, - FW_PARAMS_PARAM_PFVF_RQ_START = 0x1F, - FW_PARAMS_PARAM_PFVF_RQ_END = 0x10, - FW_PARAMS_PARAM_PFVF_PBL_START = 0x11, - FW_PARAMS_PARAM_PFVF_PBL_END = 0x12, - FW_PARAMS_PARAM_PFVF_L2T_START = 0x13, - FW_PARAMS_PARAM_PFVF_L2T_END = 0x14, - FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20, -}; - -/* - * dma queue parameters - */ -enum fw_params_param_dmaq { - FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00, - FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01, - FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10, - FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11, - FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12, -}; - -#define FW_PARAMS_MNEM(x) ((x) << 24) -#define FW_PARAMS_PARAM_X(x) ((x) << 16) -#define FW_PARAMS_PARAM_Y(x) ((x) << 8) -#define FW_PARAMS_PARAM_Z(x) ((x) << 0) -#define FW_PARAMS_PARAM_XYZ(x) ((x) << 0) -#define FW_PARAMS_PARAM_YZ(x) ((x) << 0) - -struct fw_params_cmd { - __be32 op_to_vfn; - __be32 retval_len16; - struct fw_params_param { - __be32 mnem; - __be32 val; - } param[7]; -}; - -#define FW_PARAMS_CMD_PFN(x) ((x) << 8) -#define FW_PARAMS_CMD_VFN(x) ((x) << 0) - -struct fw_pfvf_cmd { - __be32 op_to_vfn; - __be32 retval_len16; - __be32 niqflint_niq; - __be32 cmask_to_neq; - __be32 tc_to_nexactf; - __be32 r_caps_to_nethctrl; - __be16 nricq; - __be16 nriqp; - __be32 r4; -}; - -#define FW_PFVF_CMD_PFN(x) ((x) << 8) -#define FW_PFVF_CMD_VFN(x) ((x) << 0) - -#define FW_PFVF_CMD_NIQFLINT(x) ((x) << 20) -#define FW_PFVF_CMD_NIQFLINT_GET(x) (((x) >> 20) & 0xfff) - -#define FW_PFVF_CMD_NIQ(x) ((x) << 0) -#define FW_PFVF_CMD_NIQ_GET(x) (((x) >> 0) & 0xfffff) - -#define FW_PFVF_CMD_CMASK(x) ((x) << 24) -#define FW_PFVF_CMD_CMASK_GET(x) (((x) >> 24) & 0xf) - -#define FW_PFVF_CMD_PMASK(x) ((x) << 20) -#define FW_PFVF_CMD_PMASK_GET(x) (((x) >> 20) & 0xf) - -#define FW_PFVF_CMD_NEQ(x) ((x) << 0) -#define FW_PFVF_CMD_NEQ_GET(x) (((x) >> 0) & 0xfffff) - -#define FW_PFVF_CMD_TC(x) ((x) << 24) -#define FW_PFVF_CMD_TC_GET(x) (((x) >> 24) & 0xff) - -#define FW_PFVF_CMD_NVI(x) ((x) << 16) -#define FW_PFVF_CMD_NVI_GET(x) (((x) >> 16) & 0xff) - -#define FW_PFVF_CMD_NEXACTF(x) ((x) << 0) -#define FW_PFVF_CMD_NEXACTF_GET(x) (((x) >> 0) & 0xffff) - -#define FW_PFVF_CMD_R_CAPS(x) ((x) << 24) -#define FW_PFVF_CMD_R_CAPS_GET(x) (((x) >> 24) & 0xff) - -#define FW_PFVF_CMD_WX_CAPS(x) ((x) << 16) -#define FW_PFVF_CMD_WX_CAPS_GET(x) (((x) >> 16) & 0xff) - -#define FW_PFVF_CMD_NETHCTRL(x) ((x) << 0) -#define FW_PFVF_CMD_NETHCTRL_GET(x) (((x) >> 0) & 0xffff) - -enum fw_iq_type { - FW_IQ_TYPE_FL_INT_CAP, - FW_IQ_TYPE_NO_FL_INT_CAP -}; - -struct fw_iq_cmd { - __be32 op_to_vfn; - __be32 alloc_to_len16; - __be16 physiqid; - __be16 iqid; - __be16 fl0id; - __be16 fl1id; - __be32 type_to_iqandstindex; - __be16 iqdroprss_to_iqesize; - __be16 iqsize; - __be64 iqaddr; - __be32 iqns_to_fl0congen; - __be16 fl0dcaen_to_fl0cidxfthresh; - __be16 fl0size; - __be64 fl0addr; - __be32 fl1cngchmap_to_fl1congen; - __be16 fl1dcaen_to_fl1cidxfthresh; - __be16 fl1size; - __be64 fl1addr; -}; - -#define FW_IQ_CMD_PFN(x) ((x) << 8) -#define FW_IQ_CMD_VFN(x) ((x) << 0) - -#define FW_IQ_CMD_ALLOC (1U << 31) -#define FW_IQ_CMD_FREE (1U << 30) -#define FW_IQ_CMD_MODIFY (1U << 29) -#define FW_IQ_CMD_IQSTART(x) ((x) << 28) -#define FW_IQ_CMD_IQSTOP(x) ((x) << 27) - -#define FW_IQ_CMD_TYPE(x) ((x) << 29) -#define FW_IQ_CMD_IQASYNCH(x) ((x) << 28) -#define FW_IQ_CMD_VIID(x) ((x) << 16) -#define FW_IQ_CMD_IQANDST(x) ((x) << 15) -#define FW_IQ_CMD_IQANUS(x) ((x) << 14) -#define FW_IQ_CMD_IQANUD(x) ((x) << 12) -#define FW_IQ_CMD_IQANDSTINDEX(x) ((x) << 0) - -#define FW_IQ_CMD_IQDROPRSS (1U << 15) -#define FW_IQ_CMD_IQGTSMODE (1U << 14) -#define FW_IQ_CMD_IQPCIECH(x) ((x) << 12) -#define FW_IQ_CMD_IQDCAEN(x) ((x) << 11) -#define FW_IQ_CMD_IQDCACPU(x) ((x) << 6) -#define FW_IQ_CMD_IQINTCNTTHRESH(x) ((x) << 4) -#define FW_IQ_CMD_IQO (1U << 3) -#define FW_IQ_CMD_IQCPRIO(x) ((x) << 2) -#define FW_IQ_CMD_IQESIZE(x) ((x) << 0) - -#define FW_IQ_CMD_IQNS(x) ((x) << 31) -#define FW_IQ_CMD_IQRO(x) ((x) << 30) -#define FW_IQ_CMD_IQFLINTIQHSEN(x) ((x) << 28) -#define FW_IQ_CMD_IQFLINTCONGEN(x) ((x) << 27) -#define FW_IQ_CMD_IQFLINTISCSIC(x) ((x) << 26) -#define FW_IQ_CMD_FL0CNGCHMAP(x) ((x) << 20) -#define FW_IQ_CMD_FL0CACHELOCK(x) ((x) << 15) -#define FW_IQ_CMD_FL0DBP(x) ((x) << 14) -#define FW_IQ_CMD_FL0DATANS(x) ((x) << 13) -#define FW_IQ_CMD_FL0DATARO(x) ((x) << 12) -#define FW_IQ_CMD_FL0CONGCIF(x) ((x) << 11) -#define FW_IQ_CMD_FL0ONCHIP(x) ((x) << 10) -#define FW_IQ_CMD_FL0STATUSPGNS(x) ((x) << 9) -#define FW_IQ_CMD_FL0STATUSPGRO(x) ((x) << 8) -#define FW_IQ_CMD_FL0FETCHNS(x) ((x) << 7) -#define FW_IQ_CMD_FL0FETCHRO(x) ((x) << 6) -#define FW_IQ_CMD_FL0HOSTFCMODE(x) ((x) << 4) -#define FW_IQ_CMD_FL0CPRIO(x) ((x) << 3) -#define FW_IQ_CMD_FL0PADEN (1U << 2) -#define FW_IQ_CMD_FL0PACKEN (1U << 1) -#define FW_IQ_CMD_FL0CONGEN (1U << 0) - -#define FW_IQ_CMD_FL0DCAEN(x) ((x) << 15) -#define FW_IQ_CMD_FL0DCACPU(x) ((x) << 10) -#define FW_IQ_CMD_FL0FBMIN(x) ((x) << 7) -#define FW_IQ_CMD_FL0FBMAX(x) ((x) << 4) -#define FW_IQ_CMD_FL0CIDXFTHRESHO (1U << 3) -#define FW_IQ_CMD_FL0CIDXFTHRESH(x) ((x) << 0) - -#define FW_IQ_CMD_FL1CNGCHMAP(x) ((x) << 20) -#define FW_IQ_CMD_FL1CACHELOCK(x) ((x) << 15) -#define FW_IQ_CMD_FL1DBP(x) ((x) << 14) -#define FW_IQ_CMD_FL1DATANS(x) ((x) << 13) -#define FW_IQ_CMD_FL1DATARO(x) ((x) << 12) -#define FW_IQ_CMD_FL1CONGCIF(x) ((x) << 11) -#define FW_IQ_CMD_FL1ONCHIP(x) ((x) << 10) -#define FW_IQ_CMD_FL1STATUSPGNS(x) ((x) << 9) -#define FW_IQ_CMD_FL1STATUSPGRO(x) ((x) << 8) -#define FW_IQ_CMD_FL1FETCHNS(x) ((x) << 7) -#define FW_IQ_CMD_FL1FETCHRO(x) ((x) << 6) -#define FW_IQ_CMD_FL1HOSTFCMODE(x) ((x) << 4) -#define FW_IQ_CMD_FL1CPRIO(x) ((x) << 3) -#define FW_IQ_CMD_FL1PADEN (1U << 2) -#define FW_IQ_CMD_FL1PACKEN (1U << 1) -#define FW_IQ_CMD_FL1CONGEN (1U << 0) - -#define FW_IQ_CMD_FL1DCAEN(x) ((x) << 15) -#define FW_IQ_CMD_FL1DCACPU(x) ((x) << 10) -#define FW_IQ_CMD_FL1FBMIN(x) ((x) << 7) -#define FW_IQ_CMD_FL1FBMAX(x) ((x) << 4) -#define FW_IQ_CMD_FL1CIDXFTHRESHO (1U << 3) -#define FW_IQ_CMD_FL1CIDXFTHRESH(x) ((x) << 0) - -struct fw_eq_eth_cmd { - __be32 op_to_vfn; - __be32 alloc_to_len16; - __be32 eqid_pkd; - __be32 physeqid_pkd; - __be32 fetchszm_to_iqid; - __be32 dcaen_to_eqsize; - __be64 eqaddr; - __be32 viid_pkd; - __be32 r8_lo; - __be64 r9; -}; - -#define FW_EQ_ETH_CMD_PFN(x) ((x) << 8) -#define FW_EQ_ETH_CMD_VFN(x) ((x) << 0) -#define FW_EQ_ETH_CMD_ALLOC (1U << 31) -#define FW_EQ_ETH_CMD_FREE (1U << 30) -#define FW_EQ_ETH_CMD_MODIFY (1U << 29) -#define FW_EQ_ETH_CMD_EQSTART (1U << 28) -#define FW_EQ_ETH_CMD_EQSTOP (1U << 27) - -#define FW_EQ_ETH_CMD_EQID(x) ((x) << 0) -#define FW_EQ_ETH_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff) -#define FW_EQ_ETH_CMD_PHYSEQID(x) ((x) << 0) - -#define FW_EQ_ETH_CMD_FETCHSZM(x) ((x) << 26) -#define FW_EQ_ETH_CMD_STATUSPGNS(x) ((x) << 25) -#define FW_EQ_ETH_CMD_STATUSPGRO(x) ((x) << 24) -#define FW_EQ_ETH_CMD_FETCHNS(x) ((x) << 23) -#define FW_EQ_ETH_CMD_FETCHRO(x) ((x) << 22) -#define FW_EQ_ETH_CMD_HOSTFCMODE(x) ((x) << 20) -#define FW_EQ_ETH_CMD_CPRIO(x) ((x) << 19) -#define FW_EQ_ETH_CMD_ONCHIP(x) ((x) << 18) -#define FW_EQ_ETH_CMD_PCIECHN(x) ((x) << 16) -#define FW_EQ_ETH_CMD_IQID(x) ((x) << 0) - -#define FW_EQ_ETH_CMD_DCAEN(x) ((x) << 31) -#define FW_EQ_ETH_CMD_DCACPU(x) ((x) << 26) -#define FW_EQ_ETH_CMD_FBMIN(x) ((x) << 23) -#define FW_EQ_ETH_CMD_FBMAX(x) ((x) << 20) -#define FW_EQ_ETH_CMD_CIDXFTHRESHO(x) ((x) << 19) -#define FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << 16) -#define FW_EQ_ETH_CMD_EQSIZE(x) ((x) << 0) - -#define FW_EQ_ETH_CMD_VIID(x) ((x) << 16) - -struct fw_eq_ctrl_cmd { - __be32 op_to_vfn; - __be32 alloc_to_len16; - __be32 cmpliqid_eqid; - __be32 physeqid_pkd; - __be32 fetchszm_to_iqid; - __be32 dcaen_to_eqsize; - __be64 eqaddr; -}; - -#define FW_EQ_CTRL_CMD_PFN(x) ((x) << 8) -#define FW_EQ_CTRL_CMD_VFN(x) ((x) << 0) - -#define FW_EQ_CTRL_CMD_ALLOC (1U << 31) -#define FW_EQ_CTRL_CMD_FREE (1U << 30) -#define FW_EQ_CTRL_CMD_MODIFY (1U << 29) -#define FW_EQ_CTRL_CMD_EQSTART (1U << 28) -#define FW_EQ_CTRL_CMD_EQSTOP (1U << 27) - -#define FW_EQ_CTRL_CMD_CMPLIQID(x) ((x) << 20) -#define FW_EQ_CTRL_CMD_EQID(x) ((x) << 0) -#define FW_EQ_CTRL_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff) -#define FW_EQ_CTRL_CMD_PHYSEQID_GET(x) (((x) >> 0) & 0xfffff) - -#define FW_EQ_CTRL_CMD_FETCHSZM (1U << 26) -#define FW_EQ_CTRL_CMD_STATUSPGNS (1U << 25) -#define FW_EQ_CTRL_CMD_STATUSPGRO (1U << 24) -#define FW_EQ_CTRL_CMD_FETCHNS (1U << 23) -#define FW_EQ_CTRL_CMD_FETCHRO (1U << 22) -#define FW_EQ_CTRL_CMD_HOSTFCMODE(x) ((x) << 20) -#define FW_EQ_CTRL_CMD_CPRIO(x) ((x) << 19) -#define FW_EQ_CTRL_CMD_ONCHIP(x) ((x) << 18) -#define FW_EQ_CTRL_CMD_PCIECHN(x) ((x) << 16) -#define FW_EQ_CTRL_CMD_IQID(x) ((x) << 0) - -#define FW_EQ_CTRL_CMD_DCAEN(x) ((x) << 31) -#define FW_EQ_CTRL_CMD_DCACPU(x) ((x) << 26) -#define FW_EQ_CTRL_CMD_FBMIN(x) ((x) << 23) -#define FW_EQ_CTRL_CMD_FBMAX(x) ((x) << 20) -#define FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) ((x) << 19) -#define FW_EQ_CTRL_CMD_CIDXFTHRESH(x) ((x) << 16) -#define FW_EQ_CTRL_CMD_EQSIZE(x) ((x) << 0) - -struct fw_eq_ofld_cmd { - __be32 op_to_vfn; - __be32 alloc_to_len16; - __be32 eqid_pkd; - __be32 physeqid_pkd; - __be32 fetchszm_to_iqid; - __be32 dcaen_to_eqsize; - __be64 eqaddr; -}; - -#define FW_EQ_OFLD_CMD_PFN(x) ((x) << 8) -#define FW_EQ_OFLD_CMD_VFN(x) ((x) << 0) - -#define FW_EQ_OFLD_CMD_ALLOC (1U << 31) -#define FW_EQ_OFLD_CMD_FREE (1U << 30) -#define FW_EQ_OFLD_CMD_MODIFY (1U << 29) -#define FW_EQ_OFLD_CMD_EQSTART (1U << 28) -#define FW_EQ_OFLD_CMD_EQSTOP (1U << 27) - -#define FW_EQ_OFLD_CMD_EQID(x) ((x) << 0) -#define FW_EQ_OFLD_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff) -#define FW_EQ_OFLD_CMD_PHYSEQID_GET(x) (((x) >> 0) & 0xfffff) - -#define FW_EQ_OFLD_CMD_FETCHSZM(x) ((x) << 26) -#define FW_EQ_OFLD_CMD_STATUSPGNS(x) ((x) << 25) -#define FW_EQ_OFLD_CMD_STATUSPGRO(x) ((x) << 24) -#define FW_EQ_OFLD_CMD_FETCHNS(x) ((x) << 23) -#define FW_EQ_OFLD_CMD_FETCHRO(x) ((x) << 22) -#define FW_EQ_OFLD_CMD_HOSTFCMODE(x) ((x) << 20) -#define FW_EQ_OFLD_CMD_CPRIO(x) ((x) << 19) -#define FW_EQ_OFLD_CMD_ONCHIP(x) ((x) << 18) -#define FW_EQ_OFLD_CMD_PCIECHN(x) ((x) << 16) -#define FW_EQ_OFLD_CMD_IQID(x) ((x) << 0) - -#define FW_EQ_OFLD_CMD_DCAEN(x) ((x) << 31) -#define FW_EQ_OFLD_CMD_DCACPU(x) ((x) << 26) -#define FW_EQ_OFLD_CMD_FBMIN(x) ((x) << 23) -#define FW_EQ_OFLD_CMD_FBMAX(x) ((x) << 20) -#define FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) ((x) << 19) -#define FW_EQ_OFLD_CMD_CIDXFTHRESH(x) ((x) << 16) -#define FW_EQ_OFLD_CMD_EQSIZE(x) ((x) << 0) - -/* - * Macros for VIID parsing: - * VIID - [10:8] PFN, [7] VI Valid, [6:0] VI number - */ -#define FW_VIID_PFN_GET(x) (((x) >> 8) & 0x7) -#define FW_VIID_VIVLD_GET(x) (((x) >> 7) & 0x1) -#define FW_VIID_VIN_GET(x) (((x) >> 0) & 0x7F) - -struct fw_vi_cmd { - __be32 op_to_vfn; - __be32 alloc_to_len16; - __be16 viid_pkd; - u8 mac[6]; - u8 portid_pkd; - u8 nmac; - u8 nmac0[6]; - __be16 rsssize_pkd; - u8 nmac1[6]; - __be16 r7; - u8 nmac2[6]; - __be16 r8; - u8 nmac3[6]; - __be64 r9; - __be64 r10; -}; - -#define FW_VI_CMD_PFN(x) ((x) << 8) -#define FW_VI_CMD_VFN(x) ((x) << 0) -#define FW_VI_CMD_ALLOC (1U << 31) -#define FW_VI_CMD_FREE (1U << 30) -#define FW_VI_CMD_VIID(x) ((x) << 0) -#define FW_VI_CMD_PORTID(x) ((x) << 4) -#define FW_VI_CMD_RSSSIZE_GET(x) (((x) >> 0) & 0x7ff) - -/* Special VI_MAC command index ids */ -#define FW_VI_MAC_ADD_MAC 0x3FF -#define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE -#define FW_VI_MAC_MAC_BASED_FREE 0x3FD - -enum fw_vi_mac_smac { - FW_VI_MAC_MPS_TCAM_ENTRY, - FW_VI_MAC_MPS_TCAM_ONLY, - FW_VI_MAC_SMT_ONLY, - FW_VI_MAC_SMT_AND_MPSTCAM -}; - -enum fw_vi_mac_result { - FW_VI_MAC_R_SUCCESS, - FW_VI_MAC_R_F_NONEXISTENT_NOMEM, - FW_VI_MAC_R_SMAC_FAIL, - FW_VI_MAC_R_F_ACL_CHECK -}; - -struct fw_vi_mac_cmd { - __be32 op_to_viid; - __be32 freemacs_to_len16; - union fw_vi_mac { - struct fw_vi_mac_exact { - __be16 valid_to_idx; - u8 macaddr[6]; - } exact[7]; - struct fw_vi_mac_hash { - __be64 hashvec; - } hash; - } u; -}; - -#define FW_VI_MAC_CMD_VIID(x) ((x) << 0) -#define FW_VI_MAC_CMD_FREEMACS(x) ((x) << 31) -#define FW_VI_MAC_CMD_HASHVECEN (1U << 23) -#define FW_VI_MAC_CMD_HASHUNIEN(x) ((x) << 22) -#define FW_VI_MAC_CMD_VALID (1U << 15) -#define FW_VI_MAC_CMD_PRIO(x) ((x) << 12) -#define FW_VI_MAC_CMD_SMAC_RESULT(x) ((x) << 10) -#define FW_VI_MAC_CMD_SMAC_RESULT_GET(x) (((x) >> 10) & 0x3) -#define FW_VI_MAC_CMD_IDX(x) ((x) << 0) -#define FW_VI_MAC_CMD_IDX_GET(x) (((x) >> 0) & 0x3ff) - -#define FW_RXMODE_MTU_NO_CHG 65535 - -struct fw_vi_rxmode_cmd { - __be32 op_to_viid; - __be32 retval_len16; - __be32 mtu_to_broadcasten; - __be32 r4_lo; -}; - -#define FW_VI_RXMODE_CMD_VIID(x) ((x) << 0) -#define FW_VI_RXMODE_CMD_MTU(x) ((x) << 16) -#define FW_VI_RXMODE_CMD_PROMISCEN_MASK 0x3 -#define FW_VI_RXMODE_CMD_PROMISCEN(x) ((x) << 14) -#define FW_VI_RXMODE_CMD_ALLMULTIEN_MASK 0x3 -#define FW_VI_RXMODE_CMD_ALLMULTIEN(x) ((x) << 12) -#define FW_VI_RXMODE_CMD_BROADCASTEN_MASK 0x3 -#define FW_VI_RXMODE_CMD_BROADCASTEN(x) ((x) << 10) - -struct fw_vi_enable_cmd { - __be32 op_to_viid; - __be32 ien_to_len16; - __be16 blinkdur; - __be16 r3; - __be32 r4; -}; - -#define FW_VI_ENABLE_CMD_VIID(x) ((x) << 0) -#define FW_VI_ENABLE_CMD_IEN(x) ((x) << 31) -#define FW_VI_ENABLE_CMD_EEN(x) ((x) << 30) -#define FW_VI_ENABLE_CMD_LED (1U << 29) - -/* VI VF stats offset definitions */ -#define VI_VF_NUM_STATS 16 -enum fw_vi_stats_vf_index { - FW_VI_VF_STAT_TX_BCAST_BYTES_IX, - FW_VI_VF_STAT_TX_BCAST_FRAMES_IX, - FW_VI_VF_STAT_TX_MCAST_BYTES_IX, - FW_VI_VF_STAT_TX_MCAST_FRAMES_IX, - FW_VI_VF_STAT_TX_UCAST_BYTES_IX, - FW_VI_VF_STAT_TX_UCAST_FRAMES_IX, - FW_VI_VF_STAT_TX_DROP_FRAMES_IX, - FW_VI_VF_STAT_TX_OFLD_BYTES_IX, - FW_VI_VF_STAT_TX_OFLD_FRAMES_IX, - FW_VI_VF_STAT_RX_BCAST_BYTES_IX, - FW_VI_VF_STAT_RX_BCAST_FRAMES_IX, - FW_VI_VF_STAT_RX_MCAST_BYTES_IX, - FW_VI_VF_STAT_RX_MCAST_FRAMES_IX, - FW_VI_VF_STAT_RX_UCAST_BYTES_IX, - FW_VI_VF_STAT_RX_UCAST_FRAMES_IX, - FW_VI_VF_STAT_RX_ERR_FRAMES_IX -}; - -/* VI PF stats offset definitions */ -#define VI_PF_NUM_STATS 17 -enum fw_vi_stats_pf_index { - FW_VI_PF_STAT_TX_BCAST_BYTES_IX, - FW_VI_PF_STAT_TX_BCAST_FRAMES_IX, - FW_VI_PF_STAT_TX_MCAST_BYTES_IX, - FW_VI_PF_STAT_TX_MCAST_FRAMES_IX, - FW_VI_PF_STAT_TX_UCAST_BYTES_IX, - FW_VI_PF_STAT_TX_UCAST_FRAMES_IX, - FW_VI_PF_STAT_TX_OFLD_BYTES_IX, - FW_VI_PF_STAT_TX_OFLD_FRAMES_IX, - FW_VI_PF_STAT_RX_BYTES_IX, - FW_VI_PF_STAT_RX_FRAMES_IX, - FW_VI_PF_STAT_RX_BCAST_BYTES_IX, - FW_VI_PF_STAT_RX_BCAST_FRAMES_IX, - FW_VI_PF_STAT_RX_MCAST_BYTES_IX, - FW_VI_PF_STAT_RX_MCAST_FRAMES_IX, - FW_VI_PF_STAT_RX_UCAST_BYTES_IX, - FW_VI_PF_STAT_RX_UCAST_FRAMES_IX, - FW_VI_PF_STAT_RX_ERR_FRAMES_IX -}; - -struct fw_vi_stats_cmd { - __be32 op_to_viid; - __be32 retval_len16; - union fw_vi_stats { - struct fw_vi_stats_ctl { - __be16 nstats_ix; - __be16 r6; - __be32 r7; - __be64 stat0; - __be64 stat1; - __be64 stat2; - __be64 stat3; - __be64 stat4; - __be64 stat5; - } ctl; - struct fw_vi_stats_pf { - __be64 tx_bcast_bytes; - __be64 tx_bcast_frames; - __be64 tx_mcast_bytes; - __be64 tx_mcast_frames; - __be64 tx_ucast_bytes; - __be64 tx_ucast_frames; - __be64 tx_offload_bytes; - __be64 tx_offload_frames; - __be64 rx_pf_bytes; - __be64 rx_pf_frames; - __be64 rx_bcast_bytes; - __be64 rx_bcast_frames; - __be64 rx_mcast_bytes; - __be64 rx_mcast_frames; - __be64 rx_ucast_bytes; - __be64 rx_ucast_frames; - __be64 rx_err_frames; - } pf; - struct fw_vi_stats_vf { - __be64 tx_bcast_bytes; - __be64 tx_bcast_frames; - __be64 tx_mcast_bytes; - __be64 tx_mcast_frames; - __be64 tx_ucast_bytes; - __be64 tx_ucast_frames; - __be64 tx_drop_frames; - __be64 tx_offload_bytes; - __be64 tx_offload_frames; - __be64 rx_bcast_bytes; - __be64 rx_bcast_frames; - __be64 rx_mcast_bytes; - __be64 rx_mcast_frames; - __be64 rx_ucast_bytes; - __be64 rx_ucast_frames; - __be64 rx_err_frames; - } vf; - } u; -}; - -#define FW_VI_STATS_CMD_VIID(x) ((x) << 0) -#define FW_VI_STATS_CMD_NSTATS(x) ((x) << 12) -#define FW_VI_STATS_CMD_IX(x) ((x) << 0) - -struct fw_acl_mac_cmd { - __be32 op_to_vfn; - __be32 en_to_len16; - u8 nmac; - u8 r3[7]; - __be16 r4; - u8 macaddr0[6]; - __be16 r5; - u8 macaddr1[6]; - __be16 r6; - u8 macaddr2[6]; - __be16 r7; - u8 macaddr3[6]; -}; - -#define FW_ACL_MAC_CMD_PFN(x) ((x) << 8) -#define FW_ACL_MAC_CMD_VFN(x) ((x) << 0) -#define FW_ACL_MAC_CMD_EN(x) ((x) << 31) - -struct fw_acl_vlan_cmd { - __be32 op_to_vfn; - __be32 en_to_len16; - u8 nvlan; - u8 dropnovlan_fm; - u8 r3_lo[6]; - __be16 vlanid[16]; -}; - -#define FW_ACL_VLAN_CMD_PFN(x) ((x) << 8) -#define FW_ACL_VLAN_CMD_VFN(x) ((x) << 0) -#define FW_ACL_VLAN_CMD_EN(x) ((x) << 31) -#define FW_ACL_VLAN_CMD_DROPNOVLAN(x) ((x) << 7) -#define FW_ACL_VLAN_CMD_FM(x) ((x) << 6) - -enum fw_port_cap { - FW_PORT_CAP_SPEED_100M = 0x0001, - FW_PORT_CAP_SPEED_1G = 0x0002, - FW_PORT_CAP_SPEED_2_5G = 0x0004, - FW_PORT_CAP_SPEED_10G = 0x0008, - FW_PORT_CAP_SPEED_40G = 0x0010, - FW_PORT_CAP_SPEED_100G = 0x0020, - FW_PORT_CAP_FC_RX = 0x0040, - FW_PORT_CAP_FC_TX = 0x0080, - FW_PORT_CAP_ANEG = 0x0100, - FW_PORT_CAP_MDI_0 = 0x0200, - FW_PORT_CAP_MDI_1 = 0x0400, - FW_PORT_CAP_BEAN = 0x0800, - FW_PORT_CAP_PMA_LPBK = 0x1000, - FW_PORT_CAP_PCS_LPBK = 0x2000, - FW_PORT_CAP_PHYXS_LPBK = 0x4000, - FW_PORT_CAP_FAR_END_LPBK = 0x8000, -}; - -enum fw_port_mdi { - FW_PORT_MDI_UNCHANGED, - FW_PORT_MDI_AUTO, - FW_PORT_MDI_F_STRAIGHT, - FW_PORT_MDI_F_CROSSOVER -}; - -#define FW_PORT_MDI(x) ((x) << 9) - -enum fw_port_action { - FW_PORT_ACTION_L1_CFG = 0x0001, - FW_PORT_ACTION_L2_CFG = 0x0002, - FW_PORT_ACTION_GET_PORT_INFO = 0x0003, - FW_PORT_ACTION_L2_PPP_CFG = 0x0004, - FW_PORT_ACTION_L2_DCB_CFG = 0x0005, - FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010, - FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011, - FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012, - FW_PORT_ACTION_LPBK_TO_NORMAL = 0x0020, - FW_PORT_ACTION_L1_LPBK = 0x0021, - FW_PORT_ACTION_L1_PMA_LPBK = 0x0022, - FW_PORT_ACTION_L1_PCS_LPBK = 0x0023, - FW_PORT_ACTION_L1_PHYXS_CSIDE_LPBK = 0x0024, - FW_PORT_ACTION_L1_PHYXS_ESIDE_LPBK = 0x0025, - FW_PORT_ACTION_PHY_RESET = 0x0040, - FW_PORT_ACTION_PMA_RESET = 0x0041, - FW_PORT_ACTION_PCS_RESET = 0x0042, - FW_PORT_ACTION_PHYXS_RESET = 0x0043, - FW_PORT_ACTION_DTEXS_REEST = 0x0044, - FW_PORT_ACTION_AN_RESET = 0x0045 -}; - -enum fw_port_l2cfg_ctlbf { - FW_PORT_L2_CTLBF_OVLAN0 = 0x01, - FW_PORT_L2_CTLBF_OVLAN1 = 0x02, - FW_PORT_L2_CTLBF_OVLAN2 = 0x04, - FW_PORT_L2_CTLBF_OVLAN3 = 0x08, - FW_PORT_L2_CTLBF_IVLAN = 0x10, - FW_PORT_L2_CTLBF_TXIPG = 0x20 -}; - -enum fw_port_dcb_cfg { - FW_PORT_DCB_CFG_PG = 0x01, - FW_PORT_DCB_CFG_PFC = 0x02, - FW_PORT_DCB_CFG_APPL = 0x04 -}; - -enum fw_port_dcb_cfg_rc { - FW_PORT_DCB_CFG_SUCCESS = 0x0, - FW_PORT_DCB_CFG_ERROR = 0x1 -}; - -struct fw_port_cmd { - __be32 op_to_portid; - __be32 action_to_len16; - union fw_port { - struct fw_port_l1cfg { - __be32 rcap; - __be32 r; - } l1cfg; - struct fw_port_l2cfg { - __be16 ctlbf_to_ivlan0; - __be16 ivlantype; - __be32 txipg_pkd; - __be16 ovlan0mask; - __be16 ovlan0type; - __be16 ovlan1mask; - __be16 ovlan1type; - __be16 ovlan2mask; - __be16 ovlan2type; - __be16 ovlan3mask; - __be16 ovlan3type; - } l2cfg; - struct fw_port_info { - __be32 lstatus_to_modtype; - __be16 pcap; - __be16 acap; - } info; - struct fw_port_ppp { - __be32 pppen_to_ncsich; - __be32 r11; - } ppp; - struct fw_port_dcb { - __be16 cfg; - u8 up_map; - u8 sf_cfgrc; - __be16 prot_ix; - u8 pe7_to_pe0; - u8 numTCPFCs; - __be32 pgid0_to_pgid7; - __be32 numTCs_oui; - u8 pgpc[8]; - } dcb; - } u; -}; - -#define FW_PORT_CMD_READ (1U << 22) - -#define FW_PORT_CMD_PORTID(x) ((x) << 0) -#define FW_PORT_CMD_PORTID_GET(x) (((x) >> 0) & 0xf) - -#define FW_PORT_CMD_ACTION(x) ((x) << 16) - -#define FW_PORT_CMD_CTLBF(x) ((x) << 10) -#define FW_PORT_CMD_OVLAN3(x) ((x) << 7) -#define FW_PORT_CMD_OVLAN2(x) ((x) << 6) -#define FW_PORT_CMD_OVLAN1(x) ((x) << 5) -#define FW_PORT_CMD_OVLAN0(x) ((x) << 4) -#define FW_PORT_CMD_IVLAN0(x) ((x) << 3) - -#define FW_PORT_CMD_TXIPG(x) ((x) << 19) - -#define FW_PORT_CMD_LSTATUS (1U << 31) -#define FW_PORT_CMD_LSPEED(x) ((x) << 24) -#define FW_PORT_CMD_LSPEED_GET(x) (((x) >> 24) & 0x3f) -#define FW_PORT_CMD_TXPAUSE (1U << 23) -#define FW_PORT_CMD_RXPAUSE (1U << 22) -#define FW_PORT_CMD_MDIOCAP (1U << 21) -#define FW_PORT_CMD_MDIOADDR_GET(x) (((x) >> 16) & 0x1f) -#define FW_PORT_CMD_LPTXPAUSE (1U << 15) -#define FW_PORT_CMD_LPRXPAUSE (1U << 14) -#define FW_PORT_CMD_PTYPE_MASK 0x1f -#define FW_PORT_CMD_PTYPE_GET(x) (((x) >> 8) & FW_PORT_CMD_PTYPE_MASK) -#define FW_PORT_CMD_MODTYPE_MASK 0x1f -#define FW_PORT_CMD_MODTYPE_GET(x) (((x) >> 0) & FW_PORT_CMD_MODTYPE_MASK) - -#define FW_PORT_CMD_PPPEN(x) ((x) << 31) -#define FW_PORT_CMD_TPSRC(x) ((x) << 28) -#define FW_PORT_CMD_NCSISRC(x) ((x) << 24) - -#define FW_PORT_CMD_CH0(x) ((x) << 20) -#define FW_PORT_CMD_CH1(x) ((x) << 16) -#define FW_PORT_CMD_CH2(x) ((x) << 12) -#define FW_PORT_CMD_CH3(x) ((x) << 8) -#define FW_PORT_CMD_NCSICH(x) ((x) << 4) - -enum fw_port_type { - FW_PORT_TYPE_FIBER, - FW_PORT_TYPE_KX4, - FW_PORT_TYPE_BT_SGMII, - FW_PORT_TYPE_KX, - FW_PORT_TYPE_BT_XAUI, - FW_PORT_TYPE_KR, - FW_PORT_TYPE_CX4, - FW_PORT_TYPE_TWINAX, - - FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_MASK -}; - -enum fw_port_module_type { - FW_PORT_MOD_TYPE_NA, - FW_PORT_MOD_TYPE_LR, - FW_PORT_MOD_TYPE_SR, - FW_PORT_MOD_TYPE_ER, - - FW_PORT_MOD_TYPE_NONE = FW_PORT_CMD_MODTYPE_MASK -}; - -/* port stats */ -#define FW_NUM_PORT_STATS 50 -#define FW_NUM_PORT_TX_STATS 23 -#define FW_NUM_PORT_RX_STATS 27 - -enum fw_port_stats_tx_index { - FW_STAT_TX_PORT_BYTES_IX, - FW_STAT_TX_PORT_FRAMES_IX, - FW_STAT_TX_PORT_BCAST_IX, - FW_STAT_TX_PORT_MCAST_IX, - FW_STAT_TX_PORT_UCAST_IX, - FW_STAT_TX_PORT_ERROR_IX, - FW_STAT_TX_PORT_64B_IX, - FW_STAT_TX_PORT_65B_127B_IX, - FW_STAT_TX_PORT_128B_255B_IX, - FW_STAT_TX_PORT_256B_511B_IX, - FW_STAT_TX_PORT_512B_1023B_IX, - FW_STAT_TX_PORT_1024B_1518B_IX, - FW_STAT_TX_PORT_1519B_MAX_IX, - FW_STAT_TX_PORT_DROP_IX, - FW_STAT_TX_PORT_PAUSE_IX, - FW_STAT_TX_PORT_PPP0_IX, - FW_STAT_TX_PORT_PPP1_IX, - FW_STAT_TX_PORT_PPP2_IX, - FW_STAT_TX_PORT_PPP3_IX, - FW_STAT_TX_PORT_PPP4_IX, - FW_STAT_TX_PORT_PPP5_IX, - FW_STAT_TX_PORT_PPP6_IX, - FW_STAT_TX_PORT_PPP7_IX -}; - -enum fw_port_stat_rx_index { - FW_STAT_RX_PORT_BYTES_IX, - FW_STAT_RX_PORT_FRAMES_IX, - FW_STAT_RX_PORT_BCAST_IX, - FW_STAT_RX_PORT_MCAST_IX, - FW_STAT_RX_PORT_UCAST_IX, - FW_STAT_RX_PORT_MTU_ERROR_IX, - FW_STAT_RX_PORT_MTU_CRC_ERROR_IX, - FW_STAT_RX_PORT_CRC_ERROR_IX, - FW_STAT_RX_PORT_LEN_ERROR_IX, - FW_STAT_RX_PORT_SYM_ERROR_IX, - FW_STAT_RX_PORT_64B_IX, - FW_STAT_RX_PORT_65B_127B_IX, - FW_STAT_RX_PORT_128B_255B_IX, - FW_STAT_RX_PORT_256B_511B_IX, - FW_STAT_RX_PORT_512B_1023B_IX, - FW_STAT_RX_PORT_1024B_1518B_IX, - FW_STAT_RX_PORT_1519B_MAX_IX, - FW_STAT_RX_PORT_PAUSE_IX, - FW_STAT_RX_PORT_PPP0_IX, - FW_STAT_RX_PORT_PPP1_IX, - FW_STAT_RX_PORT_PPP2_IX, - FW_STAT_RX_PORT_PPP3_IX, - FW_STAT_RX_PORT_PPP4_IX, - FW_STAT_RX_PORT_PPP5_IX, - FW_STAT_RX_PORT_PPP6_IX, - FW_STAT_RX_PORT_PPP7_IX, - FW_STAT_RX_PORT_LESS_64B_IX -}; - -struct fw_port_stats_cmd { - __be32 op_to_portid; - __be32 retval_len16; - union fw_port_stats { - struct fw_port_stats_ctl { - u8 nstats_bg_bm; - u8 tx_ix; - __be16 r6; - __be32 r7; - __be64 stat0; - __be64 stat1; - __be64 stat2; - __be64 stat3; - __be64 stat4; - __be64 stat5; - } ctl; - struct fw_port_stats_all { - __be64 tx_bytes; - __be64 tx_frames; - __be64 tx_bcast; - __be64 tx_mcast; - __be64 tx_ucast; - __be64 tx_error; - __be64 tx_64b; - __be64 tx_65b_127b; - __be64 tx_128b_255b; - __be64 tx_256b_511b; - __be64 tx_512b_1023b; - __be64 tx_1024b_1518b; - __be64 tx_1519b_max; - __be64 tx_drop; - __be64 tx_pause; - __be64 tx_ppp0; - __be64 tx_ppp1; - __be64 tx_ppp2; - __be64 tx_ppp3; - __be64 tx_ppp4; - __be64 tx_ppp5; - __be64 tx_ppp6; - __be64 tx_ppp7; - __be64 rx_bytes; - __be64 rx_frames; - __be64 rx_bcast; - __be64 rx_mcast; - __be64 rx_ucast; - __be64 rx_mtu_error; - __be64 rx_mtu_crc_error; - __be64 rx_crc_error; - __be64 rx_len_error; - __be64 rx_sym_error; - __be64 rx_64b; - __be64 rx_65b_127b; - __be64 rx_128b_255b; - __be64 rx_256b_511b; - __be64 rx_512b_1023b; - __be64 rx_1024b_1518b; - __be64 rx_1519b_max; - __be64 rx_pause; - __be64 rx_ppp0; - __be64 rx_ppp1; - __be64 rx_ppp2; - __be64 rx_ppp3; - __be64 rx_ppp4; - __be64 rx_ppp5; - __be64 rx_ppp6; - __be64 rx_ppp7; - __be64 rx_less_64b; - __be64 rx_bg_drop; - __be64 rx_bg_trunc; - } all; - } u; -}; - -#define FW_PORT_STATS_CMD_NSTATS(x) ((x) << 4) -#define FW_PORT_STATS_CMD_BG_BM(x) ((x) << 0) -#define FW_PORT_STATS_CMD_TX(x) ((x) << 7) -#define FW_PORT_STATS_CMD_IX(x) ((x) << 0) - -/* port loopback stats */ -#define FW_NUM_LB_STATS 16 -enum fw_port_lb_stats_index { - FW_STAT_LB_PORT_BYTES_IX, - FW_STAT_LB_PORT_FRAMES_IX, - FW_STAT_LB_PORT_BCAST_IX, - FW_STAT_LB_PORT_MCAST_IX, - FW_STAT_LB_PORT_UCAST_IX, - FW_STAT_LB_PORT_ERROR_IX, - FW_STAT_LB_PORT_64B_IX, - FW_STAT_LB_PORT_65B_127B_IX, - FW_STAT_LB_PORT_128B_255B_IX, - FW_STAT_LB_PORT_256B_511B_IX, - FW_STAT_LB_PORT_512B_1023B_IX, - FW_STAT_LB_PORT_1024B_1518B_IX, - FW_STAT_LB_PORT_1519B_MAX_IX, - FW_STAT_LB_PORT_DROP_FRAMES_IX -}; - -struct fw_port_lb_stats_cmd { - __be32 op_to_lbport; - __be32 retval_len16; - union fw_port_lb_stats { - struct fw_port_lb_stats_ctl { - u8 nstats_bg_bm; - u8 ix_pkd; - __be16 r6; - __be32 r7; - __be64 stat0; - __be64 stat1; - __be64 stat2; - __be64 stat3; - __be64 stat4; - __be64 stat5; - } ctl; - struct fw_port_lb_stats_all { - __be64 tx_bytes; - __be64 tx_frames; - __be64 tx_bcast; - __be64 tx_mcast; - __be64 tx_ucast; - __be64 tx_error; - __be64 tx_64b; - __be64 tx_65b_127b; - __be64 tx_128b_255b; - __be64 tx_256b_511b; - __be64 tx_512b_1023b; - __be64 tx_1024b_1518b; - __be64 tx_1519b_max; - __be64 rx_lb_drop; - __be64 rx_lb_trunc; - } all; - } u; -}; - -#define FW_PORT_LB_STATS_CMD_LBPORT(x) ((x) << 0) -#define FW_PORT_LB_STATS_CMD_NSTATS(x) ((x) << 4) -#define FW_PORT_LB_STATS_CMD_BG_BM(x) ((x) << 0) -#define FW_PORT_LB_STATS_CMD_IX(x) ((x) << 0) - -struct fw_rss_ind_tbl_cmd { - __be32 op_to_viid; -#define FW_RSS_IND_TBL_CMD_VIID(x) ((x) << 0) - __be32 retval_len16; - __be16 niqid; - __be16 startidx; - __be32 r3; - __be32 iq0_to_iq2; -#define FW_RSS_IND_TBL_CMD_IQ0(x) ((x) << 20) -#define FW_RSS_IND_TBL_CMD_IQ1(x) ((x) << 10) -#define FW_RSS_IND_TBL_CMD_IQ2(x) ((x) << 0) - __be32 iq3_to_iq5; - __be32 iq6_to_iq8; - __be32 iq9_to_iq11; - __be32 iq12_to_iq14; - __be32 iq15_to_iq17; - __be32 iq18_to_iq20; - __be32 iq21_to_iq23; - __be32 iq24_to_iq26; - __be32 iq27_to_iq29; - __be32 iq30_iq31; - __be32 r15_lo; -}; - -struct fw_rss_glb_config_cmd { - __be32 op_to_write; - __be32 retval_len16; - union fw_rss_glb_config { - struct fw_rss_glb_config_manual { - __be32 mode_pkd; - __be32 r3; - __be64 r4; - __be64 r5; - } manual; - struct fw_rss_glb_config_basicvirtual { - __be32 mode_pkd; - __be32 synmapen_to_hashtoeplitz; -#define FW_RSS_GLB_CONFIG_CMD_SYNMAPEN (1U << 8) -#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 (1U << 7) -#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 (1U << 6) -#define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 (1U << 5) -#define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 (1U << 4) -#define FW_RSS_GLB_CONFIG_CMD_OFDMAPEN (1U << 3) -#define FW_RSS_GLB_CONFIG_CMD_TNLMAPEN (1U << 2) -#define FW_RSS_GLB_CONFIG_CMD_TNLALLLKP (1U << 1) -#define FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ (1U << 0) - __be64 r8; - __be64 r9; - } basicvirtual; - } u; -}; - -#define FW_RSS_GLB_CONFIG_CMD_MODE(x) ((x) << 28) - -#define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0 -#define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1 - -struct fw_rss_vi_config_cmd { - __be32 op_to_viid; -#define FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << 0) - __be32 retval_len16; - union fw_rss_vi_config { - struct fw_rss_vi_config_manual { - __be64 r3; - __be64 r4; - __be64 r5; - } manual; - struct fw_rss_vi_config_basicvirtual { - __be32 r6; - __be32 defaultq_to_ip4udpen; -#define FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) ((x) << 16) -#define FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN (1U << 4) -#define FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN (1U << 3) -#define FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN (1U << 2) -#define FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN (1U << 1) -#define FW_RSS_VI_CONFIG_CMD_IP4UDPEN (1U << 0) - __be64 r9; - __be64 r10; - } basicvirtual; - } u; -}; - -enum fw_error_type { - FW_ERROR_TYPE_EXCEPTION = 0x0, - FW_ERROR_TYPE_HWMODULE = 0x1, - FW_ERROR_TYPE_WR = 0x2, - FW_ERROR_TYPE_ACL = 0x3, -}; - -struct fw_error_cmd { - __be32 op_to_type; - __be32 len16_pkd; - union fw_error { - struct fw_error_exception { - __be32 info[6]; - } exception; - struct fw_error_hwmodule { - __be32 regaddr; - __be32 regval; - } hwmodule; - struct fw_error_wr { - __be16 cidx; - __be16 pfn_vfn; - __be32 eqid; - u8 wrhdr[16]; - } wr; - struct fw_error_acl { - __be16 cidx; - __be16 pfn_vfn; - __be32 eqid; - __be16 mv_pkd; - u8 val[6]; - __be64 r4; - } acl; - } u; -}; - -struct fw_debug_cmd { - __be32 op_type; -#define FW_DEBUG_CMD_TYPE_GET(x) ((x) & 0xff) - __be32 len16_pkd; - union fw_debug { - struct fw_debug_assert { - __be32 fcid; - __be32 line; - __be32 x; - __be32 y; - u8 filename_0_7[8]; - u8 filename_8_15[8]; - __be64 r3; - } assert; - struct fw_debug_prt { - __be16 dprtstridx; - __be16 r3[3]; - __be32 dprtstrparam0; - __be32 dprtstrparam1; - __be32 dprtstrparam2; - __be32 dprtstrparam3; - } prt; - } u; -}; - -struct fw_hdr { - u8 ver; - u8 reserved1; - __be16 len512; /* bin length in units of 512-bytes */ - __be32 fw_ver; /* firmware version */ - __be32 tp_microcode_ver; - u8 intfver_nic; - u8 intfver_vnic; - u8 intfver_ofld; - u8 intfver_ri; - u8 intfver_iscsipdu; - u8 intfver_iscsi; - u8 intfver_fcoe; - u8 reserved2; - __be32 reserved3[27]; -}; - -#define FW_HDR_FW_VER_MAJOR_GET(x) (((x) >> 24) & 0xff) -#define FW_HDR_FW_VER_MINOR_GET(x) (((x) >> 16) & 0xff) -#define FW_HDR_FW_VER_MICRO_GET(x) (((x) >> 8) & 0xff) -#define FW_HDR_FW_VER_BUILD_GET(x) (((x) >> 0) & 0xff) -#endif /* _T4FW_INTERFACE_H_ */ diff --git a/trunk/drivers/net/dm9000.c b/trunk/drivers/net/dm9000.c index 7f9960f718e3..1c67f1138ca7 100644 --- a/trunk/drivers/net/dm9000.c +++ b/trunk/drivers/net/dm9000.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/e1000e/ethtool.c b/trunk/drivers/net/e1000e/ethtool.c index 983493f2330c..b33e3cbe9ab0 100644 --- a/trunk/drivers/net/e1000e/ethtool.c +++ b/trunk/drivers/net/e1000e/ethtool.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "e1000.h" diff --git a/trunk/drivers/net/e1000e/netdev.c b/trunk/drivers/net/e1000e/netdev.c index cfd09cea7214..e1cceb606576 100644 --- a/trunk/drivers/net/e1000e/netdev.c +++ b/trunk/drivers/net/e1000e/netdev.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/eepro.c b/trunk/drivers/net/eepro.c index 27c7bdbfa003..1b05bdf62c3c 100644 --- a/trunk/drivers/net/eepro.c +++ b/trunk/drivers/net/eepro.c @@ -137,6 +137,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/eexpress.c b/trunk/drivers/net/eexpress.c index 1a7322b80ea7..7013dc8a6cbc 100644 --- a/trunk/drivers/net/eexpress.c +++ b/trunk/drivers/net/eexpress.c @@ -111,6 +111,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ehea/ehea_main.c b/trunk/drivers/net/ehea/ehea_main.c index 809ccc9ff09c..b004eaba3d7b 100644 --- a/trunk/drivers/net/ehea/ehea_main.c +++ b/trunk/drivers/net/ehea/ehea_main.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ehea/ehea_qmr.c b/trunk/drivers/net/ehea/ehea_qmr.c index a1b4c7e56367..18d405f78c0f 100644 --- a/trunk/drivers/net/ehea/ehea_qmr.c +++ b/trunk/drivers/net/ehea/ehea_qmr.c @@ -27,7 +27,6 @@ */ #include -#include #include "ehea.h" #include "ehea_phyp.h" #include "ehea_qmr.h" diff --git a/trunk/drivers/net/enc28j60.c b/trunk/drivers/net/enc28j60.c index ff27f728fd9d..3ee32e58c7ec 100644 --- a/trunk/drivers/net/enc28j60.c +++ b/trunk/drivers/net/enc28j60.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/enic/vnic_dev.c b/trunk/drivers/net/enic/vnic_dev.c index cf22de71014e..69b9b70c7da0 100644 --- a/trunk/drivers/net/enic/vnic_dev.c +++ b/trunk/drivers/net/enic/vnic_dev.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "vnic_resource.h" #include "vnic_devcmd.h" diff --git a/trunk/drivers/net/enic/vnic_rq.c b/trunk/drivers/net/enic/vnic_rq.c index e186efaf9da1..75583978a5e5 100644 --- a/trunk/drivers/net/enic/vnic_rq.c +++ b/trunk/drivers/net/enic/vnic_rq.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "vnic_dev.h" #include "vnic_rq.h" diff --git a/trunk/drivers/net/enic/vnic_wq.c b/trunk/drivers/net/enic/vnic_wq.c index d5f984357f5c..d2e00e51b7b5 100644 --- a/trunk/drivers/net/enic/vnic_wq.c +++ b/trunk/drivers/net/enic/vnic_wq.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "vnic_dev.h" #include "vnic_wq.h" diff --git a/trunk/drivers/net/epic100.c b/trunk/drivers/net/epic100.c index 7a567201e829..39c271b6be44 100644 --- a/trunk/drivers/net/epic100.c +++ b/trunk/drivers/net/epic100.c @@ -73,6 +73,7 @@ static int rx_copybreak; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/eql.c b/trunk/drivers/net/eql.c index b34a2ddeef4c..f5b96cadeb25 100644 --- a/trunk/drivers/net/eql.c +++ b/trunk/drivers/net/eql.c @@ -115,7 +115,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/eth16i.c b/trunk/drivers/net/eth16i.c index d4e24f08b3ba..d3abeee3f110 100644 --- a/trunk/drivers/net/eth16i.c +++ b/trunk/drivers/net/eth16i.c @@ -152,6 +152,7 @@ static char *version = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ethoc.c b/trunk/drivers/net/ethoc.c index a8d92503226e..209742304e20 100644 --- a/trunk/drivers/net/ethoc.c +++ b/trunk/drivers/net/ethoc.c @@ -18,7 +18,6 @@ #include #include #include -#include #include static int buffer_size = 0x8000; /* 32 KBytes */ diff --git a/trunk/drivers/net/fealnx.c b/trunk/drivers/net/fealnx.c index d11ae5197f01..9d5ad08a119f 100644 --- a/trunk/drivers/net/fealnx.c +++ b/trunk/drivers/net/fealnx.c @@ -74,6 +74,7 @@ static int full_duplex[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/fec_mpc52xx.c b/trunk/drivers/net/fec_mpc52xx.c index 4a43e56b7394..0dbd7219bbde 100644 --- a/trunk/drivers/net/fec_mpc52xx.c +++ b/trunk/drivers/net/fec_mpc52xx.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/fec_mpc52xx_phy.c b/trunk/drivers/net/fec_mpc52xx_phy.c index 7658a082e390..ee0f3c6d3f88 100644 --- a/trunk/drivers/net/fec_mpc52xx_phy.c +++ b/trunk/drivers/net/fec_mpc52xx_phy.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/forcedeth.c b/trunk/drivers/net/forcedeth.c index 73b260c3c654..ca05e5662029 100644 --- a/trunk/drivers/net/forcedeth.c +++ b/trunk/drivers/net/forcedeth.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/fs_enet/mac-fcc.c b/trunk/drivers/net/fs_enet/mac-fcc.c index 0a973e71876b..cf4f674f9e2e 100644 --- a/trunk/drivers/net/fs_enet/mac-fcc.c +++ b/trunk/drivers/net/fs_enet/mac-fcc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/fs_enet/mac-fec.c b/trunk/drivers/net/fs_enet/mac-fec.c index ec81f50d5919..cd2c6cca5f24 100644 --- a/trunk/drivers/net/fs_enet/mac-fec.c +++ b/trunk/drivers/net/fs_enet/mac-fec.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/fs_enet/mac-scc.c b/trunk/drivers/net/fs_enet/mac-scc.c index 34d3da751eb4..c490a466cae1 100644 --- a/trunk/drivers/net/fs_enet/mac-scc.c +++ b/trunk/drivers/net/fs_enet/mac-scc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/gianfar.c b/trunk/drivers/net/gianfar.c index 080d1cea5b26..669de028d44f 100644 --- a/trunk/drivers/net/gianfar.c +++ b/trunk/drivers/net/gianfar.c @@ -676,7 +676,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) priv->rx_queue[i] = NULL; for (i = 0; i < priv->num_tx_queues; i++) { - priv->tx_queue[i] = (struct gfar_priv_tx_q *)kzalloc( + priv->tx_queue[i] = (struct gfar_priv_tx_q *)kmalloc( sizeof (struct gfar_priv_tx_q), GFP_KERNEL); if (!priv->tx_queue[i]) { err = -ENOMEM; @@ -689,7 +689,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) } for (i = 0; i < priv->num_rx_queues; i++) { - priv->rx_queue[i] = (struct gfar_priv_rx_q *)kzalloc( + priv->rx_queue[i] = (struct gfar_priv_rx_q *)kmalloc( sizeof (struct gfar_priv_rx_q), GFP_KERNEL); if (!priv->rx_queue[i]) { err = -ENOMEM; @@ -1120,10 +1120,10 @@ static int gfar_probe(struct of_device *ofdev, /* provided which set of benchmarks. */ printk(KERN_INFO "%s: Running with NAPI enabled\n", dev->name); for (i = 0; i < priv->num_rx_queues; i++) - printk(KERN_INFO "%s: RX BD ring size for Q[%d]: %d\n", + printk(KERN_INFO "%s: :RX BD ring size for Q[%d]: %d\n", dev->name, i, priv->rx_queue[i]->rx_ring_size); for(i = 0; i < priv->num_tx_queues; i++) - printk(KERN_INFO "%s: TX BD ring size for Q[%d]: %d\n", + printk(KERN_INFO "%s:TX BD ring size for Q[%d]: %d\n", dev->name, i, priv->tx_queue[i]->tx_ring_size); return 0; @@ -1638,13 +1638,13 @@ static void free_skb_resources(struct gfar_private *priv) /* Go through all the buffer descriptors and free their data buffers */ for (i = 0; i < priv->num_tx_queues; i++) { tx_queue = priv->tx_queue[i]; - if(tx_queue->tx_skbuff) + if(!tx_queue->tx_skbuff) free_skb_tx_queue(tx_queue); } for (i = 0; i < priv->num_rx_queues; i++) { rx_queue = priv->rx_queue[i]; - if(rx_queue->rx_skbuff) + if(!rx_queue->rx_skbuff) free_skb_rx_queue(rx_queue); } diff --git a/trunk/drivers/net/gianfar_ethtool.c b/trunk/drivers/net/gianfar_ethtool.c index 9bda023c0235..1010367695e4 100644 --- a/trunk/drivers/net/gianfar_ethtool.c +++ b/trunk/drivers/net/gianfar_ethtool.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/gianfar_sysfs.c b/trunk/drivers/net/gianfar_sysfs.c index 64f4094ac7f1..b98c6c512299 100644 --- a/trunk/drivers/net/gianfar_sysfs.c +++ b/trunk/drivers/net/gianfar_sysfs.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/greth.c b/trunk/drivers/net/greth.c index 3a90430de918..2b9c1cbc9ec1 100644 --- a/trunk/drivers/net/greth.c +++ b/trunk/drivers/net/greth.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/hamachi.c b/trunk/drivers/net/hamachi.c index 5d6f13879592..373546dd0831 100644 --- a/trunk/drivers/net/hamachi.c +++ b/trunk/drivers/net/hamachi.c @@ -153,6 +153,7 @@ static int tx_params[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/hamradio/6pack.c b/trunk/drivers/net/hamradio/6pack.c index 4b52c767ad05..689b9bd377a5 100644 --- a/trunk/drivers/net/hamradio/6pack.c +++ b/trunk/drivers/net/hamradio/6pack.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/hamradio/bpqether.c b/trunk/drivers/net/hamradio/bpqether.c index 14f01d156db9..bdadf3e23c94 100644 --- a/trunk/drivers/net/hamradio/bpqether.c +++ b/trunk/drivers/net/hamradio/bpqether.c @@ -61,7 +61,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/hamradio/dmascc.c b/trunk/drivers/net/hamradio/dmascc.c index 52b14256e2c0..9ee76b42668f 100644 --- a/trunk/drivers/net/hamradio/dmascc.c +++ b/trunk/drivers/net/hamradio/dmascc.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/hamradio/hdlcdrv.c b/trunk/drivers/net/hamradio/hdlcdrv.c index b8bdf9d51cd4..91c5790c9581 100644 --- a/trunk/drivers/net/hamradio/hdlcdrv.c +++ b/trunk/drivers/net/hamradio/hdlcdrv.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/hamradio/mkiss.c b/trunk/drivers/net/hamradio/mkiss.c index 66e88bd59caa..7db0a1c3216c 100644 --- a/trunk/drivers/net/hamradio/mkiss.c +++ b/trunk/drivers/net/hamradio/mkiss.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/hamradio/scc.c b/trunk/drivers/net/hamradio/scc.c index f3a96b843911..35c936175bba 100644 --- a/trunk/drivers/net/hamradio/scc.c +++ b/trunk/drivers/net/hamradio/scc.c @@ -158,6 +158,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/hp100.c b/trunk/drivers/net/hp100.c index 4daad8cd56ea..b766a69bf0ca 100644 --- a/trunk/drivers/net/hp100.c +++ b/trunk/drivers/net/hp100.c @@ -102,6 +102,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/hplance.c b/trunk/drivers/net/hplance.c index b6060f7538df..3e3528ade259 100644 --- a/trunk/drivers/net/hplance.c +++ b/trunk/drivers/net/hplance.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/hydra.c b/trunk/drivers/net/hydra.c index 24724b4ad709..d496b6f4a478 100644 --- a/trunk/drivers/net/hydra.c +++ b/trunk/drivers/net/hydra.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ibm_newemac/core.c b/trunk/drivers/net/ibm_newemac/core.c index dd873cc41c2b..fb0ac6d7c040 100644 --- a/trunk/drivers/net/ibm_newemac/core.c +++ b/trunk/drivers/net/ibm_newemac/core.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ibm_newemac/core.h b/trunk/drivers/net/ibm_newemac/core.h index b1cbe6fdfc7a..18d56c6c4238 100644 --- a/trunk/drivers/net/ibm_newemac/core.h +++ b/trunk/drivers/net/ibm_newemac/core.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ibm_newemac/mal.c b/trunk/drivers/net/ibm_newemac/mal.c index 5b3d94419fe6..2a2fc17b2878 100644 --- a/trunk/drivers/net/ibm_newemac/mal.c +++ b/trunk/drivers/net/ibm_newemac/mal.c @@ -26,7 +26,6 @@ */ #include -#include #include "core.h" #include diff --git a/trunk/drivers/net/ibm_newemac/rgmii.c b/trunk/drivers/net/ibm_newemac/rgmii.c index 5b90d34c8455..8d76cb89dbd6 100644 --- a/trunk/drivers/net/ibm_newemac/rgmii.c +++ b/trunk/drivers/net/ibm_newemac/rgmii.c @@ -21,7 +21,6 @@ * option) any later version. * */ -#include #include #include #include diff --git a/trunk/drivers/net/ibm_newemac/zmii.c b/trunk/drivers/net/ibm_newemac/zmii.c index 1f038f808ab3..17b154124943 100644 --- a/trunk/drivers/net/ibm_newemac/zmii.c +++ b/trunk/drivers/net/ibm_newemac/zmii.c @@ -21,7 +21,6 @@ * option) any later version. * */ -#include #include #include #include diff --git a/trunk/drivers/net/ibmlana.c b/trunk/drivers/net/ibmlana.c index 7d6cf3340c11..b5d0f4e973f7 100644 --- a/trunk/drivers/net/ibmlana.c +++ b/trunk/drivers/net/ibmlana.c @@ -79,6 +79,7 @@ special acknowledgements to: #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ibmveth.c b/trunk/drivers/net/ibmveth.c index cd508a8ee25b..0bc777bac9b4 100644 --- a/trunk/drivers/net/ibmveth.c +++ b/trunk/drivers/net/ibmveth.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/igb/e1000_82575.c b/trunk/drivers/net/igb/e1000_82575.c index 4a32bed77c71..0bc990ec4a8e 100644 --- a/trunk/drivers/net/igb/e1000_82575.c +++ b/trunk/drivers/net/igb/e1000_82575.c @@ -30,6 +30,7 @@ */ #include +#include #include #include "e1000_mac.h" diff --git a/trunk/drivers/net/igb/igb_ethtool.c b/trunk/drivers/net/igb/igb_ethtool.c index d313fae992da..a4cead12fd98 100644 --- a/trunk/drivers/net/igb/igb_ethtool.c +++ b/trunk/drivers/net/igb/igb_ethtool.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "igb.h" diff --git a/trunk/drivers/net/igb/igb_main.c b/trunk/drivers/net/igb/igb_main.c index 9b3c51ab1758..01c65c7447e1 100644 --- a/trunk/drivers/net/igb/igb_main.c +++ b/trunk/drivers/net/igb/igb_main.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/igbvf/netdev.c b/trunk/drivers/net/igbvf/netdev.c index 1b1edad1eb5e..b41037ed8083 100644 --- a/trunk/drivers/net/igbvf/netdev.c +++ b/trunk/drivers/net/igbvf/netdev.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ioc3-eth.c b/trunk/drivers/net/ioc3-eth.c index 8f6197d647c0..70871b9b045a 100644 --- a/trunk/drivers/net/ioc3-eth.c +++ b/trunk/drivers/net/ioc3-eth.c @@ -44,7 +44,6 @@ #include #include #include -#include #ifdef CONFIG_SERIAL_8250 #include diff --git a/trunk/drivers/net/ipg.c b/trunk/drivers/net/ipg.c index 639bf9fb0279..150415e83f61 100644 --- a/trunk/drivers/net/ipg.c +++ b/trunk/drivers/net/ipg.c @@ -22,7 +22,6 @@ */ #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/ali-ircc.c b/trunk/drivers/net/irda/ali-ircc.c index 28992c815cba..12c7b006f767 100644 --- a/trunk/drivers/net/irda/ali-ircc.c +++ b/trunk/drivers/net/irda/ali-ircc.c @@ -22,7 +22,6 @@ ********************************************************************/ #include -#include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/irda/bfin_sir.h b/trunk/drivers/net/irda/bfin_sir.h index b54a6f08db45..dac71b1f4f9b 100644 --- a/trunk/drivers/net/irda/bfin_sir.h +++ b/trunk/drivers/net/irda/bfin_sir.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/irtty-sir.c b/trunk/drivers/net/irda/irtty-sir.c index ee1dde52e8fc..20f9bc626688 100644 --- a/trunk/drivers/net/irda/irtty-sir.c +++ b/trunk/drivers/net/irda/irtty-sir.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/irda/nsc-ircc.c b/trunk/drivers/net/irda/nsc-ircc.c index e30cdbb14745..2413295ebd90 100644 --- a/trunk/drivers/net/irda/nsc-ircc.c +++ b/trunk/drivers/net/irda/nsc-ircc.c @@ -43,7 +43,6 @@ ********************************************************************/ #include -#include #include #include @@ -51,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/irda/pxaficp_ir.c b/trunk/drivers/net/irda/pxaficp_ir.c index 1a54f6bb68c5..84db145d2b59 100644 --- a/trunk/drivers/net/irda/pxaficp_ir.c +++ b/trunk/drivers/net/irda/pxaficp_ir.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/sh_sir.c b/trunk/drivers/net/irda/sh_sir.c index 0745581c4b5e..d7c983dc91ad 100644 --- a/trunk/drivers/net/irda/sh_sir.c +++ b/trunk/drivers/net/irda/sh_sir.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/irda/sir_dev.c b/trunk/drivers/net/irda/sir_dev.c index de91cd14016b..4b2a1a9eac2a 100644 --- a/trunk/drivers/net/irda/sir_dev.c +++ b/trunk/drivers/net/irda/sir_dev.c @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/smsc-ircc2.c b/trunk/drivers/net/irda/smsc-ircc2.c index 6af84d88cd03..8f7d0d146f24 100644 --- a/trunk/drivers/net/irda/smsc-ircc2.c +++ b/trunk/drivers/net/irda/smsc-ircc2.c @@ -48,13 +48,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/via-ircc.c b/trunk/drivers/net/irda/via-ircc.c index b0a6cd815be1..6533c010cf5c 100644 --- a/trunk/drivers/net/irda/via-ircc.c +++ b/trunk/drivers/net/irda/via-ircc.c @@ -45,11 +45,11 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177. #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/irda/w83977af_ir.c b/trunk/drivers/net/irda/w83977af_ir.c index cb0cb758be64..980625feb2c0 100644 --- a/trunk/drivers/net/irda/w83977af_ir.c +++ b/trunk/drivers/net/irda/w83977af_ir.c @@ -46,10 +46,10 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/iseries_veth.c b/trunk/drivers/net/iseries_veth.c index 773c59c89691..e6e972d9b7ca 100644 --- a/trunk/drivers/net/iseries_veth.c +++ b/trunk/drivers/net/iseries_veth.c @@ -69,7 +69,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ixgbe/ixgbe_ethtool.c b/trunk/drivers/net/ixgbe/ixgbe_ethtool.c index 8f461d5cee77..1959ef76c962 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/trunk/drivers/net/ixgbe/ixgbe_ethtool.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ixgbe/ixgbe_fcoe.c b/trunk/drivers/net/ixgbe/ixgbe_fcoe.c index 6493049b663d..9276d5965b0d 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/trunk/drivers/net/ixgbe/ixgbe_fcoe.c @@ -31,7 +31,6 @@ #include "ixgbe_dcb_82599.h" #endif /* CONFIG_IXGBE_DCB */ #include -#include #include #include #include diff --git a/trunk/drivers/net/ixgbe/ixgbe_main.c b/trunk/drivers/net/ixgbe/ixgbe_main.c index 8f677cb86290..0c553f6cb534 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_main.c +++ b/trunk/drivers/net/ixgbe/ixgbe_main.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ixgbevf/ethtool.c b/trunk/drivers/net/ixgbevf/ethtool.c index 4680b069b84f..6fdd651abcd1 100644 --- a/trunk/drivers/net/ixgbevf/ethtool.c +++ b/trunk/drivers/net/ixgbevf/ethtool.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ixgbevf/ixgbevf_main.c b/trunk/drivers/net/ixgbevf/ixgbevf_main.c index 0cd6202dfacc..1bbbef3ee3f4 100644 --- a/trunk/drivers/net/ixgbevf/ixgbevf_main.c +++ b/trunk/drivers/net/ixgbevf/ixgbevf_main.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ixp2000/ixpdev.c b/trunk/drivers/net/ixp2000/ixpdev.c index d5932ca3e27d..e9d9d595e1b7 100644 --- a/trunk/drivers/net/ixp2000/ixpdev.c +++ b/trunk/drivers/net/ixp2000/ixpdev.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include "ixp2400_rx.ucode" diff --git a/trunk/drivers/net/jazzsonic.c b/trunk/drivers/net/jazzsonic.c index 3e6aaf9e5ce7..f47d4d663b19 100644 --- a/trunk/drivers/net/jazzsonic.c +++ b/trunk/drivers/net/jazzsonic.c @@ -22,11 +22,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/jme.c b/trunk/drivers/net/jme.c index b705ad3a53a7..c0b59a555384 100644 --- a/trunk/drivers/net/jme.c +++ b/trunk/drivers/net/jme.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "jme.h" diff --git a/trunk/drivers/net/ks8851_mll.c b/trunk/drivers/net/ks8851_mll.c index 6354ab3a45a6..84b0e15831f9 100644 --- a/trunk/drivers/net/ks8851_mll.c +++ b/trunk/drivers/net/ks8851_mll.c @@ -31,7 +31,6 @@ #include #include #include -#include #define DRV_NAME "ks8851_mll" diff --git a/trunk/drivers/net/ksz884x.c b/trunk/drivers/net/ksz884x.c index 0606a1f359fb..6c5327af1bf9 100644 --- a/trunk/drivers/net/ksz884x.c +++ b/trunk/drivers/net/ksz884x.c @@ -30,7 +30,6 @@ #include #include #include -#include /* DMA Registers */ diff --git a/trunk/drivers/net/lasi_82596.c b/trunk/drivers/net/lasi_82596.c index 6eba352c52e0..b77238dbafb8 100644 --- a/trunk/drivers/net/lasi_82596.c +++ b/trunk/drivers/net/lasi_82596.c @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/lib82596.c b/trunk/drivers/net/lib82596.c index 973390b82ec2..443c39a3732f 100644 --- a/trunk/drivers/net/lib82596.c +++ b/trunk/drivers/net/lib82596.c @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -84,7 +85,6 @@ #include #include #include -#include /* DEBUG flags */ diff --git a/trunk/drivers/net/ll_temac_main.c b/trunk/drivers/net/ll_temac_main.c index ba617e3cf1bb..a18e3485476e 100644 --- a/trunk/drivers/net/ll_temac_main.c +++ b/trunk/drivers/net/ll_temac_main.c @@ -49,7 +49,6 @@ #include #include #include -#include #include "ll_temac.h" diff --git a/trunk/drivers/net/ll_temac_mdio.c b/trunk/drivers/net/ll_temac_mdio.c index 5ae28c975b38..da0e462308d5 100644 --- a/trunk/drivers/net/ll_temac_mdio.c +++ b/trunk/drivers/net/ll_temac_mdio.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include "ll_temac.h" diff --git a/trunk/drivers/net/mac8390.c b/trunk/drivers/net/mac8390.c index c8e68fde0664..a8768672dc5a 100644 --- a/trunk/drivers/net/mac8390.c +++ b/trunk/drivers/net/mac8390.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/mac89x0.c b/trunk/drivers/net/mac89x0.c index c0876e915eed..c292a608f9a9 100644 --- a/trunk/drivers/net/mac89x0.c +++ b/trunk/drivers/net/mac89x0.c @@ -88,6 +88,7 @@ static char *version = #include #include #include +#include #include #include #include @@ -97,7 +98,6 @@ static char *version = #include #include #include -#include #include #include diff --git a/trunk/drivers/net/mace.c b/trunk/drivers/net/mace.c index 962c41d0c8df..ab5f0bf6d1ae 100644 --- a/trunk/drivers/net/mace.c +++ b/trunk/drivers/net/mace.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/macmace.c b/trunk/drivers/net/macmace.c index 52e9a51c4c4f..13ba8f4afb7e 100644 --- a/trunk/drivers/net/macmace.c +++ b/trunk/drivers/net/macmace.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/macsonic.c b/trunk/drivers/net/macsonic.c index adb54fe2d82a..24109c288108 100644 --- a/trunk/drivers/net/macsonic.c +++ b/trunk/drivers/net/macsonic.c @@ -35,11 +35,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/macvtap.c b/trunk/drivers/net/macvtap.c index abba3cc81f12..55ceae09738e 100644 --- a/trunk/drivers/net/macvtap.c +++ b/trunk/drivers/net/macvtap.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/mlx4/cmd.c b/trunk/drivers/net/mlx4/cmd.c index 23cee7b6af91..65ec77dc31f5 100644 --- a/trunk/drivers/net/mlx4/cmd.c +++ b/trunk/drivers/net/mlx4/cmd.c @@ -33,7 +33,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/cq.c b/trunk/drivers/net/mlx4/cq.c index 7cd34e9c7c7e..ccfe276943f0 100644 --- a/trunk/drivers/net/mlx4/cq.c +++ b/trunk/drivers/net/mlx4/cq.c @@ -35,7 +35,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/en_main.c b/trunk/drivers/net/mlx4/en_main.c index cbabf14f95d0..507e11fce9ed 100644 --- a/trunk/drivers/net/mlx4/en_main.c +++ b/trunk/drivers/net/mlx4/en_main.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/en_netdev.c b/trunk/drivers/net/mlx4/en_netdev.c index 73c3d20c6453..c48b0f4b17b7 100644 --- a/trunk/drivers/net/mlx4/en_netdev.c +++ b/trunk/drivers/net/mlx4/en_netdev.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/en_resources.c b/trunk/drivers/net/mlx4/en_resources.c index 0dfb4ec8a9dd..16256784a943 100644 --- a/trunk/drivers/net/mlx4/en_resources.c +++ b/trunk/drivers/net/mlx4/en_resources.c @@ -31,7 +31,6 @@ * */ -#include #include #include diff --git a/trunk/drivers/net/mlx4/en_rx.c b/trunk/drivers/net/mlx4/en_rx.c index 8e2fcb7103c3..64394647dddc 100644 --- a/trunk/drivers/net/mlx4/en_rx.c +++ b/trunk/drivers/net/mlx4/en_rx.c @@ -32,7 +32,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/mlx4/en_tx.c b/trunk/drivers/net/mlx4/en_tx.c index 580968f304eb..3d1396af9462 100644 --- a/trunk/drivers/net/mlx4/en_tx.c +++ b/trunk/drivers/net/mlx4/en_tx.c @@ -33,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/mlx4/eq.c b/trunk/drivers/net/mlx4/eq.c index 7365bf488b81..bffb7995cb70 100644 --- a/trunk/drivers/net/mlx4/eq.c +++ b/trunk/drivers/net/mlx4/eq.c @@ -32,7 +32,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/icm.c b/trunk/drivers/net/mlx4/icm.c index 57288ca1395f..04b382fcb8c8 100644 --- a/trunk/drivers/net/mlx4/icm.c +++ b/trunk/drivers/net/mlx4/icm.c @@ -34,7 +34,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/mlx4/intf.c b/trunk/drivers/net/mlx4/intf.c index 555067802751..0e7eb1038f9f 100644 --- a/trunk/drivers/net/mlx4/intf.c +++ b/trunk/drivers/net/mlx4/intf.c @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include "mlx4.h" struct mlx4_device_context { diff --git a/trunk/drivers/net/mlx4/main.c b/trunk/drivers/net/mlx4/main.c index e3e0d54a7c87..b402a95c87c7 100644 --- a/trunk/drivers/net/mlx4/main.c +++ b/trunk/drivers/net/mlx4/main.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/mlx4/mcg.c b/trunk/drivers/net/mlx4/mcg.c index c4f88b7ef7b6..5ccbce9866fe 100644 --- a/trunk/drivers/net/mlx4/mcg.c +++ b/trunk/drivers/net/mlx4/mcg.c @@ -32,6 +32,7 @@ */ #include +#include #include diff --git a/trunk/drivers/net/mlx4/mr.c b/trunk/drivers/net/mlx4/mr.c index 3dc69be4949f..ca7ab8e7b4cc 100644 --- a/trunk/drivers/net/mlx4/mr.c +++ b/trunk/drivers/net/mlx4/mr.c @@ -33,7 +33,6 @@ */ #include -#include #include diff --git a/trunk/drivers/net/mlx4/profile.c b/trunk/drivers/net/mlx4/profile.c index 5caf0115fa5b..ca25b9dc8378 100644 --- a/trunk/drivers/net/mlx4/profile.c +++ b/trunk/drivers/net/mlx4/profile.c @@ -32,8 +32,6 @@ * SOFTWARE. */ -#include - #include "mlx4.h" #include "fw.h" diff --git a/trunk/drivers/net/mlx4/qp.c b/trunk/drivers/net/mlx4/qp.c index ec9350e5f21a..42ab9fc01d3e 100644 --- a/trunk/drivers/net/mlx4/qp.c +++ b/trunk/drivers/net/mlx4/qp.c @@ -33,7 +33,6 @@ * SOFTWARE. */ -#include #include #include diff --git a/trunk/drivers/net/mlx4/srq.c b/trunk/drivers/net/mlx4/srq.c index 3b07b80a0456..1377d0dc8f1f 100644 --- a/trunk/drivers/net/mlx4/srq.c +++ b/trunk/drivers/net/mlx4/srq.c @@ -32,7 +32,6 @@ */ #include -#include #include "mlx4.h" #include "icm.h" diff --git a/trunk/drivers/net/mv643xx_eth.c b/trunk/drivers/net/mv643xx_eth.c index 8613a52ddf17..c97b6e4365a9 100644 --- a/trunk/drivers/net/mv643xx_eth.c +++ b/trunk/drivers/net/mv643xx_eth.c @@ -54,7 +54,6 @@ #include #include #include -#include #include static char mv643xx_eth_driver_name[] = "mv643xx_eth"; diff --git a/trunk/drivers/net/mvme147.c b/trunk/drivers/net/mvme147.c index 3a7ad840d5b5..93c709d63e2f 100644 --- a/trunk/drivers/net/mvme147.c +++ b/trunk/drivers/net/mvme147.c @@ -10,11 +10,11 @@ #include #include #include +#include #include #include #include #include -#include /* Used for the temporal inet entries and routing */ #include #include diff --git a/trunk/drivers/net/myri10ge/myri10ge.c b/trunk/drivers/net/myri10ge/myri10ge.c index 471887742b02..e84dd3ee9c5a 100644 --- a/trunk/drivers/net/myri10ge/myri10ge.c +++ b/trunk/drivers/net/myri10ge/myri10ge.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/myri_sbus.c b/trunk/drivers/net/myri_sbus.c index b72e749afdf1..8b4313085359 100644 --- a/trunk/drivers/net/myri_sbus.c +++ b/trunk/drivers/net/myri_sbus.c @@ -14,6 +14,7 @@ static char version[] = #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ static char version[] = #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ne2.c b/trunk/drivers/net/ne2.c index ff3c4c814988..a53bb201d3c7 100644 --- a/trunk/drivers/net/ne2.c +++ b/trunk/drivers/net/ne2.c @@ -66,6 +66,7 @@ static const char *version = "ne2.c:v0.91 Nov 16 1998 Wim Dumon #include #include +#include #include #include #include diff --git a/trunk/drivers/net/netconsole.c b/trunk/drivers/net/netconsole.c index a361dea35574..bf4af5248cb7 100644 --- a/trunk/drivers/net/netconsole.c +++ b/trunk/drivers/net/netconsole.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/netxen/netxen_nic_hw.c b/trunk/drivers/net/netxen/netxen_nic_hw.c index b1cf46a0c48c..a945591298a8 100644 --- a/trunk/drivers/net/netxen/netxen_nic_hw.c +++ b/trunk/drivers/net/netxen/netxen_nic_hw.c @@ -23,7 +23,6 @@ * */ -#include #include "netxen_nic.h" #include "netxen_nic_hw.h" diff --git a/trunk/drivers/net/netxen/netxen_nic_init.c b/trunk/drivers/net/netxen/netxen_nic_init.c index 02876f59cbb2..7eb925a9f36e 100644 --- a/trunk/drivers/net/netxen/netxen_nic_init.c +++ b/trunk/drivers/net/netxen/netxen_nic_init.c @@ -25,7 +25,6 @@ #include #include -#include #include "netxen_nic.h" #include "netxen_nic_hw.h" diff --git a/trunk/drivers/net/netxen/netxen_nic_main.c b/trunk/drivers/net/netxen/netxen_nic_main.c index ce838f7c8b0f..01808b28d1b6 100644 --- a/trunk/drivers/net/netxen/netxen_nic_main.c +++ b/trunk/drivers/net/netxen/netxen_nic_main.c @@ -23,7 +23,6 @@ * */ -#include #include #include #include "netxen_nic_hw.h" diff --git a/trunk/drivers/net/ni5010.c b/trunk/drivers/net/ni5010.c index 3892330f244a..c16cbfb4061b 100644 --- a/trunk/drivers/net/ni5010.c +++ b/trunk/drivers/net/ni5010.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ni52.c b/trunk/drivers/net/ni52.c index f7a8f707361e..05c29c2cef2a 100644 --- a/trunk/drivers/net/ni52.c +++ b/trunk/drivers/net/ni52.c @@ -109,6 +109,7 @@ static int fifo = 0x8; /* don't change */ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/niu.c b/trunk/drivers/net/niu.c index d5cd16bfc907..0678f3106cbc 100644 --- a/trunk/drivers/net/niu.c +++ b/trunk/drivers/net/niu.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/ns83820.c b/trunk/drivers/net/ns83820.c index e88e97cd1b10..8dd509c09bc8 100644 --- a/trunk/drivers/net/ns83820.c +++ b/trunk/drivers/net/ns83820.c @@ -116,7 +116,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/octeon/octeon_mgmt.c b/trunk/drivers/net/octeon/octeon_mgmt.c index 8aadc8e2ddd7..be368e5cbf75 100644 --- a/trunk/drivers/net/octeon/octeon_mgmt.c +++ b/trunk/drivers/net/octeon/octeon_mgmt.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/pasemi_mac.c b/trunk/drivers/net/pasemi_mac.c index 370c147d08a3..d44d4a208bbf 100644 --- a/trunk/drivers/net/pasemi_mac.c +++ b/trunk/drivers/net/pasemi_mac.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/pcmcia/axnet_cs.c b/trunk/drivers/net/pcmcia/axnet_cs.c index 9f3d593f14ed..09291e60d309 100644 --- a/trunk/drivers/net/pcmcia/axnet_cs.c +++ b/trunk/drivers/net/pcmcia/axnet_cs.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/pcmcia/pcnet_cs.c b/trunk/drivers/net/pcmcia/pcnet_cs.c index 4c0368de1815..1028fcb91a28 100644 --- a/trunk/drivers/net/pcmcia/pcnet_cs.c +++ b/trunk/drivers/net/pcmcia/pcnet_cs.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/pcmcia/smc91c92_cs.c b/trunk/drivers/net/pcmcia/smc91c92_cs.c index ff7eb9116b6a..5adc662c4bfb 100644 --- a/trunk/drivers/net/pcmcia/smc91c92_cs.c +++ b/trunk/drivers/net/pcmcia/smc91c92_cs.c @@ -493,14 +493,13 @@ static int pcmcia_get_versmac(struct pcmcia_device *p_dev, { struct net_device *dev = priv; cisparse_t parse; - u8 *buf; if (pcmcia_parse_tuple(tuple, &parse)) return -EINVAL; - buf = parse.version_1.str + parse.version_1.ofs[3]; - - if ((parse.version_1.ns > 3) && (cvt_ascii_address(dev, buf) == 0)) + if ((parse.version_1.ns > 3) && + (cvt_ascii_address(dev, + (parse.version_1.str + parse.version_1.ofs[3])))) return 0; return -EINVAL; @@ -529,7 +528,7 @@ static int mhz_setup(struct pcmcia_device *link) len = pcmcia_get_tuple(link, 0x81, &buf); if (buf && len >= 13) { buf[12] = '\0'; - if (cvt_ascii_address(dev, buf) == 0) + if (cvt_ascii_address(dev, buf)) rc = 0; } kfree(buf); @@ -911,7 +910,7 @@ static int smc91c92_config(struct pcmcia_device *link) if (i != 0) { printk(KERN_NOTICE "smc91c92_cs: Unable to find hardware address.\n"); - goto config_failed; + goto config_undo; } smc->duplex = 0; @@ -999,7 +998,6 @@ static int smc91c92_config(struct pcmcia_device *link) unregister_netdev(dev); config_failed: smc91c92_release(link); - free_netdev(dev); return -ENODEV; } /* smc91c92_config */ diff --git a/trunk/drivers/net/phy/cicada.c b/trunk/drivers/net/phy/cicada.c index 92282b31d94b..a1bd599c8a5b 100644 --- a/trunk/drivers/net/phy/cicada.c +++ b/trunk/drivers/net/phy/cicada.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/davicom.c b/trunk/drivers/net/phy/davicom.c index c722e95853ff..d926168bc780 100644 --- a/trunk/drivers/net/phy/davicom.c +++ b/trunk/drivers/net/phy/davicom.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/et1011c.c b/trunk/drivers/net/phy/et1011c.c index 7712ebeba9bf..b031fa21f1aa 100644 --- a/trunk/drivers/net/phy/et1011c.c +++ b/trunk/drivers/net/phy/et1011c.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/fixed.c b/trunk/drivers/net/phy/fixed.c index 1fa4d73c3cca..e7070515d2e3 100644 --- a/trunk/drivers/net/phy/fixed.c +++ b/trunk/drivers/net/phy/fixed.c @@ -20,7 +20,6 @@ #include #include #include -#include #define MII_REGS_NUM 29 diff --git a/trunk/drivers/net/phy/icplus.c b/trunk/drivers/net/phy/icplus.c index 904208b95d4b..af3f1f2a9f87 100644 --- a/trunk/drivers/net/phy/icplus.c +++ b/trunk/drivers/net/phy/icplus.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/lxt.c b/trunk/drivers/net/phy/lxt.c index 057ecaacde6b..4cf3324ba166 100644 --- a/trunk/drivers/net/phy/lxt.c +++ b/trunk/drivers/net/phy/lxt.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/marvell.c b/trunk/drivers/net/phy/marvell.c index 64c7fbe0a8e7..65ed385c2ceb 100644 --- a/trunk/drivers/net/phy/marvell.c +++ b/trunk/drivers/net/phy/marvell.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/mdio-bitbang.c b/trunk/drivers/net/phy/mdio-bitbang.c index 19e70d7e27ab..2576055b350b 100644 --- a/trunk/drivers/net/phy/mdio-bitbang.c +++ b/trunk/drivers/net/phy/mdio-bitbang.c @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/net/phy/mdio-octeon.c b/trunk/drivers/net/phy/mdio-octeon.c index a872aea4ed74..61a4461cbda5 100644 --- a/trunk/drivers/net/phy/mdio-octeon.c +++ b/trunk/drivers/net/phy/mdio-octeon.c @@ -6,7 +6,6 @@ * Copyright (C) 2009 Cavium Networks */ -#include #include #include #include diff --git a/trunk/drivers/net/phy/phy.c b/trunk/drivers/net/phy/phy.c index 64be4664ccab..0295097d6c44 100644 --- a/trunk/drivers/net/phy/phy.c +++ b/trunk/drivers/net/phy/phy.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/phy/qsemi.c b/trunk/drivers/net/phy/qsemi.c index f6e190f73c32..23062d067231 100644 --- a/trunk/drivers/net/phy/qsemi.c +++ b/trunk/drivers/net/phy/qsemi.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/plip.c b/trunk/drivers/net/plip.c index 9a2103a69e17..3327e9fc7b51 100644 --- a/trunk/drivers/net/plip.c +++ b/trunk/drivers/net/plip.c @@ -94,7 +94,6 @@ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n" #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/ppp_async.c b/trunk/drivers/net/ppp_async.c index 6c2e8fa0ca31..6a375ea4947d 100644 --- a/trunk/drivers/net/ppp_async.c +++ b/trunk/drivers/net/ppp_async.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ppp_generic.c b/trunk/drivers/net/ppp_generic.c index 6e281bc825e5..6d61602208c1 100644 --- a/trunk/drivers/net/ppp_generic.c +++ b/trunk/drivers/net/ppp_generic.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/ppp_synctty.c b/trunk/drivers/net/ppp_synctty.c index 52938da1e542..3a13cecae3e2 100644 --- a/trunk/drivers/net/ppp_synctty.c +++ b/trunk/drivers/net/ppp_synctty.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #define PPP_VERSION "2.4.2" diff --git a/trunk/drivers/net/pppox.c b/trunk/drivers/net/pppox.c index d4191ef9cad1..ac806b27c658 100644 --- a/trunk/drivers/net/pppox.c +++ b/trunk/drivers/net/pppox.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ps3_gelic_net.c b/trunk/drivers/net/ps3_gelic_net.c index 5bf229bb34c2..a849f6f23a17 100644 --- a/trunk/drivers/net/ps3_gelic_net.c +++ b/trunk/drivers/net/ps3_gelic_net.c @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/ps3_gelic_wireless.c b/trunk/drivers/net/ps3_gelic_wireless.c index f0be507e5324..2663b2fdc0bb 100644 --- a/trunk/drivers/net/ps3_gelic_wireless.c +++ b/trunk/drivers/net/ps3_gelic_wireless.c @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/qlcnic/qlcnic_hw.c b/trunk/drivers/net/qlcnic/qlcnic_hw.c index a6ef266a2fe2..da00e162b6d3 100644 --- a/trunk/drivers/net/qlcnic/qlcnic_hw.c +++ b/trunk/drivers/net/qlcnic/qlcnic_hw.c @@ -24,7 +24,6 @@ #include "qlcnic.h" -#include #include #define MASK(n) ((1ULL<<(n))-1) diff --git a/trunk/drivers/net/qlcnic/qlcnic_init.c b/trunk/drivers/net/qlcnic/qlcnic_init.c index 9d2c124048fa..7c34e4e29b3f 100644 --- a/trunk/drivers/net/qlcnic/qlcnic_init.c +++ b/trunk/drivers/net/qlcnic/qlcnic_init.c @@ -24,7 +24,6 @@ #include #include -#include #include "qlcnic.h" struct crb_addr_pair { diff --git a/trunk/drivers/net/qlcnic/qlcnic_main.c b/trunk/drivers/net/qlcnic/qlcnic_main.c index 234dab1f9982..fc721564e69e 100644 --- a/trunk/drivers/net/qlcnic/qlcnic_main.c +++ b/trunk/drivers/net/qlcnic/qlcnic_main.c @@ -22,7 +22,6 @@ * */ -#include #include #include diff --git a/trunk/drivers/net/qlge/qlge_dbg.c b/trunk/drivers/net/qlge/qlge_dbg.c index 362664628937..ff8550d2ca82 100644 --- a/trunk/drivers/net/qlge/qlge_dbg.c +++ b/trunk/drivers/net/qlge/qlge_dbg.c @@ -1,5 +1,3 @@ -#include - #include "qlge.h" /* Read a NIC register from the alternate function. */ diff --git a/trunk/drivers/net/qlge/qlge_ethtool.c b/trunk/drivers/net/qlge/qlge_ethtool.c index 7e09ff4a5755..7dbff87480dc 100644 --- a/trunk/drivers/net/qlge/qlge_ethtool.c +++ b/trunk/drivers/net/qlge/qlge_ethtool.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/r6040.c b/trunk/drivers/net/r6040.c index 43afdb6b25e6..15d5373dc8f3 100644 --- a/trunk/drivers/net/r6040.c +++ b/trunk/drivers/net/r6040.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/r8169.c b/trunk/drivers/net/r8169.c index dbb1f5a1824c..96740051cdcc 100644 --- a/trunk/drivers/net/r8169.c +++ b/trunk/drivers/net/r8169.c @@ -3227,8 +3227,8 @@ static void rtl8169_set_rxbufsize(struct rtl8169_private *tp, unsigned int max_frame = mtu + VLAN_ETH_HLEN + ETH_FCS_LEN; if (max_frame != 16383) - printk(KERN_WARNING PFX "WARNING! Changing of MTU on this " - "NIC may lead to frame reception errors!\n"); + printk(KERN_WARNING "WARNING! Changing of MTU on this NIC" + "May lead to frame reception errors!\n"); tp->rx_buf_sz = (max_frame > RX_BUF_SIZE) ? max_frame : RX_BUF_SIZE; } diff --git a/trunk/drivers/net/rionet.c b/trunk/drivers/net/rionet.c index 07eb884ff982..ede937ee50c7 100644 --- a/trunk/drivers/net/rionet.c +++ b/trunk/drivers/net/rionet.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/rrunner.c b/trunk/drivers/net/rrunner.c index f2e335f0d1b7..266baf534964 100644 --- a/trunk/drivers/net/rrunner.c +++ b/trunk/drivers/net/rrunner.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/s2io.c b/trunk/drivers/net/s2io.c index 92ae8d3de39b..2eb7f8a0d926 100644 --- a/trunk/drivers/net/s2io.c +++ b/trunk/drivers/net/s2io.c @@ -79,7 +79,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/sb1000.c b/trunk/drivers/net/sb1000.c index abc8eefdd4b6..9f83a1197375 100644 --- a/trunk/drivers/net/sb1000.c +++ b/trunk/drivers/net/sb1000.c @@ -42,6 +42,7 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n"; #include #include /* for SIOGCM/SIOSCM stuff */ #include +#include #include #include #include @@ -51,7 +52,6 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n"; #include #include #include -#include #include #include diff --git a/trunk/drivers/net/seeq8005.c b/trunk/drivers/net/seeq8005.c index 374832cca11f..fe806bd9b95f 100644 --- a/trunk/drivers/net/seeq8005.c +++ b/trunk/drivers/net/seeq8005.c @@ -37,6 +37,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/sfc/efx.c b/trunk/drivers/net/sfc/efx.c index 6486657c47b8..88f2fb193abe 100644 --- a/trunk/drivers/net/sfc/efx.c +++ b/trunk/drivers/net/sfc/efx.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "net_driver.h" #include "efx.h" #include "mdio_10g.h" diff --git a/trunk/drivers/net/sfc/falcon.c b/trunk/drivers/net/sfc/falcon.c index d294d66fd600..1b8d83657aaa 100644 --- a/trunk/drivers/net/sfc/falcon.c +++ b/trunk/drivers/net/sfc/falcon.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "net_driver.h" #include "bitfield.h" #include "efx.h" diff --git a/trunk/drivers/net/sfc/mcdi_phy.c b/trunk/drivers/net/sfc/mcdi_phy.c index 2f2354696663..34c22fa986e2 100644 --- a/trunk/drivers/net/sfc/mcdi_phy.c +++ b/trunk/drivers/net/sfc/mcdi_phy.c @@ -11,7 +11,6 @@ * Driver for PHY related operations via MCDI. */ -#include #include "efx.h" #include "phy.h" #include "mcdi.h" diff --git a/trunk/drivers/net/sfc/mtd.c b/trunk/drivers/net/sfc/mtd.c index f3ac7f30b5e7..407bbaddfea6 100644 --- a/trunk/drivers/net/sfc/mtd.c +++ b/trunk/drivers/net/sfc/mtd.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #define EFX_DRIVER_NAME "sfc_mtd" diff --git a/trunk/drivers/net/sfc/qt202x_phy.c b/trunk/drivers/net/sfc/qt202x_phy.c index e077bef08a50..1bee62c83001 100644 --- a/trunk/drivers/net/sfc/qt202x_phy.c +++ b/trunk/drivers/net/sfc/qt202x_phy.c @@ -10,7 +10,6 @@ * Driver for AMCC QT202x SFP+ and XFP adapters; see www.amcc.com for details */ -#include #include #include #include "efx.h" diff --git a/trunk/drivers/net/sfc/rx.c b/trunk/drivers/net/sfc/rx.c index e308818b9f55..a97c923b560c 100644 --- a/trunk/drivers/net/sfc/rx.c +++ b/trunk/drivers/net/sfc/rx.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/sfc/selftest.c b/trunk/drivers/net/sfc/selftest.c index 0106b1d9aae2..cf0139a7d9a4 100644 --- a/trunk/drivers/net/sfc/selftest.c +++ b/trunk/drivers/net/sfc/selftest.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "net_driver.h" #include "efx.h" diff --git a/trunk/drivers/net/sfc/siena.c b/trunk/drivers/net/sfc/siena.c index 38dcc42c4f79..1619fb5a64f5 100644 --- a/trunk/drivers/net/sfc/siena.c +++ b/trunk/drivers/net/sfc/siena.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "net_driver.h" #include "bitfield.h" #include "efx.h" diff --git a/trunk/drivers/net/sfc/tenxpress.c b/trunk/drivers/net/sfc/tenxpress.c index f21efe7bd316..10db071bd837 100644 --- a/trunk/drivers/net/sfc/tenxpress.c +++ b/trunk/drivers/net/sfc/tenxpress.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "efx.h" #include "mdio_10g.h" #include "nic.h" diff --git a/trunk/drivers/net/sfc/tx.c b/trunk/drivers/net/sfc/tx.c index be0e110a1f73..a8b70ef6d817 100644 --- a/trunk/drivers/net/sfc/tx.c +++ b/trunk/drivers/net/sfc/tx.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/sgiseeq.c b/trunk/drivers/net/sgiseeq.c index c8fc896fc460..ed999d31f1fa 100644 --- a/trunk/drivers/net/sgiseeq.c +++ b/trunk/drivers/net/sgiseeq.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -593,10 +592,8 @@ static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Setup... */ len = skb->len; if (len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) { - spin_unlock_irqrestore(&sp->tx_lock, flags); + if (skb_padto(skb, ETH_ZLEN)) return NETDEV_TX_OK; - } len = ETH_ZLEN; } diff --git a/trunk/drivers/net/sh_eth.c b/trunk/drivers/net/sh_eth.c index 6242b85d5d15..42a35f086a9f 100644 --- a/trunk/drivers/net/sh_eth.c +++ b/trunk/drivers/net/sh_eth.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "sh_eth.h" diff --git a/trunk/drivers/net/sis190.c b/trunk/drivers/net/sis190.c index b30ce752bbf3..760d9e83a465 100644 --- a/trunk/drivers/net/sis190.c +++ b/trunk/drivers/net/sis190.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #define PHY_MAX_ADDR 32 diff --git a/trunk/drivers/net/skfp/skfddi.c b/trunk/drivers/net/skfp/skfddi.c index d9016b75abc2..1921a54ea995 100644 --- a/trunk/drivers/net/skfp/skfddi.c +++ b/trunk/drivers/net/skfp/skfddi.c @@ -78,13 +78,13 @@ static const char * const boot_msg = #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/net/skge.c b/trunk/drivers/net/skge.c index 50eb70609f20..d0058e5bb6ae 100644 --- a/trunk/drivers/net/skge.c +++ b/trunk/drivers/net/skge.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include "skge.h" diff --git a/trunk/drivers/net/sky2.c b/trunk/drivers/net/sky2.c index 088c797eb73b..d8ec4c11fd49 100644 --- a/trunk/drivers/net/sky2.c +++ b/trunk/drivers/net/sky2.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/slhc.c b/trunk/drivers/net/slhc.c index 140d63f3cafa..d640c0f5470b 100644 --- a/trunk/drivers/net/slhc.c +++ b/trunk/drivers/net/slhc.c @@ -51,7 +51,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/slip.c b/trunk/drivers/net/slip.c index 89696156c059..ba5bbc503446 100644 --- a/trunk/drivers/net/slip.c +++ b/trunk/drivers/net/slip.c @@ -83,7 +83,6 @@ #include #include #include -#include #include "slip.h" #ifdef CONFIG_INET #include diff --git a/trunk/drivers/net/smc911x.c b/trunk/drivers/net/smc911x.c index 635820d42b19..9871a2b61f86 100644 --- a/trunk/drivers/net/smc911x.c +++ b/trunk/drivers/net/smc911x.c @@ -59,6 +59,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/smc9194.c b/trunk/drivers/net/smc9194.c index 3f2f7843aa4e..f9a960e7fc1f 100644 --- a/trunk/drivers/net/smc9194.c +++ b/trunk/drivers/net/smc9194.c @@ -64,6 +64,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/smc91x.c b/trunk/drivers/net/smc91x.c index 860339d51d58..fc1b5a1a3583 100644 --- a/trunk/drivers/net/smc91x.c +++ b/trunk/drivers/net/smc91x.c @@ -70,6 +70,7 @@ static const char version[] = #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/smsc911x.c b/trunk/drivers/net/smsc911x.c index cbf520d38eac..4fd1d8b38788 100644 --- a/trunk/drivers/net/smsc911x.c +++ b/trunk/drivers/net/smsc911x.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/smsc9420.c b/trunk/drivers/net/smsc9420.c index aafaebf45748..34fa10d8ad40 100644 --- a/trunk/drivers/net/smsc9420.c +++ b/trunk/drivers/net/smsc9420.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "smsc9420.h" diff --git a/trunk/drivers/net/sni_82596.c b/trunk/drivers/net/sni_82596.c index 6b2a88817473..854ccf2b4105 100644 --- a/trunk/drivers/net/sni_82596.c +++ b/trunk/drivers/net/sni_82596.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/spider_net.c b/trunk/drivers/net/spider_net.c index dd3cb0f2d21f..5ba9d989f8fc 100644 --- a/trunk/drivers/net/spider_net.c +++ b/trunk/drivers/net/spider_net.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -41,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/stmmac/Kconfig b/trunk/drivers/net/stmmac/Kconfig index eb63d44748a7..fb287649a305 100644 --- a/trunk/drivers/net/stmmac/Kconfig +++ b/trunk/drivers/net/stmmac/Kconfig @@ -2,7 +2,6 @@ config STMMAC_ETH tristate "STMicroelectronics 10/100/1000 Ethernet driver" select MII select PHYLIB - select CRC32 depends on NETDEVICES && CPU_SUBTYPE_ST40 help This is the driver for the Ethernet IPs are built around a diff --git a/trunk/drivers/net/stmmac/dwmac100.c b/trunk/drivers/net/stmmac/dwmac100.c index 4cacca614fc1..803b0373d843 100644 --- a/trunk/drivers/net/stmmac/dwmac100.c +++ b/trunk/drivers/net/stmmac/dwmac100.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "common.h" #include "dwmac100.h" diff --git a/trunk/drivers/net/stmmac/dwmac1000_core.c b/trunk/drivers/net/stmmac/dwmac1000_core.c index 5bd95ebfe498..a6538ae4694c 100644 --- a/trunk/drivers/net/stmmac/dwmac1000_core.c +++ b/trunk/drivers/net/stmmac/dwmac1000_core.c @@ -27,7 +27,6 @@ *******************************************************************************/ #include -#include #include "dwmac1000.h" static void dwmac1000_core_init(unsigned long ioaddr) diff --git a/trunk/drivers/net/stmmac/stmmac_main.c b/trunk/drivers/net/stmmac/stmmac_main.c index a214a1627e8b..a6733612d64a 100644 --- a/trunk/drivers/net/stmmac/stmmac_main.c +++ b/trunk/drivers/net/stmmac/stmmac_main.c @@ -44,7 +44,6 @@ #include #include #include -#include #include "stmmac.h" #define STMMAC_RESOURCE_NAME "stmmaceth" diff --git a/trunk/drivers/net/stmmac/stmmac_mdio.c b/trunk/drivers/net/stmmac/stmmac_mdio.c index 40b2c7929719..fffe1d037fe6 100644 --- a/trunk/drivers/net/stmmac/stmmac_mdio.c +++ b/trunk/drivers/net/stmmac/stmmac_mdio.c @@ -26,7 +26,6 @@ #include #include -#include #include "stmmac.h" diff --git a/trunk/drivers/net/sun3_82586.c b/trunk/drivers/net/sun3_82586.c index 8b28c89a9a77..2f6a760e5f21 100644 --- a/trunk/drivers/net/sun3_82586.c +++ b/trunk/drivers/net/sun3_82586.c @@ -33,6 +33,7 @@ static int fifo=0x8; /* don't change */ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/sun3lance.c b/trunk/drivers/net/sun3lance.c index 1694ca5bfb41..99998862c22e 100644 --- a/trunk/drivers/net/sun3lance.c +++ b/trunk/drivers/net/sun3lance.c @@ -28,6 +28,7 @@ static char *version = "sun3lance.c: v1.2 1/12/2001 Sam Creasey (sammy@sammy.ne #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/sunbmac.c b/trunk/drivers/net/sunbmac.c index ed7865a0b5b2..a0bd361d5eca 100644 --- a/trunk/drivers/net/sunbmac.c +++ b/trunk/drivers/net/sunbmac.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/sundance.c b/trunk/drivers/net/sundance.c index 8249a394a4e1..a855934dfc3b 100644 --- a/trunk/drivers/net/sundance.c +++ b/trunk/drivers/net/sundance.c @@ -84,6 +84,7 @@ static char *media[MAX_UNITS]; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/sungem.c b/trunk/drivers/net/sungem.c index e6880f1c4e8c..70196bc5fe61 100644 --- a/trunk/drivers/net/sungem.c +++ b/trunk/drivers/net/sungem.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -57,7 +58,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/sunlance.c b/trunk/drivers/net/sunlance.c index 0c21653ff9f9..d7c73f478ef5 100644 --- a/trunk/drivers/net/sunlance.c +++ b/trunk/drivers/net/sunlance.c @@ -78,6 +78,7 @@ static char lancestr[] = "LANCE"; #include #include #include +#include #include #include #include @@ -93,7 +94,6 @@ static char lancestr[] = "LANCE"; #include #include #include -#include #include #include diff --git a/trunk/drivers/net/tehuti.h b/trunk/drivers/net/tehuti.h index cff98d07cba8..a19dcf8b6b56 100644 --- a/trunk/drivers/net/tehuti.h +++ b/trunk/drivers/net/tehuti.h @@ -32,7 +32,6 @@ #include #include #include -#include /* Compile Time Switches */ /* start */ diff --git a/trunk/drivers/net/tokenring/3c359.c b/trunk/drivers/net/tokenring/3c359.c index 7d7f3eef1ab3..0fb930feea45 100644 --- a/trunk/drivers/net/tokenring/3c359.c +++ b/trunk/drivers/net/tokenring/3c359.c @@ -63,7 +63,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/tokenring/lanstreamer.c b/trunk/drivers/net/tokenring/lanstreamer.c index 7a5fbf5a9d71..dd028fee9dc2 100644 --- a/trunk/drivers/net/tokenring/lanstreamer.c +++ b/trunk/drivers/net/tokenring/lanstreamer.c @@ -121,7 +121,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/tokenring/madgemc.c b/trunk/drivers/net/tokenring/madgemc.c index 53f631ebb162..456f8bff40be 100644 --- a/trunk/drivers/net/tokenring/madgemc.c +++ b/trunk/drivers/net/tokenring/madgemc.c @@ -21,7 +21,6 @@ static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n"; #include #include -#include #include #include #include diff --git a/trunk/drivers/net/tokenring/smctr.c b/trunk/drivers/net/tokenring/smctr.c index e40560137c46..5401d86a7be4 100644 --- a/trunk/drivers/net/tokenring/smctr.c +++ b/trunk/drivers/net/tokenring/smctr.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/tokenring/tms380tr.c b/trunk/drivers/net/tokenring/tms380tr.c index 8b508c922410..ee71bcfb3753 100644 --- a/trunk/drivers/net/tokenring/tms380tr.c +++ b/trunk/drivers/net/tokenring/tms380tr.c @@ -85,6 +85,7 @@ static const char version[] = "tms380tr.c: v1.10 30/12/2002 by Christoph Goos, A #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/tsi108_eth.c b/trunk/drivers/net/tsi108_eth.c index 5b1fbb3c3b51..647cdd1d4e20 100644 --- a/trunk/drivers/net/tsi108_eth.c +++ b/trunk/drivers/net/tsi108_eth.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/tulip/de2104x.c b/trunk/drivers/net/tulip/de2104x.c index 19cafc2b418d..cb429723b2c8 100644 --- a/trunk/drivers/net/tulip/de2104x.c +++ b/trunk/drivers/net/tulip/de2104x.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/tulip/de4x5.c b/trunk/drivers/net/tulip/de4x5.c index 09b57193a16a..c4ecb9a95409 100644 --- a/trunk/drivers/net/tulip/de4x5.c +++ b/trunk/drivers/net/tulip/de4x5.c @@ -450,6 +450,7 @@ #include #include #include +#include #include #include #include @@ -466,7 +467,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/tulip/dmfe.c b/trunk/drivers/net/tulip/dmfe.c index 9568156dea98..95b38d803e9b 100644 --- a/trunk/drivers/net/tulip/dmfe.c +++ b/trunk/drivers/net/tulip/dmfe.c @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/tulip/eeprom.c b/trunk/drivers/net/tulip/eeprom.c index 6002e651b9ea..49f05d1431f5 100644 --- a/trunk/drivers/net/tulip/eeprom.c +++ b/trunk/drivers/net/tulip/eeprom.c @@ -13,7 +13,6 @@ */ #include -#include #include "tulip.h" #include #include diff --git a/trunk/drivers/net/tulip/tulip_core.c b/trunk/drivers/net/tulip/tulip_core.c index 3810db9dc2de..7f544ef2f5fc 100644 --- a/trunk/drivers/net/tulip/tulip_core.c +++ b/trunk/drivers/net/tulip/tulip_core.c @@ -24,7 +24,6 @@ #include #include -#include #include "tulip.h" #include #include diff --git a/trunk/drivers/net/tulip/uli526x.c b/trunk/drivers/net/tulip/uli526x.c index a589dd34891e..a4f09d490531 100644 --- a/trunk/drivers/net/tulip/uli526x.c +++ b/trunk/drivers/net/tulip/uli526x.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/tulip/winbond-840.c b/trunk/drivers/net/tulip/winbond-840.c index 98dbf6cc1d68..304f43866c44 100644 --- a/trunk/drivers/net/tulip/winbond-840.c +++ b/trunk/drivers/net/tulip/winbond-840.c @@ -114,6 +114,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/typhoon.c b/trunk/drivers/net/typhoon.c index 98d818daa77e..cd24e5f2b2a2 100644 --- a/trunk/drivers/net/typhoon.c +++ b/trunk/drivers/net/typhoon.c @@ -109,6 +109,7 @@ static const int multicast_filter_limit = 32; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/ucc_geth_ethtool.c b/trunk/drivers/net/ucc_geth_ethtool.c index 6f92e48f02d3..7075f26e97da 100644 --- a/trunk/drivers/net/ucc_geth_ethtool.c +++ b/trunk/drivers/net/ucc_geth_ethtool.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/usb/asix.c b/trunk/drivers/net/usb/asix.c index 35f56fc82803..9e05639435f2 100644 --- a/trunk/drivers/net/usb/asix.c +++ b/trunk/drivers/net/usb/asix.c @@ -34,7 +34,6 @@ #include #include #include -#include #define DRIVER_VERSION "14-Jun-2006" static const char driver_name [] = "asix"; diff --git a/trunk/drivers/net/usb/catc.c b/trunk/drivers/net/usb/catc.c index 602e123b2741..96f1ebe0d348 100644 --- a/trunk/drivers/net/usb/catc.c +++ b/trunk/drivers/net/usb/catc.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,6 @@ #include #include #include -#include #include #undef DEBUG diff --git a/trunk/drivers/net/usb/cdc-phonet.c b/trunk/drivers/net/usb/cdc-phonet.c index dc9444525b49..6491c9c00c83 100644 --- a/trunk/drivers/net/usb/cdc-phonet.c +++ b/trunk/drivers/net/usb/cdc-phonet.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/usb/cdc_eem.c b/trunk/drivers/net/usb/cdc_eem.c index 5f3b97668e63..a4a85a6ed86d 100644 --- a/trunk/drivers/net/usb/cdc_eem.c +++ b/trunk/drivers/net/usb/cdc_eem.c @@ -30,7 +30,6 @@ #include #include #include -#include /* diff --git a/trunk/drivers/net/usb/dm9601.c b/trunk/drivers/net/usb/dm9601.c index 04b281002a76..269339769f47 100644 --- a/trunk/drivers/net/usb/dm9601.c +++ b/trunk/drivers/net/usb/dm9601.c @@ -21,7 +21,6 @@ #include #include #include -#include /* datasheet: http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf diff --git a/trunk/drivers/net/usb/gl620a.c b/trunk/drivers/net/usb/gl620a.c index dcd57c37ef73..f7ccfad9384e 100644 --- a/trunk/drivers/net/usb/gl620a.c +++ b/trunk/drivers/net/usb/gl620a.c @@ -30,7 +30,6 @@ #include #include #include -#include /* diff --git a/trunk/drivers/net/usb/int51x1.c b/trunk/drivers/net/usb/int51x1.c index be02a25da71a..3c228df57062 100644 --- a/trunk/drivers/net/usb/int51x1.c +++ b/trunk/drivers/net/usb/int51x1.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/usb/mcs7830.c b/trunk/drivers/net/usb/mcs7830.c index 9f24e3f871e1..70978219e98a 100644 --- a/trunk/drivers/net/usb/mcs7830.c +++ b/trunk/drivers/net/usb/mcs7830.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/usb/net1080.c b/trunk/drivers/net/usb/net1080.c index 961a8ed38d8f..bdcad45954a3 100644 --- a/trunk/drivers/net/usb/net1080.c +++ b/trunk/drivers/net/usb/net1080.c @@ -29,7 +29,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/usb/rndis_host.c b/trunk/drivers/net/usb/rndis_host.c index dd8a4adf48ca..4ce331fb1e1e 100644 --- a/trunk/drivers/net/usb/rndis_host.c +++ b/trunk/drivers/net/usb/rndis_host.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/usb/smsc75xx.c b/trunk/drivers/net/usb/smsc75xx.c index 35b98b1b79e4..300e3e764fa2 100644 --- a/trunk/drivers/net/usb/smsc75xx.c +++ b/trunk/drivers/net/usb/smsc75xx.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "smsc75xx.h" #define SMSC_CHIPNAME "smsc75xx" diff --git a/trunk/drivers/net/usb/smsc95xx.c b/trunk/drivers/net/usb/smsc95xx.c index 3135af63d378..73f9a31cf94d 100644 --- a/trunk/drivers/net/usb/smsc95xx.c +++ b/trunk/drivers/net/usb/smsc95xx.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "smsc95xx.h" #define SMSC_CHIPNAME "smsc95xx" diff --git a/trunk/drivers/net/usb/usbnet.c b/trunk/drivers/net/usb/usbnet.c index 7177abc78dc6..17b6a62d206e 100644 --- a/trunk/drivers/net/usb/usbnet.c +++ b/trunk/drivers/net/usb/usbnet.c @@ -43,7 +43,6 @@ #include #include #include -#include #define DRIVER_VERSION "22-Aug-2005" diff --git a/trunk/drivers/net/veth.c b/trunk/drivers/net/veth.c index f9f0730b53d5..b583d4968add 100644 --- a/trunk/drivers/net/veth.c +++ b/trunk/drivers/net/veth.c @@ -9,7 +9,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/via-rhine.c b/trunk/drivers/net/via-rhine.c index 388751aa66e0..50f881aa3939 100644 --- a/trunk/drivers/net/via-rhine.c +++ b/trunk/drivers/net/via-rhine.c @@ -89,6 +89,7 @@ static const int multicast_filter_limit = 32; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/virtio_net.c b/trunk/drivers/net/virtio_net.c index 6fb783ce20b9..25dc77ccbf58 100644 --- a/trunk/drivers/net/virtio_net.c +++ b/trunk/drivers/net/virtio_net.c @@ -25,7 +25,6 @@ #include #include #include -#include static int napi_weight = 128; module_param(napi_weight, int, 0444); diff --git a/trunk/drivers/net/vxge/vxge-config.c b/trunk/drivers/net/vxge/vxge-config.c index a21a25d218b6..32a75fa935ed 100644 --- a/trunk/drivers/net/vxge/vxge-config.c +++ b/trunk/drivers/net/vxge/vxge-config.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "vxge-traffic.h" #include "vxge-config.h" diff --git a/trunk/drivers/net/vxge/vxge-config.h b/trunk/drivers/net/vxge/vxge-config.h index 13f5416307f8..e7877df092f3 100644 --- a/trunk/drivers/net/vxge/vxge-config.h +++ b/trunk/drivers/net/vxge/vxge-config.h @@ -14,7 +14,6 @@ #ifndef VXGE_CONFIG_H #define VXGE_CONFIG_H #include -#include #ifndef VXGE_CACHE_LINE_SIZE #define VXGE_CACHE_LINE_SIZE 128 diff --git a/trunk/drivers/net/vxge/vxge-ethtool.c b/trunk/drivers/net/vxge/vxge-ethtool.c index aaf374cfd322..c6736b972635 100644 --- a/trunk/drivers/net/vxge/vxge-ethtool.c +++ b/trunk/drivers/net/vxge/vxge-ethtool.c @@ -12,7 +12,6 @@ * Copyright(c) 2002-2009 Neterion Inc. ******************************************************************************/ #include -#include #include #include diff --git a/trunk/drivers/net/vxge/vxge-main.c b/trunk/drivers/net/vxge/vxge-main.c index ba6d0da78c30..46a7c9e689ec 100644 --- a/trunk/drivers/net/vxge/vxge-main.c +++ b/trunk/drivers/net/vxge/vxge-main.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wan/dscc4.c b/trunk/drivers/net/wan/dscc4.c index a4859f7a7cc0..f88c07c13197 100644 --- a/trunk/drivers/net/wan/dscc4.c +++ b/trunk/drivers/net/wan/dscc4.c @@ -89,7 +89,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wan/farsync.c b/trunk/drivers/net/wan/farsync.c index e087b9a6daaa..40d724a8e020 100644 --- a/trunk/drivers/net/wan/farsync.c +++ b/trunk/drivers/net/wan/farsync.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wan/hd64570.c b/trunk/drivers/net/wan/hd64570.c index 4dde2ea4a189..80114c93bae7 100644 --- a/trunk/drivers/net/wan/hd64570.c +++ b/trunk/drivers/net/wan/hd64570.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wan/hd64572.c b/trunk/drivers/net/wan/hd64572.c index aad9ed45c254..84f01373e11f 100644 --- a/trunk/drivers/net/wan/hd64572.c +++ b/trunk/drivers/net/wan/hd64572.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wan/hdlc_cisco.c b/trunk/drivers/net/wan/hdlc_cisco.c index ee7083fbea50..1ceccf1ca6c7 100644 --- a/trunk/drivers/net/wan/hdlc_cisco.c +++ b/trunk/drivers/net/wan/hdlc_cisco.c @@ -20,6 +20,7 @@ #include #include #include +#include #undef DEBUG_HARD_HEADER diff --git a/trunk/drivers/net/wan/hdlc_raw.c b/trunk/drivers/net/wan/hdlc_raw.c index 5dc153e8a29d..19f51fdd5522 100644 --- a/trunk/drivers/net/wan/hdlc_raw.c +++ b/trunk/drivers/net/wan/hdlc_raw.c @@ -20,6 +20,7 @@ #include #include #include +#include static int raw_ioctl(struct net_device *dev, struct ifreq *ifr); diff --git a/trunk/drivers/net/wan/hdlc_raw_eth.c b/trunk/drivers/net/wan/hdlc_raw_eth.c index 05c9b0b96239..1b30fcc24145 100644 --- a/trunk/drivers/net/wan/hdlc_raw_eth.c +++ b/trunk/drivers/net/wan/hdlc_raw_eth.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include @@ -22,6 +21,7 @@ #include #include #include +#include static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr); diff --git a/trunk/drivers/net/wan/hdlc_x25.c b/trunk/drivers/net/wan/hdlc_x25.c index c7adbb79f7cc..6e1ca256effd 100644 --- a/trunk/drivers/net/wan/hdlc_x25.c +++ b/trunk/drivers/net/wan/hdlc_x25.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include @@ -22,6 +21,7 @@ #include #include #include +#include #include static int x25_ioctl(struct net_device *dev, struct ifreq *ifr); diff --git a/trunk/drivers/net/wan/hostess_sv11.c b/trunk/drivers/net/wan/hostess_sv11.c index 48edc5f4dac8..74164d29524c 100644 --- a/trunk/drivers/net/wan/hostess_sv11.c +++ b/trunk/drivers/net/wan/hostess_sv11.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wan/ixp4xx_hss.c b/trunk/drivers/net/wan/ixp4xx_hss.c index 0c2cdde686a0..c705046d8615 100644 --- a/trunk/drivers/net/wan/ixp4xx_hss.c +++ b/trunk/drivers/net/wan/ixp4xx_hss.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wan/lapbether.c b/trunk/drivers/net/wan/lapbether.c index 98e2f99903d7..d1e3c673e9b2 100644 --- a/trunk/drivers/net/wan/lapbether.c +++ b/trunk/drivers/net/wan/lapbether.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wan/lmc/lmc_media.c b/trunk/drivers/net/wan/lmc/lmc_media.c index 5920c996fcdf..f327674fc93a 100644 --- a/trunk/drivers/net/wan/lmc/lmc_media.c +++ b/trunk/drivers/net/wan/lmc/lmc_media.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wan/lmc/lmc_proto.c b/trunk/drivers/net/wan/lmc/lmc_proto.c index f600075e84a2..044a48175c42 100644 --- a/trunk/drivers/net/wan/lmc/lmc_proto.c +++ b/trunk/drivers/net/wan/lmc/lmc_proto.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wan/pc300_drv.c b/trunk/drivers/net/wan/pc300_drv.c index 3f744c643094..f4f1c00d0d23 100644 --- a/trunk/drivers/net/wan/pc300_drv.c +++ b/trunk/drivers/net/wan/pc300_drv.c @@ -228,7 +228,6 @@ static char rcsid[] = #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wan/sbni.c b/trunk/drivers/net/wan/sbni.c index cff13a9597cd..25477b5cde47 100644 --- a/trunk/drivers/net/wan/sbni.c +++ b/trunk/drivers/net/wan/sbni.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wan/sealevel.c b/trunk/drivers/net/wan/sealevel.c index e91457d6023e..61249f489e37 100644 --- a/trunk/drivers/net/wan/sealevel.c +++ b/trunk/drivers/net/wan/sealevel.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wan/x25_asy.c b/trunk/drivers/net/wan/x25_asy.c index 80d5c5834a0b..b9f520b7db6a 100644 --- a/trunk/drivers/net/wan/x25_asy.c +++ b/trunk/drivers/net/wan/x25_asy.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "x25_asy.h" #include diff --git a/trunk/drivers/net/wan/z85230.c b/trunk/drivers/net/wan/z85230.c index fbf5e843d48c..0be7ec7299db 100644 --- a/trunk/drivers/net/wan/z85230.c +++ b/trunk/drivers/net/wan/z85230.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #define RT_LOCK diff --git a/trunk/drivers/net/wimax/i2400m/control.c b/trunk/drivers/net/wimax/i2400m/control.c index 6180772dcc09..944945540391 100644 --- a/trunk/drivers/net/wimax/i2400m/control.c +++ b/trunk/drivers/net/wimax/i2400m/control.c @@ -76,7 +76,6 @@ #include #include "i2400m.h" #include -#include #include diff --git a/trunk/drivers/net/wimax/i2400m/driver.c b/trunk/drivers/net/wimax/i2400m/driver.c index 94dc83c3969d..6cead321bc15 100644 --- a/trunk/drivers/net/wimax/i2400m/driver.c +++ b/trunk/drivers/net/wimax/i2400m/driver.c @@ -69,7 +69,6 @@ #include #include #include -#include #define D_SUBMODULE driver #include "debug-levels.h" diff --git a/trunk/drivers/net/wimax/i2400m/fw.c b/trunk/drivers/net/wimax/i2400m/fw.c index 3f283bff0ff7..25c24f0368d8 100644 --- a/trunk/drivers/net/wimax/i2400m/fw.c +++ b/trunk/drivers/net/wimax/i2400m/fw.c @@ -156,7 +156,6 @@ */ #include #include -#include #include #include "i2400m.h" diff --git a/trunk/drivers/net/wimax/i2400m/netdev.c b/trunk/drivers/net/wimax/i2400m/netdev.c index b811c2f1f5e9..599aa4eb9baa 100644 --- a/trunk/drivers/net/wimax/i2400m/netdev.c +++ b/trunk/drivers/net/wimax/i2400m/netdev.c @@ -73,7 +73,6 @@ * alloc_netdev. */ #include -#include #include #include #include "i2400m.h" diff --git a/trunk/drivers/net/wimax/i2400m/op-rfkill.c b/trunk/drivers/net/wimax/i2400m/op-rfkill.c index 035e4cf3e6ed..43927b5d7ad6 100644 --- a/trunk/drivers/net/wimax/i2400m/op-rfkill.c +++ b/trunk/drivers/net/wimax/i2400m/op-rfkill.c @@ -34,7 +34,6 @@ */ #include "i2400m.h" #include -#include diff --git a/trunk/drivers/net/wimax/i2400m/rx.c b/trunk/drivers/net/wimax/i2400m/rx.c index fa2e11e5b4b9..7ddb173fd4a7 100644 --- a/trunk/drivers/net/wimax/i2400m/rx.c +++ b/trunk/drivers/net/wimax/i2400m/rx.c @@ -144,7 +144,6 @@ * i2400m_msg_size_check * wimax_msg */ -#include #include #include #include diff --git a/trunk/drivers/net/wimax/i2400m/sdio-rx.c b/trunk/drivers/net/wimax/i2400m/sdio-rx.c index d619da33f20b..8adf6c9b6f8f 100644 --- a/trunk/drivers/net/wimax/i2400m/sdio-rx.c +++ b/trunk/drivers/net/wimax/i2400m/sdio-rx.c @@ -65,7 +65,6 @@ #include #include #include -#include #include "i2400m-sdio.h" #define D_SUBMODULE rx diff --git a/trunk/drivers/net/wimax/i2400m/sdio.c b/trunk/drivers/net/wimax/i2400m/sdio.c index 7632f80954e3..14f876b1358b 100644 --- a/trunk/drivers/net/wimax/i2400m/sdio.c +++ b/trunk/drivers/net/wimax/i2400m/sdio.c @@ -48,7 +48,6 @@ * __i2400ms_send_barker() */ -#include #include #include #include diff --git a/trunk/drivers/net/wimax/i2400m/tx.c b/trunk/drivers/net/wimax/i2400m/tx.c index b0cb90624cf6..54480e8947f1 100644 --- a/trunk/drivers/net/wimax/i2400m/tx.c +++ b/trunk/drivers/net/wimax/i2400m/tx.c @@ -244,7 +244,6 @@ * (FIFO empty). */ #include -#include #include "i2400m.h" diff --git a/trunk/drivers/net/wimax/i2400m/usb-fw.c b/trunk/drivers/net/wimax/i2400m/usb-fw.c index b58ec56b86f8..ce6b9938fde0 100644 --- a/trunk/drivers/net/wimax/i2400m/usb-fw.c +++ b/trunk/drivers/net/wimax/i2400m/usb-fw.c @@ -73,7 +73,6 @@ * i2400m_notif_submit */ #include -#include #include "i2400m-usb.h" diff --git a/trunk/drivers/net/wimax/i2400m/usb-notif.c b/trunk/drivers/net/wimax/i2400m/usb-notif.c index 7b6a1d98bd74..f88d1c6e35cb 100644 --- a/trunk/drivers/net/wimax/i2400m/usb-notif.c +++ b/trunk/drivers/net/wimax/i2400m/usb-notif.c @@ -56,7 +56,6 @@ * i2400mu_rx_kick() */ #include -#include #include "i2400m-usb.h" diff --git a/trunk/drivers/net/wimax/i2400m/usb-rx.c b/trunk/drivers/net/wimax/i2400m/usb-rx.c index a26483a812a5..ba1b02362dfc 100644 --- a/trunk/drivers/net/wimax/i2400m/usb-rx.c +++ b/trunk/drivers/net/wimax/i2400m/usb-rx.c @@ -83,7 +83,6 @@ * i2400mu_rx_release() called from i2400mu_bus_dev_stop() */ #include -#include #include #include "i2400m-usb.h" diff --git a/trunk/drivers/net/wimax/i2400m/usb.c b/trunk/drivers/net/wimax/i2400m/usb.c index d8c4d6497fdf..99f04c475898 100644 --- a/trunk/drivers/net/wimax/i2400m/usb.c +++ b/trunk/drivers/net/wimax/i2400m/usb.c @@ -66,7 +66,6 @@ #include "i2400m-usb.h" #include #include -#include #define D_SUBMODULE usb diff --git a/trunk/drivers/net/wireless/adm8211.c b/trunk/drivers/net/wireless/adm8211.c index ab61d2b558d6..547912e6843f 100644 --- a/trunk/drivers/net/wireless/adm8211.c +++ b/trunk/drivers/net/wireless/adm8211.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/ath/ar9170/main.c b/trunk/drivers/net/wireless/ath/ar9170/main.c index c53692980990..257c734733d1 100644 --- a/trunk/drivers/net/wireless/ath/ar9170/main.c +++ b/trunk/drivers/net/wireless/ath/ar9170/main.c @@ -38,7 +38,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/ath/ar9170/usb.c b/trunk/drivers/net/wireless/ath/ar9170/usb.c index 99a6da464bd3..4e30197afff6 100644 --- a/trunk/drivers/net/wireless/ath/ar9170/usb.c +++ b/trunk/drivers/net/wireless/ath/ar9170/usb.c @@ -38,7 +38,6 @@ */ #include -#include #include #include #include @@ -95,8 +94,6 @@ static struct usb_device_id ar9170_usb_ids[] = { { USB_DEVICE(0x04bb, 0x093f) }, /* AVM FRITZ!WLAN USB Stick N */ { USB_DEVICE(0x057C, 0x8401) }, - /* NEC WL300NU-G */ - { USB_DEVICE(0x0409, 0x0249) }, /* AVM FRITZ!WLAN USB Stick N 2.4 */ { USB_DEVICE(0x057C, 0x8402), .driver_info = AR9170_REQ_FW1_ONLY }, @@ -419,7 +416,7 @@ static int ar9170_usb_exec_cmd(struct ar9170 *ar, enum ar9170_cmd cmd, spin_unlock_irqrestore(&aru->common.cmdlock, flags); usb_fill_int_urb(urb, aru->udev, - usb_sndintpipe(aru->udev, AR9170_EP_CMD), + usb_sndbulkpipe(aru->udev, AR9170_EP_CMD), aru->common.cmdbuf, plen + 4, ar9170_usb_tx_urb_complete, NULL, 1); diff --git a/trunk/drivers/net/wireless/ath/ath5k/attach.c b/trunk/drivers/net/wireless/ath/ath5k/attach.c index dc0786cc2639..42284445b75e 100644 --- a/trunk/drivers/net/wireless/ath/ath5k/attach.c +++ b/trunk/drivers/net/wireless/ath/ath5k/attach.c @@ -21,7 +21,6 @@ \*************************************/ #include -#include #include "ath5k.h" #include "reg.h" #include "debug.h" diff --git a/trunk/drivers/net/wireless/ath/ath5k/base.c b/trunk/drivers/net/wireless/ath/ath5k/base.c index 3abbe7513ab5..8dce0077b023 100644 --- a/trunk/drivers/net/wireless/ath/ath5k/base.c +++ b/trunk/drivers/net/wireless/ath/ath5k/base.c @@ -50,7 +50,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/wireless/ath/ath5k/eeprom.c b/trunk/drivers/net/wireless/ath/ath5k/eeprom.c index 67665cdc7afe..10b52262b232 100644 --- a/trunk/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/trunk/drivers/net/wireless/ath/ath5k/eeprom.c @@ -21,8 +21,6 @@ * EEPROM access functions and helpers * \*************************************/ -#include - #include "ath5k.h" #include "reg.h" #include "debug.h" diff --git a/trunk/drivers/net/wireless/ath/ath5k/phy.c b/trunk/drivers/net/wireless/ath/ath5k/phy.c index 68e2bccd90d3..eff3323efb4b 100644 --- a/trunk/drivers/net/wireless/ath/ath5k/phy.c +++ b/trunk/drivers/net/wireless/ath/ath5k/phy.c @@ -23,7 +23,6 @@ #define _ATH5K_PHY #include -#include #include "ath5k.h" #include "reg.h" diff --git a/trunk/drivers/net/wireless/ath/ath9k/debug.c b/trunk/drivers/net/wireless/ath/ath9k/debug.c index 081e0085ed4c..42d2a506845a 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/debug.c +++ b/trunk/drivers/net/wireless/ath/ath9k/debug.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include "ath9k.h" diff --git a/trunk/drivers/net/wireless/ath/ath9k/hw.c b/trunk/drivers/net/wireless/ath/ath9k/hw.c index 78b571129c92..2e767cf22f1e 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/hw.c +++ b/trunk/drivers/net/wireless/ath/ath9k/hw.c @@ -15,7 +15,6 @@ */ #include -#include #include #include "hw.h" diff --git a/trunk/drivers/net/wireless/ath/ath9k/init.c b/trunk/drivers/net/wireless/ath/ath9k/init.c index 3d4d897add6d..623c2f884987 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/init.c +++ b/trunk/drivers/net/wireless/ath/ath9k/init.c @@ -14,8 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include "ath9k.h" static char *dev_info = "ath9k"; diff --git a/trunk/drivers/net/wireless/ath/ath9k/phy.c b/trunk/drivers/net/wireless/ath/ath9k/phy.c index 2547b3c4a26c..c3b59390fe38 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/phy.c +++ b/trunk/drivers/net/wireless/ath/ath9k/phy.c @@ -39,8 +39,6 @@ * AR9287 - 11n single-band 1x1 MIMO for USB */ -#include - #include "hw.h" /** diff --git a/trunk/drivers/net/wireless/ath/ath9k/rc.c b/trunk/drivers/net/wireless/ath/ath9k/rc.c index 244e1c629177..0e79e58cf4c9 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/rc.c +++ b/trunk/drivers/net/wireless/ath/ath9k/rc.c @@ -15,8 +15,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include "ath9k.h" static const struct ath_rate_table ar5416_11na_ratetable = { diff --git a/trunk/drivers/net/wireless/ath/ath9k/virtual.c b/trunk/drivers/net/wireless/ath/ath9k/virtual.c index 00c0e21a4af7..a43fbf84dab9 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/virtual.c +++ b/trunk/drivers/net/wireless/ath/ath9k/virtual.c @@ -14,8 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include "ath9k.h" struct ath9k_vif_iter_data { diff --git a/trunk/drivers/net/wireless/ath/regd.c b/trunk/drivers/net/wireless/ath/regd.c index 00489c40be0c..04abd1f556b7 100644 --- a/trunk/drivers/net/wireless/ath/regd.c +++ b/trunk/drivers/net/wireless/ath/regd.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include "regd.h" diff --git a/trunk/drivers/net/wireless/b43/dma.c b/trunk/drivers/net/wireless/b43/dma.c index fa40fdfea719..be7abf8916ad 100644 --- a/trunk/drivers/net/wireless/b43/dma.c +++ b/trunk/drivers/net/wireless/b43/dma.c @@ -38,7 +38,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/wireless/b43/lo.c b/trunk/drivers/net/wireless/b43/lo.c index 94e4f1378fc3..976104f634a1 100644 --- a/trunk/drivers/net/wireless/b43/lo.c +++ b/trunk/drivers/net/wireless/b43/lo.c @@ -34,7 +34,6 @@ #include #include -#include static struct b43_lo_calib *b43_find_lo_calib(struct b43_txpower_lo_control *lo, diff --git a/trunk/drivers/net/wireless/b43/main.c b/trunk/drivers/net/wireless/b43/main.c index 9a374ef83a22..1521b1e78d21 100644 --- a/trunk/drivers/net/wireless/b43/main.c +++ b/trunk/drivers/net/wireless/b43/main.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include "b43.h" diff --git a/trunk/drivers/net/wireless/b43/pcmcia.c b/trunk/drivers/net/wireless/b43/pcmcia.c index 609e7051e018..984174bc7b0f 100644 --- a/trunk/drivers/net/wireless/b43/pcmcia.c +++ b/trunk/drivers/net/wireless/b43/pcmcia.c @@ -24,7 +24,6 @@ #include "pcmcia.h" #include -#include #include #include diff --git a/trunk/drivers/net/wireless/b43/phy_a.c b/trunk/drivers/net/wireless/b43/phy_a.c index b6428ec16dd6..d90217c3a706 100644 --- a/trunk/drivers/net/wireless/b43/phy_a.c +++ b/trunk/drivers/net/wireless/b43/phy_a.c @@ -26,8 +26,6 @@ */ -#include - #include "b43.h" #include "phy_a.h" #include "phy_common.h" diff --git a/trunk/drivers/net/wireless/b43/phy_g.c b/trunk/drivers/net/wireless/b43/phy_g.c index 29bf34ced865..382826a8da82 100644 --- a/trunk/drivers/net/wireless/b43/phy_g.c +++ b/trunk/drivers/net/wireless/b43/phy_g.c @@ -33,7 +33,6 @@ #include "main.h" #include -#include static const s8 b43_tssi2dbm_g_table[] = { diff --git a/trunk/drivers/net/wireless/b43/phy_lp.c b/trunk/drivers/net/wireless/b43/phy_lp.c index c6afe9d94590..185219e0a552 100644 --- a/trunk/drivers/net/wireless/b43/phy_lp.c +++ b/trunk/drivers/net/wireless/b43/phy_lp.c @@ -23,8 +23,6 @@ */ -#include - #include "b43.h" #include "main.h" #include "phy_lp.h" diff --git a/trunk/drivers/net/wireless/b43/phy_n.c b/trunk/drivers/net/wireless/b43/phy_n.c index 9c7cd282e46c..795bb1e3345d 100644 --- a/trunk/drivers/net/wireless/b43/phy_n.c +++ b/trunk/drivers/net/wireless/b43/phy_n.c @@ -23,7 +23,6 @@ */ #include -#include #include #include "b43.h" diff --git a/trunk/drivers/net/wireless/b43/pio.c b/trunk/drivers/net/wireless/b43/pio.c index aa12273ae716..a6062c3e89a5 100644 --- a/trunk/drivers/net/wireless/b43/pio.c +++ b/trunk/drivers/net/wireless/b43/pio.c @@ -31,7 +31,6 @@ #include #include -#include static u16 generate_cookie(struct b43_pio_txqueue *q, diff --git a/trunk/drivers/net/wireless/b43/sdio.c b/trunk/drivers/net/wireless/b43/sdio.c index 4e56b7bbcebd..0d3ac64147a5 100644 --- a/trunk/drivers/net/wireless/b43/sdio.c +++ b/trunk/drivers/net/wireless/b43/sdio.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include "sdio.h" diff --git a/trunk/drivers/net/wireless/b43legacy/dma.c b/trunk/drivers/net/wireless/b43legacy/dma.c index e91520d0312e..8b9387c6ff36 100644 --- a/trunk/drivers/net/wireless/b43legacy/dma.c +++ b/trunk/drivers/net/wireless/b43legacy/dma.c @@ -37,7 +37,6 @@ #include #include #include -#include #include /* 32bit DMA ops. */ diff --git a/trunk/drivers/net/wireless/b43legacy/main.c b/trunk/drivers/net/wireless/b43legacy/main.c index bb2dd9329aa0..1d070be5a678 100644 --- a/trunk/drivers/net/wireless/b43legacy/main.c +++ b/trunk/drivers/net/wireless/b43legacy/main.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/b43legacy/phy.c b/trunk/drivers/net/wireless/b43legacy/phy.c index 35033dd342ce..aaf227203a98 100644 --- a/trunk/drivers/net/wireless/b43legacy/phy.c +++ b/trunk/drivers/net/wireless/b43legacy/phy.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "b43legacy.h" diff --git a/trunk/drivers/net/wireless/b43legacy/pio.c b/trunk/drivers/net/wireless/b43legacy/pio.c index b033b0ed4ca0..017c0e9c37ef 100644 --- a/trunk/drivers/net/wireless/b43legacy/pio.c +++ b/trunk/drivers/net/wireless/b43legacy/pio.c @@ -29,7 +29,6 @@ #include "xmit.h" #include -#include static void tx_start(struct b43legacy_pioqueue *queue) diff --git a/trunk/drivers/net/wireless/hostap/hostap_80211_rx.c b/trunk/drivers/net/wireless/hostap/hostap_80211_rx.c index f4c56121d387..3816df96a663 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/trunk/drivers/net/wireless/hostap/hostap_80211_rx.c @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/hostap/hostap_80211_tx.c b/trunk/drivers/net/wireless/hostap/hostap_80211_tx.c index c34a3b7f1292..90108b698f11 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/trunk/drivers/net/wireless/hostap/hostap_80211_tx.c @@ -1,5 +1,3 @@ -#include - #include "hostap_80211.h" #include "hostap_common.h" #include "hostap_wlan.h" diff --git a/trunk/drivers/net/wireless/hostap/hostap_ap.c b/trunk/drivers/net/wireless/hostap/hostap_ap.c index 7e72ac1de49b..a2a203c90ba3 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_ap.c +++ b/trunk/drivers/net/wireless/hostap/hostap_ap.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "hostap_wlan.h" #include "hostap.h" diff --git a/trunk/drivers/net/wireless/hostap/hostap_cs.c b/trunk/drivers/net/wireless/hostap/hostap_cs.c index a36501dbbe02..d19748d90aaf 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_cs.c +++ b/trunk/drivers/net/wireless/hostap/hostap_cs.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/hostap/hostap_info.c b/trunk/drivers/net/wireless/hostap/hostap_info.c index d737091cf6ac..4dfb40a84c96 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_info.c +++ b/trunk/drivers/net/wireless/hostap/hostap_info.c @@ -2,7 +2,6 @@ #include #include -#include #include "hostap_wlan.h" #include "hostap.h" #include "hostap_ap.h" diff --git a/trunk/drivers/net/wireless/hostap/hostap_ioctl.c b/trunk/drivers/net/wireless/hostap/hostap_ioctl.c index 9a082308a9d4..9419cebca8a5 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/trunk/drivers/net/wireless/hostap/hostap_ioctl.c @@ -1,6 +1,5 @@ /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/hostap/hostap_pci.c b/trunk/drivers/net/wireless/hostap/hostap_pci.c index d24dc7dc0723..4d97ae37499b 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_pci.c +++ b/trunk/drivers/net/wireless/hostap/hostap_pci.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/hostap/hostap_plx.c b/trunk/drivers/net/wireless/hostap/hostap_plx.c index 33e79037770b..fc04ccdc5bef 100644 --- a/trunk/drivers/net/wireless/hostap/hostap_plx.c +++ b/trunk/drivers/net/wireless/hostap/hostap_plx.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/ipw2x00/ipw2200.c b/trunk/drivers/net/wireless/ipw2x00/ipw2200.c index 8d72e3d19586..5c7aa1b1eb56 100644 --- a/trunk/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/trunk/drivers/net/wireless/ipw2x00/ipw2200.c @@ -31,7 +31,6 @@ ******************************************************************************/ #include -#include #include "ipw2200.h" diff --git a/trunk/drivers/net/wireless/ipw2x00/libipw_geo.c b/trunk/drivers/net/wireless/ipw2x00/libipw_geo.c index c9fe3c99cb00..65e8c175a4a0 100644 --- a/trunk/drivers/net/wireless/ipw2x00/libipw_geo.c +++ b/trunk/drivers/net/wireless/ipw2x00/libipw_geo.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wireless/ipw2x00/libipw_rx.c b/trunk/drivers/net/wireless/ipw2x00/libipw_rx.c index 39a34da52d52..282b1f7ff1e9 100644 --- a/trunk/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/trunk/drivers/net/wireless/ipw2x00/libipw_rx.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wireless/ipw2x00/libipw_wx.c b/trunk/drivers/net/wireless/ipw2x00/libipw_wx.c index 3633c6682e49..4d89f66f53b2 100644 --- a/trunk/drivers/net/wireless/ipw2x00/libipw_wx.c +++ b/trunk/drivers/net/wireless/ipw2x00/libipw_wx.c @@ -31,7 +31,6 @@ ******************************************************************************/ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/trunk/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 902c4d4293e9..47909f94271e 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-3945-rs.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c b/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c index 0728054a22d4..e0678d921055 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c b/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c index 83c52a682622..1bd2cd836026 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-4965.c @@ -2041,14 +2041,16 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, tx_resp->failure_frame); freed = iwl_tx_queue_reclaim(priv, txq_id, index); - iwl_free_tfds_in_queue(priv, sta_id, tid, freed); + if (qc && likely(sta_id != IWL_INVALID_STATION)) + priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; if (priv->mac80211_registered && (iwl_queue_space(&txq->q) > txq->q.low_mark)) iwl_wake_queue(priv, txq_id); } - iwl_txq_check_empty(priv, sta_id, tid, txq_id); + if (qc && likely(sta_id != IWL_INVALID_STATION)) + iwl_txq_check_empty(priv, sta_id, tid, txq_id); if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 35f819ac87a3..8bf7c20b9d39 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c index 8b8e3e1cbb44..818367b57bab 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -1259,15 +1258,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) /* Ack/clear/reset pending uCode interrupts. * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, */ - /* There is a hardware bug in the interrupt mask function that some - * interrupts (i.e. CSR_INT_BIT_SCD) can still be generated even if - * they are disabled in the CSR_INT_MASK register. Furthermore the - * ICT interrupt handling mechanism has another bug that might cause - * these unmasked interrupts fail to be detected. We workaround the - * hardware bugs here by ACKing all the possible interrupts so that - * interrupt coalescing can still be achieved. - */ - iwl_write32(priv, CSR_INT, priv->inta | ~priv->inta_mask); + iwl_write32(priv, CSR_INT, priv->inta); inta = priv->inta; @@ -2653,7 +2644,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv) BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); - hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY | + hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY | WIPHY_FLAG_DISABLE_BEACON_HINTS; /* diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-calib.c b/trunk/drivers/net/wireless/iwlwifi/iwl-calib.c index de3b3f403d1f..845831ac053e 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-calib.c @@ -60,7 +60,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#include #include #include "iwl-dev.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-core.c b/trunk/drivers/net/wireless/iwlwifi/iwl-core.c index db050b811232..112149e9b31e 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-core.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "iwl-eeprom.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c index b6e1b0ebe230..7bf44f146799 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c @@ -26,7 +26,6 @@ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *****************************************************************************/ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.c index 2ffc2edbf4f0..36580d8d8b8d 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.c @@ -28,8 +28,6 @@ /* sparse doesn't like tracepoint macros */ #ifndef __CHECKER__ -#include "iwl-dev.h" - #define CREATE_TRACE_POINTS #include "iwl-devtrace.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h index ae7319bb3a99..ff4d012ce260 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-devtrace.h @@ -28,6 +28,7 @@ #define __IWLWIFI_DEVICE_TRACE #include +#include "iwl-dev.h" #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__) #undef TRACE_EVENT diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c index fb5bb487f3bc..fd37152abae3 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -63,7 +63,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-io.h b/trunk/drivers/net/wireless/iwlwifi/iwl-io.h index 16eb3ced9b30..c719baf2585a 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-io.h +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-io.h @@ -31,7 +31,6 @@ #include -#include "iwl-dev.h" #include "iwl-debug.h" #include "iwl-devtrace.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-power.c b/trunk/drivers/net/wireless/iwlwifi/iwl-power.c index 548dac2f6a96..1a1a9f081cc7 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-power.c @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-rx.c b/trunk/drivers/net/wireless/iwlwifi/iwl-rx.c index e5eb339107dd..df257bc15f49 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-rx.c @@ -28,7 +28,6 @@ *****************************************************************************/ #include -#include #include #include #include "iwl-eeprom.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-scan.c b/trunk/drivers/net/wireless/iwlwifi/iwl-scan.c index 9ab0e412bf10..bd2f7c420563 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -25,7 +25,6 @@ * Intel Linux Wireless * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *****************************************************************************/ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-tx.c b/trunk/drivers/net/wireless/iwlwifi/iwl-tx.c index f0b7e6cfbe4f..8c12311dbb0a 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-tx.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "iwl-eeprom.h" #include "iwl-dev.h" diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c index b55e4f39a9e1..54daa38ecba3 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -1956,7 +1955,7 @@ static void iwl3945_init_hw_rates(struct iwl_priv *priv, { int i; - for (i = 0; i < IWL_RATE_COUNT_LEGACY; i++) { + for (i = 0; i < IWL_RATE_COUNT; i++) { rates[i].bitrate = iwl3945_rates[i].ieee * 5; rates[i].hw_value = i; /* Rate scaling will work on indexes */ rates[i].hw_value_short = i; @@ -3922,7 +3921,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv) BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); - hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY | + hw->wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY | WIPHY_FLAG_DISABLE_BEACON_HINTS; hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945; diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/trunk/drivers/net/wireless/iwmc3200wifi/cfg80211.c index a1d45cce0ebc..7c4f44a9c3e6 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/cfg80211.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "iwm.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/commands.c b/trunk/drivers/net/wireless/iwmc3200wifi/commands.c index 42df7262f9f7..1e41ad0fcad5 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/commands.c @@ -41,7 +41,6 @@ #include #include #include -#include #include "iwm.h" #include "bus.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/debugfs.c b/trunk/drivers/net/wireless/iwmc3200wifi/debugfs.c index cbb81befdb55..c29c994de0e2 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/debugfs.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/debugfs.c @@ -21,7 +21,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/eeprom.c b/trunk/drivers/net/wireless/iwmc3200wifi/eeprom.c index e80e776b74f7..8091421ee5e5 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/eeprom.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/eeprom.c @@ -37,7 +37,6 @@ */ #include -#include #include "iwm.h" #include "umac.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/hal.c b/trunk/drivers/net/wireless/iwmc3200wifi/hal.c index 229de990379c..d13c8853ee82 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/hal.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/hal.c @@ -98,7 +98,6 @@ */ #include #include -#include #include "iwm.h" #include "bus.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/main.c b/trunk/drivers/net/wireless/iwmc3200wifi/main.c index 23856d359e12..7f34d6dd3c41 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/main.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/main.c @@ -41,7 +41,6 @@ #include #include #include -#include #include "iwm.h" #include "debug.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/netdev.c b/trunk/drivers/net/wireless/iwmc3200wifi/netdev.c index 13a69ebf2a94..c4c0d23c63ec 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/netdev.c @@ -46,7 +46,6 @@ * -> sdio_disable_func() */ #include -#include #include "iwm.h" #include "commands.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/rx.c b/trunk/drivers/net/wireless/iwmc3200wifi/rx.c index 3257d4fad835..8456b4dbd146 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/rx.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include "iwm.h" diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/sdio.c b/trunk/drivers/net/wireless/iwmc3200wifi/sdio.c index 1eafd6dec3fd..a7ec7eac9137 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/sdio.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/sdio.c @@ -63,7 +63,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/iwmc3200wifi/tx.c b/trunk/drivers/net/wireless/iwmc3200wifi/tx.c index f6a02f123f31..55905f02309c 100644 --- a/trunk/drivers/net/wireless/iwmc3200wifi/tx.c +++ b/trunk/drivers/net/wireless/iwmc3200wifi/tx.c @@ -64,7 +64,6 @@ * (i.e. half of the max size). [iwm_tx_worker] */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas/assoc.c b/trunk/drivers/net/wireless/libertas/assoc.c index 12a2ef9dacea..f03d5e4e59c3 100644 --- a/trunk/drivers/net/wireless/libertas/assoc.c +++ b/trunk/drivers/net/wireless/libertas/assoc.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "assoc.h" diff --git a/trunk/drivers/net/wireless/libertas/cfg.c b/trunk/drivers/net/wireless/libertas/cfg.c index ce7bec402a33..4396dccd12ac 100644 --- a/trunk/drivers/net/wireless/libertas/cfg.c +++ b/trunk/drivers/net/wireless/libertas/cfg.c @@ -6,7 +6,6 @@ * */ -#include #include #include "cfg.h" @@ -173,8 +172,6 @@ int lbs_cfg_register(struct lbs_private *priv) if (ret < 0) lbs_pr_err("cannot register wiphy device\n"); - priv->wiphy_registered = true; - ret = register_netdev(priv->dev); if (ret) lbs_pr_err("cannot register network device\n"); @@ -193,11 +190,9 @@ void lbs_cfg_free(struct lbs_private *priv) if (!wdev) return; - if (priv->wiphy_registered) + if (wdev->wiphy) { wiphy_unregister(wdev->wiphy); - - if (wdev->wiphy) wiphy_free(wdev->wiphy); - + } kfree(wdev); } diff --git a/trunk/drivers/net/wireless/libertas/cmd.c b/trunk/drivers/net/wireless/libertas/cmd.c index cdb9b9650d73..82371ef39524 100644 --- a/trunk/drivers/net/wireless/libertas/cmd.c +++ b/trunk/drivers/net/wireless/libertas/cmd.c @@ -5,7 +5,6 @@ #include #include -#include #include "host.h" #include "decl.h" diff --git a/trunk/drivers/net/wireless/libertas/cmdresp.c b/trunk/drivers/net/wireless/libertas/cmdresp.c index 88f7131d66e9..e7470442f76b 100644 --- a/trunk/drivers/net/wireless/libertas/cmdresp.c +++ b/trunk/drivers/net/wireless/libertas/cmdresp.c @@ -2,7 +2,6 @@ * This file contains the handling of command * responses as well as events generated by firmware. */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas/debugfs.c b/trunk/drivers/net/wireless/libertas/debugfs.c index a48ccaffb288..587b0cb0088d 100644 --- a/trunk/drivers/net/wireless/libertas/debugfs.c +++ b/trunk/drivers/net/wireless/libertas/debugfs.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/libertas/dev.h b/trunk/drivers/net/wireless/libertas/dev.h index 6875e1498bd5..6977ee820214 100644 --- a/trunk/drivers/net/wireless/libertas/dev.h +++ b/trunk/drivers/net/wireless/libertas/dev.h @@ -36,7 +36,6 @@ struct lbs_private { /* CFG80211 */ struct wireless_dev *wdev; - bool wiphy_registered; /* Mesh */ struct net_device *mesh_dev; /* Virtual device */ diff --git a/trunk/drivers/net/wireless/libertas/if_cs.c b/trunk/drivers/net/wireless/libertas/if_cs.c index 6d55439a7b97..1f6cb58dd66c 100644 --- a/trunk/drivers/net/wireless/libertas/if_cs.c +++ b/trunk/drivers/net/wireless/libertas/if_cs.c @@ -22,7 +22,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas/if_sdio.c b/trunk/drivers/net/wireless/libertas/if_sdio.c index 7d1a3c6b6ce0..7a73f625273b 100644 --- a/trunk/drivers/net/wireless/libertas/if_sdio.c +++ b/trunk/drivers/net/wireless/libertas/if_sdio.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas/if_spi.c b/trunk/drivers/net/wireless/libertas/if_spi.c index fe3f08028eb3..3ea03f259ee7 100644 --- a/trunk/drivers/net/wireless/libertas/if_spi.c +++ b/trunk/drivers/net/wireless/libertas/if_spi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/libertas/if_usb.c b/trunk/drivers/net/wireless/libertas/if_usb.c index fcea5741ba62..65e174595d12 100644 --- a/trunk/drivers/net/wireless/libertas/if_usb.c +++ b/trunk/drivers/net/wireless/libertas/if_usb.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #ifdef CONFIG_OLPC diff --git a/trunk/drivers/net/wireless/libertas/main.c b/trunk/drivers/net/wireless/libertas/main.c index 598080414b17..28a1c9d1627a 100644 --- a/trunk/drivers/net/wireless/libertas/main.c +++ b/trunk/drivers/net/wireless/libertas/main.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/libertas/rx.c b/trunk/drivers/net/wireless/libertas/rx.c index 784dae714705..2daf8ffdb7e1 100644 --- a/trunk/drivers/net/wireless/libertas/rx.c +++ b/trunk/drivers/net/wireless/libertas/rx.c @@ -2,7 +2,6 @@ * This file contains the handling of RX in wlan driver. */ #include -#include #include #include "host.h" diff --git a/trunk/drivers/net/wireless/libertas/scan.c b/trunk/drivers/net/wireless/libertas/scan.c index 24cd54b3a806..220361e69cd3 100644 --- a/trunk/drivers/net/wireless/libertas/scan.c +++ b/trunk/drivers/net/wireless/libertas/scan.c @@ -4,7 +4,6 @@ * IOCTL handlers as well as command preperation and response routines * for sending scan commands to the firmware. */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas/wext.c b/trunk/drivers/net/wireless/libertas/wext.c index 9b555884b08a..71f88a08e090 100644 --- a/trunk/drivers/net/wireless/libertas/wext.c +++ b/trunk/drivers/net/wireless/libertas/wext.c @@ -2,7 +2,6 @@ * This file contains ioctl functions */ #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/libertas_tf/cmd.c b/trunk/drivers/net/wireless/libertas_tf/cmd.c index b620daf59ef7..28790e03dc43 100644 --- a/trunk/drivers/net/wireless/libertas_tf/cmd.c +++ b/trunk/drivers/net/wireless/libertas_tf/cmd.c @@ -7,8 +7,6 @@ * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. */ -#include - #include "libertas_tf.h" static const struct channel_range channel_ranges[] = { diff --git a/trunk/drivers/net/wireless/libertas_tf/if_usb.c b/trunk/drivers/net/wireless/libertas_tf/if_usb.c index 8cc9db60c14b..3691c307e674 100644 --- a/trunk/drivers/net/wireless/libertas_tf/if_usb.c +++ b/trunk/drivers/net/wireless/libertas_tf/if_usb.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #define DRV_NAME "lbtf_usb" diff --git a/trunk/drivers/net/wireless/libertas_tf/main.c b/trunk/drivers/net/wireless/libertas_tf/main.c index 7945ff5aa334..6ab30033c26c 100644 --- a/trunk/drivers/net/wireless/libertas_tf/main.c +++ b/trunk/drivers/net/wireless/libertas_tf/main.c @@ -7,8 +7,6 @@ * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. */ -#include - #include "libertas_tf.h" #include "linux/etherdevice.h" diff --git a/trunk/drivers/net/wireless/mac80211_hwsim.c b/trunk/drivers/net/wireless/mac80211_hwsim.c index 7cd5f56662fc..6ea77e95277b 100644 --- a/trunk/drivers/net/wireless/mac80211_hwsim.c +++ b/trunk/drivers/net/wireless/mac80211_hwsim.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/mwl8k.c b/trunk/drivers/net/wireless/mwl8k.c index 12fdcb25fd38..ac65e13eb0de 100644 --- a/trunk/drivers/net/wireless/mwl8k.c +++ b/trunk/drivers/net/wireless/mwl8k.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -3852,7 +3851,6 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw"); MODULE_FIRMWARE("mwl8k/fmimage_8366.fw"); static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = { - { PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, }, { PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, }, { PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, }, { PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = MWL8687, }, diff --git a/trunk/drivers/net/wireless/orinoco/fw.c b/trunk/drivers/net/wireless/orinoco/fw.c index 5ea0f7cf85b1..cfa72962052b 100644 --- a/trunk/drivers/net/wireless/orinoco/fw.c +++ b/trunk/drivers/net/wireless/orinoco/fw.c @@ -3,7 +3,6 @@ * See copyright notice in main.c */ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/orinoco/main.c b/trunk/drivers/net/wireless/orinoco/main.c index 413e9ab6cab3..b42634c614b5 100644 --- a/trunk/drivers/net/wireless/orinoco/main.c +++ b/trunk/drivers/net/wireless/orinoco/main.c @@ -78,7 +78,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/orinoco/scan.c b/trunk/drivers/net/wireless/orinoco/scan.c index 330d42d45333..d2f10e9c2162 100644 --- a/trunk/drivers/net/wireless/orinoco/scan.c +++ b/trunk/drivers/net/wireless/orinoco/scan.c @@ -3,7 +3,6 @@ * See copyright notice in main.c */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/orinoco/wext.c b/trunk/drivers/net/wireless/orinoco/wext.c index fbcc6e1a2e1d..31ca241f7753 100644 --- a/trunk/drivers/net/wireless/orinoco/wext.c +++ b/trunk/drivers/net/wireless/orinoco/wext.c @@ -2,7 +2,6 @@ * * See copyright notice in main.c */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/p54/eeprom.c b/trunk/drivers/net/wireless/p54/eeprom.c index 187e263b045a..8e3818f6832e 100644 --- a/trunk/drivers/net/wireless/p54/eeprom.c +++ b/trunk/drivers/net/wireless/p54/eeprom.c @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/net/wireless/p54/fwio.c b/trunk/drivers/net/wireless/p54/fwio.c index c43a5d461ab2..e7b9e9cb39f5 100644 --- a/trunk/drivers/net/wireless/p54/fwio.c +++ b/trunk/drivers/net/wireless/p54/fwio.c @@ -17,7 +17,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/p54/main.c b/trunk/drivers/net/wireless/p54/main.c index a7cb9eb759a1..4f752a21495f 100644 --- a/trunk/drivers/net/wireless/p54/main.c +++ b/trunk/drivers/net/wireless/p54/main.c @@ -17,7 +17,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/p54/p54pci.c b/trunk/drivers/net/wireless/p54/p54pci.c index 269fda362836..ed4bdffdd63e 100644 --- a/trunk/drivers/net/wireless/p54/p54pci.c +++ b/trunk/drivers/net/wireless/p54/p54pci.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/p54/p54spi.c b/trunk/drivers/net/wireless/p54/p54spi.c index c8f09da1f84d..afd26bf06649 100644 --- a/trunk/drivers/net/wireless/p54/p54spi.c +++ b/trunk/drivers/net/wireless/p54/p54spi.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "p54spi.h" #include "p54spi_eeprom.h" diff --git a/trunk/drivers/net/wireless/p54/p54usb.c b/trunk/drivers/net/wireless/p54/p54usb.c index 743a6c68b29d..b3c4fbd80d8d 100644 --- a/trunk/drivers/net/wireless/p54/p54usb.c +++ b/trunk/drivers/net/wireless/p54/p54usb.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ MODULE_FIRMWARE("isl3887usb"); static struct usb_device_id p54u_table[] __devinitdata = { /* Version 1 devices (pci chip + net2280) */ {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ - {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */ {USB_DEVICE(0x083a, 0x4501)}, /* Accton 802.11g WN4501 USB */ diff --git a/trunk/drivers/net/wireless/prism54/isl_ioctl.c b/trunk/drivers/net/wireless/prism54/isl_ioctl.c index a45818ebfdfb..f7f5c793514b 100644 --- a/trunk/drivers/net/wireless/prism54/isl_ioctl.c +++ b/trunk/drivers/net/wireless/prism54/isl_ioctl.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/prism54/islpci_dev.c b/trunk/drivers/net/wireless/prism54/islpci_dev.c index 689d59a13d5b..a3ba3539db02 100644 --- a/trunk/drivers/net/wireless/prism54/islpci_dev.c +++ b/trunk/drivers/net/wireless/prism54/islpci_dev.c @@ -19,7 +19,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/prism54/islpci_eth.c b/trunk/drivers/net/wireless/prism54/islpci_eth.c index ac99eaaeabce..872b64783e78 100644 --- a/trunk/drivers/net/wireless/prism54/islpci_eth.c +++ b/trunk/drivers/net/wireless/prism54/islpci_eth.c @@ -17,7 +17,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/net/wireless/prism54/islpci_mgt.c b/trunk/drivers/net/wireless/prism54/islpci_mgt.c index adb289723a96..69d2f882fd06 100644 --- a/trunk/drivers/net/wireless/prism54/islpci_mgt.c +++ b/trunk/drivers/net/wireless/prism54/islpci_mgt.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/prism54/islpci_mgt.h b/trunk/drivers/net/wireless/prism54/islpci_mgt.h index 0b27e50fe0d5..87a1734663da 100644 --- a/trunk/drivers/net/wireless/prism54/islpci_mgt.h +++ b/trunk/drivers/net/wireless/prism54/islpci_mgt.h @@ -22,7 +22,6 @@ #include #include -#include /* * Function definitions diff --git a/trunk/drivers/net/wireless/prism54/oid_mgt.c b/trunk/drivers/net/wireless/prism54/oid_mgt.c index d66933d70fb9..1187e6112a64 100644 --- a/trunk/drivers/net/wireless/prism54/oid_mgt.c +++ b/trunk/drivers/net/wireless/prism54/oid_mgt.c @@ -17,7 +17,6 @@ */ #include -#include #include "prismcompat.h" #include "islpci_dev.h" diff --git a/trunk/drivers/net/wireless/ray_cs.c b/trunk/drivers/net/wireless/ray_cs.c index 11865ea21875..84c530aa52f9 100644 --- a/trunk/drivers/net/wireless/ray_cs.c +++ b/trunk/drivers/net/wireless/ray_cs.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/wireless/rndis_wlan.c b/trunk/drivers/net/wireless/rndis_wlan.c index 1de5b22d3efe..2887047069f2 100644 --- a/trunk/drivers/net/wireless/rndis_wlan.c +++ b/trunk/drivers/net/wireless/rndis_wlan.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/rt2x00/rt2400pci.c b/trunk/drivers/net/wireless/rt2x00/rt2400pci.c index 5f5204b82891..c22b04042d5c 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2400pci.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "rt2x00.h" #include "rt2x00pci.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2500pci.c b/trunk/drivers/net/wireless/rt2x00/rt2500pci.c index 2a73f593aab0..52bbcf1bd17c 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2500pci.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "rt2x00.h" #include "rt2x00pci.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2500usb.c b/trunk/drivers/net/wireless/rt2x00/rt2500usb.c index 8ebb705fe106..9b04964deced 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2500usb.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "rt2x00.h" @@ -1643,11 +1642,6 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) char *tx_power; unsigned int i; - /* - * Disable powersaving as default. - */ - rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; - /* * Initialize all hw fields. */ diff --git a/trunk/drivers/net/wireless/rt2x00/rt2800lib.c b/trunk/drivers/net/wireless/rt2x00/rt2800lib.c index c015ce9fdd09..18d4d8e4ae6b 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2800lib.c @@ -35,7 +35,6 @@ #include #include -#include #include "rt2x00.h" #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) @@ -813,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev, rt2800_rfcsr_write(rt2x00dev, 24, rt2x00dev->calibration[conf_is_ht40(conf)]); - rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr); + rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr); rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1); - rt2800_rfcsr_write(rt2x00dev, 7, rfcsr); + rt2800_rfcsr_write(rt2x00dev, 23, rfcsr); } static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00debug.c b/trunk/drivers/net/wireless/rt2x00/rt2x00debug.c index 9569fb4e5bc5..28a1c46ec4eb 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00debug.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "rt2x00.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c b/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c index eda73ba735a6..dd5ab8fe2321 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -25,7 +25,6 @@ #include #include -#include #include "rt2x00.h" #include "rt2x00lib.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00pci.c b/trunk/drivers/net/wireless/rt2x00/rt2x00pci.c index cf3f1c0c4382..047123b766fc 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00pci.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "rt2x00.h" #include "rt2x00pci.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00queue.c b/trunk/drivers/net/wireless/rt2x00/rt2x00queue.c index a0bd36fc4d2e..5b6b789cad3d 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -24,7 +24,6 @@ Abstract: rt2x00 queue specific routines. */ -#include #include #include #include diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00soc.c b/trunk/drivers/net/wireless/rt2x00/rt2x00soc.c index fc98063de71d..111c0ff5c6c7 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00soc.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00soc.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "rt2x00.h" #include "rt2x00soc.h" diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c b/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c index f9a7f8b17411..0a751e73aa0f 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/rt2x00/rt61pci.c b/trunk/drivers/net/wireless/rt2x00/rt61pci.c index 432e75f960b7..177472742172 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt61pci.c +++ b/trunk/drivers/net/wireless/rt2x00/rt61pci.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/wireless/rt2x00/rt73usb.c b/trunk/drivers/net/wireless/rt2x00/rt73usb.c index bb58d797fb72..290d70bc5d22 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt73usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt73usb.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "rt2x00.h" diff --git a/trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c b/trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c index 2131a442831a..2b928ecf47bd 100644 --- a/trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/rtl818x/rtl8187_dev.c b/trunk/drivers/net/wireless/rtl818x/rtl8187_dev.c index 1d30792973f5..0fb850e0c656 100644 --- a/trunk/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/trunk/drivers/net/wireless/rtl818x/rtl8187_dev.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c index 91891f928070..beff084040b5 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c @@ -1,7 +1,6 @@ #include "wl1251_acx.h" #include -#include #include #include "wl1251.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_boot.c b/trunk/drivers/net/wireless/wl12xx/wl1251_boot.c index d5ac79aeaa73..28a808674080 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_boot.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_boot.c @@ -22,7 +22,6 @@ */ #include -#include #include "wl1251_reg.h" #include "wl1251_boot.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_cmd.c b/trunk/drivers/net/wireless/wl12xx/wl1251_cmd.c index a37b30cef489..0320b478bb3f 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_cmd.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_cmd.c @@ -1,7 +1,6 @@ #include "wl1251_cmd.h" #include -#include #include #include "wl1251.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/trunk/drivers/net/wireless/wl12xx/wl1251_debugfs.c index 5e4465ac08fa..05e4d68eb4cc 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_debugfs.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_debugfs.c @@ -24,7 +24,6 @@ #include "wl1251_debugfs.h" #include -#include #include "wl1251.h" #include "wl1251_acx.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_init.c b/trunk/drivers/net/wireless/wl12xx/wl1251_init.c index b538bdd7b320..5aad56ea7153 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_init.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_init.c @@ -23,7 +23,6 @@ #include #include -#include #include "wl1251_init.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_main.c b/trunk/drivers/net/wireless/wl12xx/wl1251_main.c index 1c8226eee409..24ae6a360ac8 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_main.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "wl1251.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_rx.c b/trunk/drivers/net/wireless/wl12xx/wl1251_rx.c index 6f229e0990f4..b56732226cc0 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_rx.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_rx.c @@ -23,7 +23,6 @@ */ #include -#include #include #include "wl1251.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_spi.c b/trunk/drivers/net/wireless/wl12xx/wl1251_spi.c index 3bfb59bd4635..9cc8c323830f 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_spi.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_spi.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_acx.c b/trunk/drivers/net/wireless/wl12xx/wl1271_acx.c index 308782421fce..60f10dce4800 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_acx.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "wl1271.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_boot.c b/trunk/drivers/net/wireless/wl12xx/wl1271_boot.c index 024356263065..2be76ee42bb9 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_boot.c @@ -22,7 +22,6 @@ */ #include -#include #include "wl1271_acx.h" #include "wl1271_reg.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c b/trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c index e7832f3318eb..36a64e06f290 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "wl1271.h" #include "wl1271_reg.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_debugfs.c b/trunk/drivers/net/wireless/wl12xx/wl1271_debugfs.c index 3f7ff8d0cf5a..8d7588ca68fd 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_debugfs.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_debugfs.c @@ -24,7 +24,6 @@ #include "wl1271_debugfs.h" #include -#include #include "wl1271.h" #include "wl1271_acx.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_init.c b/trunk/drivers/net/wireless/wl12xx/wl1271_init.c index d189e8fe05a6..86c30a86a456 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_init.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_init.c @@ -23,7 +23,6 @@ #include #include -#include #include "wl1271_init.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_main.c b/trunk/drivers/net/wireless/wl12xx/wl1271_main.c index 65a1aeba2419..2a864b24291d 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_main.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "wl1271.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_rx.c b/trunk/drivers/net/wireless/wl12xx/wl1271_rx.c index c723d9c7e131..6730f5b96e76 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_rx.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_rx.c @@ -21,8 +21,6 @@ * */ -#include - #include "wl1271.h" #include "wl1271_acx.h" #include "wl1271_reg.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_spi.c b/trunk/drivers/net/wireless/wl12xx/wl1271_spi.c index 053c84aceb49..67a82934f36e 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_spi.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_spi.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "wl1271.h" #include "wl12xx_80211.h" diff --git a/trunk/drivers/net/wireless/wl12xx/wl1271_testmode.c b/trunk/drivers/net/wireless/wl12xx/wl1271_testmode.c index 5c1c4f565fd8..3919102e942e 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1271_testmode.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1271_testmode.c @@ -22,7 +22,6 @@ */ #include "wl1271_testmode.h" -#include #include #include "wl1271.h" diff --git a/trunk/drivers/net/wireless/zd1201.c b/trunk/drivers/net/wireless/zd1201.c index 9d1277874645..6917286edcae 100644 --- a/trunk/drivers/net/wireless/zd1201.c +++ b/trunk/drivers/net/wireless/zd1201.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_chip.c b/trunk/drivers/net/wireless/zd1211rw/zd_chip.c index b2af3c549bb3..7ca95c414fa8 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_chip.c @@ -25,7 +25,6 @@ #include #include -#include #include "zd_def.h" #include "zd_chip.h" diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_mac.c b/trunk/drivers/net/wireless/zd1211rw/zd_mac.c index 16fa289ad77b..00e09e26c826 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_mac.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/trunk/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c index 9e74eb1b67d5..439799b84876 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c @@ -19,7 +19,6 @@ */ #include -#include #include "zd_rf.h" #include "zd_usb.h" diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c index d91ad1a612af..442fc1117326 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/net/xen-netfront.c b/trunk/drivers/net/xen-netfront.c index d504e2b60257..a869b45d3d37 100644 --- a/trunk/drivers/net/xen-netfront.c +++ b/trunk/drivers/net/xen-netfront.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/xilinx_emaclite.c b/trunk/drivers/net/xilinx_emaclite.c index 1e783ccc306e..1a74594224b1 100644 --- a/trunk/drivers/net/xilinx_emaclite.c +++ b/trunk/drivers/net/xilinx_emaclite.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/xtsonic.c b/trunk/drivers/net/xtsonic.c index fdba9cb3a599..389ba9df7120 100644 --- a/trunk/drivers/net/xtsonic.c +++ b/trunk/drivers/net/xtsonic.c @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/net/yellowfin.c b/trunk/drivers/net/yellowfin.c index ede5b2436f22..7d4107f5eeb0 100644 --- a/trunk/drivers/net/yellowfin.c +++ b/trunk/drivers/net/yellowfin.c @@ -90,6 +90,7 @@ static int gx_fix; #include #include #include +#include #include #include #include diff --git a/trunk/drivers/net/znet.c b/trunk/drivers/net/znet.c index dbfef8d70f2d..def49d2ec69a 100644 --- a/trunk/drivers/net/znet.c +++ b/trunk/drivers/net/znet.c @@ -88,7 +88,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/nubus/nubus.c b/trunk/drivers/nubus/nubus.c index b764ac22d523..f5f75844954c 100644 --- a/trunk/drivers/nubus/nubus.c +++ b/trunk/drivers/nubus/nubus.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/of/base.c b/trunk/drivers/of/base.c index b5ad9740d8b2..cb96888d1427 100644 --- a/trunk/drivers/of/base.c +++ b/trunk/drivers/of/base.c @@ -20,7 +20,6 @@ #include #include #include -#include #include struct device_node *allnodes; diff --git a/trunk/drivers/of/fdt.c b/trunk/drivers/of/fdt.c index dee4fb56b094..406757a9d7ea 100644 --- a/trunk/drivers/of/fdt.c +++ b/trunk/drivers/of/fdt.c @@ -376,11 +376,8 @@ unsigned long __init unflatten_dt_node(unsigned long mem, if (!np->type) np->type = ""; } - while (tag == OF_DT_BEGIN_NODE || tag == OF_DT_NOP) { - if (tag == OF_DT_NOP) - *p += 4; - else - mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize); + while (tag == OF_DT_BEGIN_NODE) { + mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize); tag = be32_to_cpup((__be32 *)(*p)); } if (tag != OF_DT_END_NODE) { diff --git a/trunk/drivers/of/gpio.c b/trunk/drivers/of/gpio.c index a1b31a4abae4..24c3606217f8 100644 --- a/trunk/drivers/of/gpio.c +++ b/trunk/drivers/of/gpio.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/oprofile/buffer_sync.c b/trunk/drivers/oprofile/buffer_sync.c index a9352b2c7ac4..c9e2ae90f195 100644 --- a/trunk/drivers/oprofile/buffer_sync.c +++ b/trunk/drivers/oprofile/buffer_sync.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "oprofile_stats.h" #include "event_buffer.h" diff --git a/trunk/drivers/parisc/asp.c b/trunk/drivers/parisc/asp.c index 6a1ab2512a53..9ca21098b146 100644 --- a/trunk/drivers/parisc/asp.c +++ b/trunk/drivers/parisc/asp.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/parisc/ccio-rm-dma.c b/trunk/drivers/parisc/ccio-rm-dma.c index f78f6f1aef47..356b8357bccc 100644 --- a/trunk/drivers/parisc/ccio-rm-dma.c +++ b/trunk/drivers/parisc/ccio-rm-dma.c @@ -38,7 +38,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/parisc/gsc.c b/trunk/drivers/parisc/gsc.c index 20a1bce1a031..c4e1f3c3c2fa 100644 --- a/trunk/drivers/parisc/gsc.c +++ b/trunk/drivers/parisc/gsc.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/parport/daisy.c b/trunk/drivers/parport/daisy.c index 5bed17f68ef4..3c8f06c3a5a0 100644 --- a/trunk/drivers/parport/daisy.c +++ b/trunk/drivers/parport/daisy.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/parport/parport_ax88796.c b/trunk/drivers/parport/parport_ax88796.c index 2c5ac2bf5c56..6938d2e9f18f 100644 --- a/trunk/drivers/parport/parport_ax88796.c +++ b/trunk/drivers/parport/parport_ax88796.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/parport/parport_ip32.c b/trunk/drivers/parport/parport_ip32.c index d3d7809af8bf..6d58bf895b1a 100644 --- a/trunk/drivers/parport/parport_ip32.c +++ b/trunk/drivers/parport/parport_ip32.c @@ -103,7 +103,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/parport/parport_serial.c b/trunk/drivers/parport/parport_serial.c index 40e208d130f5..c3bb84ac931e 100644 --- a/trunk/drivers/parport/parport_serial.c +++ b/trunk/drivers/parport/parport_serial.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/parport/probe.c b/trunk/drivers/parport/probe.c index d763bc9e44c1..0f6550719bcf 100644 --- a/trunk/drivers/parport/probe.c +++ b/trunk/drivers/parport/probe.c @@ -9,7 +9,6 @@ #include #include #include -#include #include static const struct { diff --git a/trunk/drivers/pci/access.c b/trunk/drivers/pci/access.c index 2f646fe1260f..db23200c4874 100644 --- a/trunk/drivers/pci/access.c +++ b/trunk/drivers/pci/access.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pci/bus.c b/trunk/drivers/pci/bus.c index 628ea20a8841..26301cb25e7f 100644 --- a/trunk/drivers/pci/bus.c +++ b/trunk/drivers/pci/bus.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "pci.h" diff --git a/trunk/drivers/pci/dmar.c b/trunk/drivers/pci/dmar.c index 33ead97f0c4b..83aae4747594 100644 --- a/trunk/drivers/pci/dmar.c +++ b/trunk/drivers/pci/dmar.c @@ -35,7 +35,6 @@ #include #include #include -#include #define PREFIX "DMAR: " diff --git a/trunk/drivers/pci/hotplug/acpi_pcihp.c b/trunk/drivers/pci/hotplug/acpi_pcihp.c index 45fcc1e96df9..3c76fc67cf0e 100644 --- a/trunk/drivers/pci/hotplug/acpi_pcihp.c +++ b/trunk/drivers/pci/hotplug/acpi_pcihp.c @@ -32,7 +32,6 @@ #include #include #include -#include #define MY_NAME "acpi_pcihp" diff --git a/trunk/drivers/pci/hotplug/acpiphp_glue.c b/trunk/drivers/pci/hotplug/acpiphp_glue.c index cb23aa2ebf96..b5dad9f37453 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_glue.c +++ b/trunk/drivers/pci/hotplug/acpiphp_glue.c @@ -47,7 +47,6 @@ #include #include #include -#include #include "../pci.h" #include "acpiphp.h" diff --git a/trunk/drivers/pci/hotplug/acpiphp_ibm.c b/trunk/drivers/pci/hotplug/acpiphp_ibm.c index 6ecbfb27db9d..aa5df485f8cf 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_ibm.c +++ b/trunk/drivers/pci/hotplug/acpiphp_ibm.c @@ -26,7 +26,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/pci/hotplug/cpqphp_sysfs.c b/trunk/drivers/pci/hotplug/cpqphp_sysfs.c index 56215322930a..e6089bdb6e5b 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/trunk/drivers/pci/hotplug/cpqphp_sysfs.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/hotplug/fakephp.c b/trunk/drivers/pci/hotplug/fakephp.c index 5317e4d7d96e..0a894efd4b9b 100644 --- a/trunk/drivers/pci/hotplug/fakephp.c +++ b/trunk/drivers/pci/hotplug/fakephp.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "../pci.h" struct legacy_slot { diff --git a/trunk/drivers/pci/hotplug/pci_hotplug_core.c b/trunk/drivers/pci/hotplug/pci_hotplug_core.c index 6d2eea93298f..728b119f71ad 100644 --- a/trunk/drivers/pci/hotplug/pci_hotplug_core.c +++ b/trunk/drivers/pci/hotplug/pci_hotplug_core.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pci/hotplug/pciehp_acpi.c b/trunk/drivers/pci/hotplug/pciehp_acpi.c index 1f4000a5a108..b09b083011d6 100644 --- a/trunk/drivers/pci/hotplug/pciehp_acpi.c +++ b/trunk/drivers/pci/hotplug/pciehp_acpi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "pciehp.h" #define PCIEHP_DETECT_PCIE (0) diff --git a/trunk/drivers/pci/hotplug/pciehp_core.c b/trunk/drivers/pci/hotplug/pciehp_core.c index 3588ea61b0dd..920f820edf87 100644 --- a/trunk/drivers/pci/hotplug/pciehp_core.c +++ b/trunk/drivers/pci/hotplug/pciehp_core.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "pciehp.h" diff --git a/trunk/drivers/pci/hotplug/pciehp_ctrl.c b/trunk/drivers/pci/hotplug/pciehp_ctrl.c index 8f58148be044..9a7f247e8ac1 100644 --- a/trunk/drivers/pci/hotplug/pciehp_ctrl.c +++ b/trunk/drivers/pci/hotplug/pciehp_ctrl.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "../pci.h" diff --git a/trunk/drivers/pci/hotplug/pciehp_hpc.c b/trunk/drivers/pci/hotplug/pciehp_hpc.c index 0cd42047d89b..9665d6b17a2a 100644 --- a/trunk/drivers/pci/hotplug/pciehp_hpc.c +++ b/trunk/drivers/pci/hotplug/pciehp_hpc.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "../pci.h" #include "pciehp.h" diff --git a/trunk/drivers/pci/hotplug/rpaphp_core.c b/trunk/drivers/pci/hotplug/rpaphp_core.c index 719702240780..dcaae725fd79 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_core.c +++ b/trunk/drivers/pci/hotplug/rpaphp_core.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include /* for eeh_add_device() */ diff --git a/trunk/drivers/pci/hotplug/sgi_hotplug.c b/trunk/drivers/pci/hotplug/sgi_hotplug.c index 72d507b6a2aa..8aebe1e9d3d6 100644 --- a/trunk/drivers/pci/hotplug/sgi_hotplug.c +++ b/trunk/drivers/pci/hotplug/sgi_hotplug.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pci/hotplug/shpchp_core.c b/trunk/drivers/pci/hotplug/shpchp_core.c index a7bd5048396e..a5062297f488 100644 --- a/trunk/drivers/pci/hotplug/shpchp_core.c +++ b/trunk/drivers/pci/hotplug/shpchp_core.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include "shpchp.h" diff --git a/trunk/drivers/pci/hotplug/shpchp_ctrl.c b/trunk/drivers/pci/hotplug/shpchp_ctrl.c index 3387fbfb0c54..3bba0c0888ff 100644 --- a/trunk/drivers/pci/hotplug/shpchp_ctrl.c +++ b/trunk/drivers/pci/hotplug/shpchp_ctrl.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "../pci.h" diff --git a/trunk/drivers/pci/htirq.c b/trunk/drivers/pci/htirq.c index 98abf8b91294..737a1c44b07a 100644 --- a/trunk/drivers/pci/htirq.c +++ b/trunk/drivers/pci/htirq.c @@ -10,6 +10,7 @@ #include #include #include +#include #include /* Global ht irq lock. diff --git a/trunk/drivers/pci/intr_remapping.c b/trunk/drivers/pci/intr_remapping.c index 6ee98a56946f..95b849130ad4 100644 --- a/trunk/drivers/pci/intr_remapping.c +++ b/trunk/drivers/pci/intr_remapping.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/ioapic.c b/trunk/drivers/pci/ioapic.c index 203508b227b7..fb9fdf4a42bf 100644 --- a/trunk/drivers/pci/ioapic.c +++ b/trunk/drivers/pci/ioapic.c @@ -18,7 +18,6 @@ #include #include -#include #include struct ioapic { diff --git a/trunk/drivers/pci/iov.c b/trunk/drivers/pci/iov.c index ce6a3666b3d9..3e5ab2bf6a5c 100644 --- a/trunk/drivers/pci/iov.c +++ b/trunk/drivers/pci/iov.c @@ -9,7 +9,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/pci/msi.c b/trunk/drivers/pci/msi.c index 77b68eaf021e..f9cf3173b23d 100644 --- a/trunk/drivers/pci/msi.c +++ b/trunk/drivers/pci/msi.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "pci.h" #include "msi.h" diff --git a/trunk/drivers/pci/pci-sysfs.c b/trunk/drivers/pci/pci-sysfs.c index fad93983bfed..997668558e79 100644 --- a/trunk/drivers/pci/pci-sysfs.c +++ b/trunk/drivers/pci/pci-sysfs.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "pci.h" static int sysfs_initialized; /* = 0 */ diff --git a/trunk/drivers/pci/pci.c b/trunk/drivers/pci/pci.c index 5ea587e59e48..1531f3a49879 100644 --- a/trunk/drivers/pci/pci.c +++ b/trunk/drivers/pci/pci.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/pcie/aer/aer_inject.c b/trunk/drivers/pci/pcie/aer/aer_inject.c index f8f425b8731d..223052b73563 100644 --- a/trunk/drivers/pci/pcie/aer/aer_inject.c +++ b/trunk/drivers/pci/pcie/aer/aer_inject.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/pcie/aer/aerdrv.c b/trunk/drivers/pci/pcie/aer/aerdrv.c index aa495ad9bbd4..21f215f4daa3 100644 --- a/trunk/drivers/pci/pcie/aer/aerdrv.c +++ b/trunk/drivers/pci/pcie/aer/aerdrv.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "aerdrv.h" #include "../../pci.h" diff --git a/trunk/drivers/pci/pcie/aer/aerdrv_core.c b/trunk/drivers/pci/pcie/aer/aerdrv_core.c index aceb04b67b60..c843a799814d 100644 --- a/trunk/drivers/pci/pcie/aer/aerdrv_core.c +++ b/trunk/drivers/pci/pcie/aer/aerdrv_core.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "aerdrv.h" static int forceload; diff --git a/trunk/drivers/pci/pcie/pme/pcie_pme.c b/trunk/drivers/pci/pcie/pme/pcie_pme.c index aac285a16b62..7b3cbff547ee 100644 --- a/trunk/drivers/pci/pcie/pme/pcie_pme.c +++ b/trunk/drivers/pci/pcie/pme/pcie_pme.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/pcie/portdrv_pci.c b/trunk/drivers/pci/pcie/portdrv_pci.c index 3debed25e46b..127e8f169d9c 100644 --- a/trunk/drivers/pci/pcie/portdrv_pci.c +++ b/trunk/drivers/pci/pcie/portdrv_pci.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pci/proc.c b/trunk/drivers/pci/proc.c index 449e890267a2..593bb844b8db 100644 --- a/trunk/drivers/pci/proc.c +++ b/trunk/drivers/pci/proc.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index 27c0e6eb7136..3ea0b29c0104 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -2123,9 +2123,6 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev) } } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9602, quirk_disable_msi); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, 0x9602, quirk_disable_msi); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AI, 0x9602, quirk_disable_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); /* Go through the list of Hypertransport capabilities and @@ -2498,6 +2495,39 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, quirk_msi_intx_disable_bug); +/* + * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio + * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit. + */ +static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge) +{ + u32 nb_cntl; + + if (!int_gfx_bridge->subordinate) + return; + + pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0), + 0x60, 0); + pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0), + 0x64, &nb_cntl); + + if (!(nb_cntl & BIT(10))) { + dev_warn(&int_gfx_bridge->dev, + FW_WARN "RS780: MSI for internal graphics disabled\n"); + int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI; + } +} + +#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602 + +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX, + rs780_int_gfx_disable_msi); +/* wrong vendor ID on M4A785TD motherboard: */ +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, + PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX, + rs780_int_gfx_disable_msi); + #endif /* CONFIG_PCI_MSI */ #ifdef CONFIG_PCI_IOV diff --git a/trunk/drivers/pci/search.c b/trunk/drivers/pci/search.c index 20d03f772289..4a471dc4f4b9 100644 --- a/trunk/drivers/pci/search.c +++ b/trunk/drivers/pci/search.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include "pci.h" diff --git a/trunk/drivers/pci/slot.c b/trunk/drivers/pci/slot.c index 659eaa0fc48f..f75a44d37fbe 100644 --- a/trunk/drivers/pci/slot.c +++ b/trunk/drivers/pci/slot.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include "pci.h" diff --git a/trunk/drivers/pcmcia/at91_cf.c b/trunk/drivers/pcmcia/at91_cf.c index fb33fa42d249..fb904f444d90 100644 --- a/trunk/drivers/pcmcia/at91_cf.c +++ b/trunk/drivers/pcmcia/at91_cf.c @@ -15,7 +15,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/pcmcia/au1000_generic.c b/trunk/drivers/pcmcia/au1000_generic.c index 88c4c4098789..ac4d089430fd 100644 --- a/trunk/drivers/pcmcia/au1000_generic.c +++ b/trunk/drivers/pcmcia/au1000_generic.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/bcm63xx_pcmcia.c b/trunk/drivers/pcmcia/bcm63xx_pcmcia.c index 693577e0fefc..bc88a3b19bb3 100644 --- a/trunk/drivers/pcmcia/bcm63xx_pcmcia.c +++ b/trunk/drivers/pcmcia/bcm63xx_pcmcia.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pcmcia/bfin_cf_pcmcia.c b/trunk/drivers/pcmcia/bfin_cf_pcmcia.c index 9e84d039de41..93f9ddeb0c36 100644 --- a/trunk/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/trunk/drivers/pcmcia/bfin_cf_pcmcia.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pcmcia/db1xxx_ss.c b/trunk/drivers/pcmcia/db1xxx_ss.c index 6206408e196c..a520193b6453 100644 --- a/trunk/drivers/pcmcia/db1xxx_ss.c +++ b/trunk/drivers/pcmcia/db1xxx_ss.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c index cb6036d89e59..52d33b2a5bc5 100644 --- a/trunk/drivers/pcmcia/ds.c +++ b/trunk/drivers/pcmcia/ds.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/electra_cf.c b/trunk/drivers/pcmcia/electra_cf.c index 2e59fe947d28..89cfddca089a 100644 --- a/trunk/drivers/pcmcia/electra_cf.c +++ b/trunk/drivers/pcmcia/electra_cf.c @@ -31,7 +31,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/pcmcia/i82365.c b/trunk/drivers/pcmcia/i82365.c index 9e2a15628de5..d53d9b5659c7 100644 --- a/trunk/drivers/pcmcia/i82365.c +++ b/trunk/drivers/pcmcia/i82365.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/m32r_cfc.c b/trunk/drivers/pcmcia/m32r_cfc.c index 7e16ed8eb0a4..ab21264468d6 100644 --- a/trunk/drivers/pcmcia/m32r_cfc.c +++ b/trunk/drivers/pcmcia/m32r_cfc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/m32r_pcc.c b/trunk/drivers/pcmcia/m32r_pcc.c index 6c5c3f910d71..0caf3db7c700 100644 --- a/trunk/drivers/pcmcia/m32r_pcc.c +++ b/trunk/drivers/pcmcia/m32r_pcc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/m8xx_pcmcia.c b/trunk/drivers/pcmcia/m8xx_pcmcia.c index 41cc954a5ffe..01ef7de15322 100644 --- a/trunk/drivers/pcmcia/m8xx_pcmcia.c +++ b/trunk/drivers/pcmcia/m8xx_pcmcia.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/omap_cf.c b/trunk/drivers/pcmcia/omap_cf.c index a7cfc7964c7c..9edc396577b9 100644 --- a/trunk/drivers/pcmcia/omap_cf.c +++ b/trunk/drivers/pcmcia/omap_cf.c @@ -16,7 +16,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/pcmcia/pcmcia_ioctl.c b/trunk/drivers/pcmcia/pcmcia_ioctl.c index 104e73d5d86c..13a7132cf688 100644 --- a/trunk/drivers/pcmcia/pcmcia_ioctl.c +++ b/trunk/drivers/pcmcia/pcmcia_ioctl.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/pcmcia/pcmcia_resource.c b/trunk/drivers/pcmcia/pcmcia_resource.c index caec1dee2a4b..c4612c52e4cb 100644 --- a/trunk/drivers/pcmcia/pcmcia_resource.c +++ b/trunk/drivers/pcmcia/pcmcia_resource.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/pd6729.c b/trunk/drivers/pcmcia/pd6729.c index b61a13663a0a..4a34268cc512 100644 --- a/trunk/drivers/pcmcia/pd6729.c +++ b/trunk/drivers/pcmcia/pd6729.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/pcmcia/pxa2xx_base.c b/trunk/drivers/pcmcia/pxa2xx_base.c index df4532e91b1a..0a876fabfe44 100644 --- a/trunk/drivers/pcmcia/pxa2xx_base.c +++ b/trunk/drivers/pcmcia/pxa2xx_base.c @@ -17,7 +17,6 @@ ======================================================================*/ #include -#include #include #include #include diff --git a/trunk/drivers/pcmcia/rsrc_mgr.c b/trunk/drivers/pcmcia/rsrc_mgr.c index ffa5f3cae57b..452c83b512c4 100644 --- a/trunk/drivers/pcmcia/rsrc_mgr.c +++ b/trunk/drivers/pcmcia/rsrc_mgr.c @@ -12,7 +12,6 @@ * (C) 1999 David A. Hinds */ -#include #include #include diff --git a/trunk/drivers/pcmcia/sa1100_generic.c b/trunk/drivers/pcmcia/sa1100_generic.c index edbd8c472628..518896241429 100644 --- a/trunk/drivers/pcmcia/sa1100_generic.c +++ b/trunk/drivers/pcmcia/sa1100_generic.c @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/sa1111_generic.c b/trunk/drivers/pcmcia/sa1111_generic.c index 59866905ea37..799e9793e49e 100644 --- a/trunk/drivers/pcmcia/sa1111_generic.c +++ b/trunk/drivers/pcmcia/sa1111_generic.c @@ -12,7 +12,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/pcmcia/sa11xx_base.c b/trunk/drivers/pcmcia/sa11xx_base.c index fa28d8911b00..fc9a6527019b 100644 --- a/trunk/drivers/pcmcia/sa11xx_base.c +++ b/trunk/drivers/pcmcia/sa11xx_base.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/socket_sysfs.c b/trunk/drivers/pcmcia/socket_sysfs.c index 80e36bc407da..08278016e58d 100644 --- a/trunk/drivers/pcmcia/socket_sysfs.c +++ b/trunk/drivers/pcmcia/socket_sysfs.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/tcic.c b/trunk/drivers/pcmcia/tcic.c index 56004a1b5bba..bac85f3236bb 100644 --- a/trunk/drivers/pcmcia/tcic.c +++ b/trunk/drivers/pcmcia/tcic.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pcmcia/xxs1500_ss.c b/trunk/drivers/pcmcia/xxs1500_ss.c index 201ccfa1e97b..f9009d34254b 100644 --- a/trunk/drivers/pcmcia/xxs1500_ss.c +++ b/trunk/drivers/pcmcia/xxs1500_ss.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pcmcia/yenta_socket.c b/trunk/drivers/pcmcia/yenta_socket.c index 83ace277426c..f19ad02374d9 100644 --- a/trunk/drivers/pcmcia/yenta_socket.c +++ b/trunk/drivers/pcmcia/yenta_socket.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/platform/x86/Kconfig b/trunk/drivers/platform/x86/Kconfig index 7bec4588c268..e631dbeafd79 100644 --- a/trunk/drivers/platform/x86/Kconfig +++ b/trunk/drivers/platform/x86/Kconfig @@ -385,16 +385,6 @@ config EEEPC_LAPTOP If you have an Eee PC laptop, say Y or M here. -config EEEPC_WMI - tristate "Eee PC WMI Hotkey Driver (EXPERIMENTAL)" - depends on ACPI_WMI - depends on INPUT - depends on EXPERIMENTAL - ---help--- - Say Y here if you want to support WMI-based hotkeys on Eee PC laptops. - - To compile this driver as a module, choose M here: the module will - be called eeepc-wmi. config ACPI_WMI tristate "WMI" diff --git a/trunk/drivers/platform/x86/Makefile b/trunk/drivers/platform/x86/Makefile index a906490e3530..9cd9fa0a27e6 100644 --- a/trunk/drivers/platform/x86/Makefile +++ b/trunk/drivers/platform/x86/Makefile @@ -4,7 +4,6 @@ # obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o -obj-$(CONFIG_EEEPC_WMI) += eeepc-wmi.o obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o obj-$(CONFIG_ACPI_CMPC) += classmate-laptop.o obj-$(CONFIG_COMPAL_LAPTOP) += compal-laptop.o diff --git a/trunk/drivers/platform/x86/acer-wmi.c b/trunk/drivers/platform/x86/acer-wmi.c index 1ea6c434d330..cbca40aa4006 100644 --- a/trunk/drivers/platform/x86/acer-wmi.c +++ b/trunk/drivers/platform/x86/acer-wmi.c @@ -36,7 +36,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/platform/x86/asus-laptop.c b/trunk/drivers/platform/x86/asus-laptop.c index 52262b012abb..db5f7db2ba33 100644 --- a/trunk/drivers/platform/x86/asus-laptop.c +++ b/trunk/drivers/platform/x86/asus-laptop.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -140,7 +139,7 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot " /* Backlight */ static acpi_handle lcd_switch_handle; -static char *lcd_switch_paths[] = { +static const char *lcd_switch_paths[] = { "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ "\\_SB.PCI0.ISA.EC0._Q10", /* A1x */ "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ @@ -154,7 +153,7 @@ static char *lcd_switch_paths[] = { #define METHOD_SWITCH_DISPLAY "SDSP" static acpi_handle display_get_handle; -static char *display_get_paths[] = { +static const char *display_get_paths[] = { /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */ "\\_SB.PCI0.P0P1.VGA.GETD", /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */ diff --git a/trunk/drivers/platform/x86/asus_acpi.c b/trunk/drivers/platform/x86/asus_acpi.c index 92fd30c9379c..ee520357abaa 100644 --- a/trunk/drivers/platform/x86/asus_acpi.c +++ b/trunk/drivers/platform/x86/asus_acpi.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/classmate-laptop.c b/trunk/drivers/platform/x86/classmate-laptop.c index 7f9e5ddc9498..c696cf1c2616 100644 --- a/trunk/drivers/platform/x86/classmate-laptop.c +++ b/trunk/drivers/platform/x86/classmate-laptop.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/dell-laptop.c b/trunk/drivers/platform/x86/dell-laptop.c index 661e3ac4d5b1..46435ac4684f 100644 --- a/trunk/drivers/platform/x86/dell-laptop.c +++ b/trunk/drivers/platform/x86/dell-laptop.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "../../firmware/dcdbas.h" #define BRIGHTNESS_TOKEN 0x7d diff --git a/trunk/drivers/platform/x86/dell-wmi.c b/trunk/drivers/platform/x86/dell-wmi.c index 6ba6c30e5bb6..bed764e3ea2a 100644 --- a/trunk/drivers/platform/x86/dell-wmi.c +++ b/trunk/drivers/platform/x86/dell-wmi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/eeepc-laptop.c b/trunk/drivers/platform/x86/eeepc-laptop.c index 54a015785ca8..3fdf21e0052e 100644 --- a/trunk/drivers/platform/x86/eeepc-laptop.c +++ b/trunk/drivers/platform/x86/eeepc-laptop.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/eeepc-wmi.c b/trunk/drivers/platform/x86/eeepc-wmi.c deleted file mode 100644 index 9f8822658fd7..000000000000 --- a/trunk/drivers/platform/x86/eeepc-wmi.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Eee PC WMI hotkey driver - * - * Copyright(C) 2010 Intel Corporation. - * - * Portions based on wistron_btns.c: - * Copyright (C) 2005 Miloslav Trmac - * Copyright (C) 2005 Bernhard Rosenkraenzer - * Copyright (C) 2005 Dmitry Torokhov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -MODULE_AUTHOR("Yong Wang "); -MODULE_DESCRIPTION("Eee PC WMI Hotkey Driver"); -MODULE_LICENSE("GPL"); - -#define EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000" - -MODULE_ALIAS("wmi:"EEEPC_WMI_EVENT_GUID); - -#define NOTIFY_BRNUP_MIN 0x11 -#define NOTIFY_BRNUP_MAX 0x1f -#define NOTIFY_BRNDOWN_MIN 0x20 -#define NOTIFY_BRNDOWN_MAX 0x2e - -static const struct key_entry eeepc_wmi_keymap[] = { - /* Sleep already handled via generic ACPI code */ - { KE_KEY, 0x5d, { KEY_WLAN } }, - { KE_KEY, 0x32, { KEY_MUTE } }, - { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, - { KE_KEY, 0x30, { KEY_VOLUMEUP } }, - { KE_IGNORE, NOTIFY_BRNDOWN_MIN, { KEY_BRIGHTNESSDOWN } }, - { KE_IGNORE, NOTIFY_BRNUP_MIN, { KEY_BRIGHTNESSUP } }, - { KE_KEY, 0xcc, { KEY_SWITCHVIDEOMODE } }, - { KE_END, 0}, -}; - -static struct input_dev *eeepc_wmi_input_dev; - -static void eeepc_wmi_notify(u32 value, void *context) -{ - struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL }; - union acpi_object *obj; - acpi_status status; - int code; - - status = wmi_get_event_data(value, &response); - if (status != AE_OK) { - pr_err("EEEPC WMI: bad event status 0x%x\n", status); - return; - } - - obj = (union acpi_object *)response.pointer; - - if (obj && obj->type == ACPI_TYPE_INTEGER) { - code = obj->integer.value; - - if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) - code = NOTIFY_BRNUP_MIN; - else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX) - code = NOTIFY_BRNDOWN_MIN; - - if (!sparse_keymap_report_event(eeepc_wmi_input_dev, - code, 1, true)) - pr_info("EEEPC WMI: Unknown key %x pressed\n", code); - } - - kfree(obj); -} - -static int eeepc_wmi_input_setup(void) -{ - int err; - - eeepc_wmi_input_dev = input_allocate_device(); - if (!eeepc_wmi_input_dev) - return -ENOMEM; - - eeepc_wmi_input_dev->name = "Eee PC WMI hotkeys"; - eeepc_wmi_input_dev->phys = "wmi/input0"; - eeepc_wmi_input_dev->id.bustype = BUS_HOST; - - err = sparse_keymap_setup(eeepc_wmi_input_dev, eeepc_wmi_keymap, NULL); - if (err) - goto err_free_dev; - - err = input_register_device(eeepc_wmi_input_dev); - if (err) - goto err_free_keymap; - - return 0; - -err_free_keymap: - sparse_keymap_free(eeepc_wmi_input_dev); -err_free_dev: - input_free_device(eeepc_wmi_input_dev); - return err; -} - -static int __init eeepc_wmi_init(void) -{ - int err; - acpi_status status; - - if (!wmi_has_guid(EEEPC_WMI_EVENT_GUID)) { - pr_warning("EEEPC WMI: No known WMI GUID found\n"); - return -ENODEV; - } - - err = eeepc_wmi_input_setup(); - if (err) - return err; - - status = wmi_install_notify_handler(EEEPC_WMI_EVENT_GUID, - eeepc_wmi_notify, NULL); - if (ACPI_FAILURE(status)) { - sparse_keymap_free(eeepc_wmi_input_dev); - input_unregister_device(eeepc_wmi_input_dev); - pr_err("EEEPC WMI: Unable to register notify handler - %d\n", - status); - return -ENODEV; - } - - return 0; -} - -static void __exit eeepc_wmi_exit(void) -{ - wmi_remove_notify_handler(EEEPC_WMI_EVENT_GUID); - sparse_keymap_free(eeepc_wmi_input_dev); - input_unregister_device(eeepc_wmi_input_dev); -} - -module_init(eeepc_wmi_init); -module_exit(eeepc_wmi_exit); diff --git a/trunk/drivers/platform/x86/fujitsu-laptop.c b/trunk/drivers/platform/x86/fujitsu-laptop.c index 47b4fd75aa34..c1074b32490e 100644 --- a/trunk/drivers/platform/x86/fujitsu-laptop.c +++ b/trunk/drivers/platform/x86/fujitsu-laptop.c @@ -66,7 +66,6 @@ #include #include #include -#include #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) #include #endif diff --git a/trunk/drivers/platform/x86/hp-wmi.c b/trunk/drivers/platform/x86/hp-wmi.c index 51c07a05a7bc..56086363becc 100644 --- a/trunk/drivers/platform/x86/hp-wmi.c +++ b/trunk/drivers/platform/x86/hp-wmi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/intel_menlow.c b/trunk/drivers/platform/x86/intel_menlow.c index 1190bad4297f..f0a90a6bf396 100644 --- a/trunk/drivers/platform/x86/intel_menlow.c +++ b/trunk/drivers/platform/x86/intel_menlow.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/msi-wmi.c b/trunk/drivers/platform/x86/msi-wmi.c index d1736009636f..367caaae2f3c 100644 --- a/trunk/drivers/platform/x86/msi-wmi.c +++ b/trunk/drivers/platform/x86/msi-wmi.c @@ -26,7 +26,6 @@ #include #include #include -#include MODULE_AUTHOR("Thomas Renninger "); MODULE_DESCRIPTION("MSI laptop WMI hotkeys driver"); diff --git a/trunk/drivers/platform/x86/panasonic-laptop.c b/trunk/drivers/platform/x86/panasonic-laptop.c index 2fb9a32926f8..726f02affcb6 100644 --- a/trunk/drivers/platform/x86/panasonic-laptop.c +++ b/trunk/drivers/platform/x86/panasonic-laptop.c @@ -124,7 +124,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/sony-laptop.c b/trunk/drivers/platform/x86/sony-laptop.c index 1387c5f9c24d..6553b91caaa4 100644 --- a/trunk/drivers/platform/x86/sony-laptop.c +++ b/trunk/drivers/platform/x86/sony-laptop.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/tc1100-wmi.c b/trunk/drivers/platform/x86/tc1100-wmi.c index 1fe0f1feff71..dd33b51c3486 100644 --- a/trunk/drivers/platform/x86/tc1100-wmi.c +++ b/trunk/drivers/platform/x86/tc1100-wmi.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/platform/x86/thinkpad_acpi.c b/trunk/drivers/platform/x86/thinkpad_acpi.c index 63290b33c879..770b85327f84 100644 --- a/trunk/drivers/platform/x86/thinkpad_acpi.c +++ b/trunk/drivers/platform/x86/thinkpad_acpi.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/platform/x86/topstar-laptop.c b/trunk/drivers/platform/x86/topstar-laptop.c index ff4b476f1950..4d6516fded7e 100644 --- a/trunk/drivers/platform/x86/topstar-laptop.c +++ b/trunk/drivers/platform/x86/topstar-laptop.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/platform/x86/toshiba_acpi.c b/trunk/drivers/platform/x86/toshiba_acpi.c index 37aa14798551..def4841183be 100644 --- a/trunk/drivers/platform/x86/toshiba_acpi.c +++ b/trunk/drivers/platform/x86/toshiba_acpi.c @@ -47,7 +47,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/platform/x86/wmi.c b/trunk/drivers/platform/x86/wmi.c index 39ec5b6c2e3a..09e9918c69c1 100644 --- a/trunk/drivers/platform/x86/wmi.c +++ b/trunk/drivers/platform/x86/wmi.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/pnp/isapnp/core.c b/trunk/drivers/pnp/isapnp/core.c index 918d5f044865..e851160e14f0 100644 --- a/trunk/drivers/pnp/isapnp/core.c +++ b/trunk/drivers/pnp/isapnp/core.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pnp/manager.c b/trunk/drivers/pnp/manager.c index 0a15664eef1c..00fd3577b985 100644 --- a/trunk/drivers/pnp/manager.c +++ b/trunk/drivers/pnp/manager.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include "base.h" diff --git a/trunk/drivers/pnp/pnpacpi/core.c b/trunk/drivers/pnp/pnpacpi/core.c index f7ff628b7d94..5314bf630bc4 100644 --- a/trunk/drivers/pnp/pnpacpi/core.c +++ b/trunk/drivers/pnp/pnpacpi/core.c @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/pnp/pnpacpi/rsparser.c b/trunk/drivers/pnp/pnpacpi/rsparser.c index c6c552f681b7..54514aa35b09 100644 --- a/trunk/drivers/pnp/pnpacpi/rsparser.c +++ b/trunk/drivers/pnp/pnpacpi/rsparser.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "../base.h" #include "pnpacpi.h" diff --git a/trunk/drivers/pnp/pnpbios/bioscalls.c b/trunk/drivers/pnp/pnpbios/bioscalls.c index 8591f6ab1b35..fc83783c3a96 100644 --- a/trunk/drivers/pnp/pnpbios/bioscalls.c +++ b/trunk/drivers/pnp/pnpbios/bioscalls.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/pnp/pnpbios/rsparser.c b/trunk/drivers/pnp/pnpbios/rsparser.c index cb1f47bfee96..a5135ebe5f07 100644 --- a/trunk/drivers/pnp/pnpbios/rsparser.c +++ b/trunk/drivers/pnp/pnpbios/rsparser.c @@ -5,6 +5,7 @@ #include #include #include +#include #ifdef CONFIG_PCI #include diff --git a/trunk/drivers/pnp/resource.c b/trunk/drivers/pnp/resource.c index 2e54e6a23c72..5b277dbaacde 100644 --- a/trunk/drivers/pnp/resource.c +++ b/trunk/drivers/pnp/resource.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/power/bq27x00_battery.c b/trunk/drivers/power/bq27x00_battery.c index 3ec9c6a8896b..bece33ed873c 100644 --- a/trunk/drivers/power/bq27x00_battery.c +++ b/trunk/drivers/power/bq27x00_battery.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define DRIVER_VERSION "1.1.0" diff --git a/trunk/drivers/power/da9030_battery.c b/trunk/drivers/power/da9030_battery.c index d2c793cf6765..a2e71f7b27fb 100644 --- a/trunk/drivers/power/da9030_battery.c +++ b/trunk/drivers/power/da9030_battery.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/power/ds2760_battery.c b/trunk/drivers/power/ds2760_battery.c index 3bf8d1f622e3..6f1dba5a519d 100644 --- a/trunk/drivers/power/ds2760_battery.c +++ b/trunk/drivers/power/ds2760_battery.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/power/ds2782_battery.c b/trunk/drivers/power/ds2782_battery.c index 99c89976a902..da14f374cb60 100644 --- a/trunk/drivers/power/ds2782_battery.c +++ b/trunk/drivers/power/ds2782_battery.c @@ -19,7 +19,6 @@ #include #include #include -#include #define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */ diff --git a/trunk/drivers/power/max17040_battery.c b/trunk/drivers/power/max17040_battery.c index f3e22c9fe20a..87b98bf27ae1 100644 --- a/trunk/drivers/power/max17040_battery.c +++ b/trunk/drivers/power/max17040_battery.c @@ -19,7 +19,6 @@ #include #include #include -#include #define MAX17040_VCELL_MSB 0x02 #define MAX17040_VCELL_LSB 0x03 diff --git a/trunk/drivers/power/max8925_power.c b/trunk/drivers/power/max8925_power.c index 8e5aec260866..a1b4410544d7 100644 --- a/trunk/drivers/power/max8925_power.c +++ b/trunk/drivers/power/max8925_power.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/power/pcf50633-charger.c b/trunk/drivers/power/pcf50633-charger.c index 066f994e6fe5..ea3fdfaca90d 100644 --- a/trunk/drivers/power/pcf50633-charger.c +++ b/trunk/drivers/power/pcf50633-charger.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/power/pmu_battery.c b/trunk/drivers/power/pmu_battery.c index 023d24993b87..9c87ad564803 100644 --- a/trunk/drivers/power/pmu_battery.c +++ b/trunk/drivers/power/pmu_battery.c @@ -14,7 +14,6 @@ #include #include #include -#include static struct pmu_battery_dev { struct power_supply bat; diff --git a/trunk/drivers/power/power_supply_leds.c b/trunk/drivers/power/power_supply_leds.c index 031a554837f7..2dece40c544f 100644 --- a/trunk/drivers/power/power_supply_leds.c +++ b/trunk/drivers/power/power_supply_leds.c @@ -12,7 +12,6 @@ #include #include -#include #include "power_supply.h" diff --git a/trunk/drivers/power/power_supply_sysfs.c b/trunk/drivers/power/power_supply_sysfs.c index 5b6e352ac7c1..ff05e6189768 100644 --- a/trunk/drivers/power/power_supply_sysfs.c +++ b/trunk/drivers/power/power_supply_sysfs.c @@ -13,7 +13,6 @@ #include #include -#include #include "power_supply.h" diff --git a/trunk/drivers/power/wm831x_backup.c b/trunk/drivers/power/wm831x_backup.c index 0fd130d80f5d..bf4f387a8009 100644 --- a/trunk/drivers/power/wm831x_backup.c +++ b/trunk/drivers/power/wm831x_backup.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/power/wm831x_power.c b/trunk/drivers/power/wm831x_power.c index 875c4d0f776b..f85e80b1b400 100644 --- a/trunk/drivers/power/wm831x_power.c +++ b/trunk/drivers/power/wm831x_power.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/power/wm97xx_battery.c b/trunk/drivers/power/wm97xx_battery.c index 94c70650aafc..23eed356a854 100644 --- a/trunk/drivers/power/wm97xx_battery.c +++ b/trunk/drivers/power/wm97xx_battery.c @@ -23,7 +23,6 @@ #include #include #include -#include static DEFINE_MUTEX(bat_lock); static struct work_struct bat_work; diff --git a/trunk/drivers/pps/kapi.c b/trunk/drivers/pps/kapi.c index 1aa02db3ff4e..2d414e23d390 100644 --- a/trunk/drivers/pps/kapi.c +++ b/trunk/drivers/pps/kapi.c @@ -29,7 +29,6 @@ #include #include #include -#include /* * Global variables diff --git a/trunk/drivers/ps3/ps3-lpm.c b/trunk/drivers/ps3/ps3-lpm.c index 8000985d0e8c..fe96793e3f08 100644 --- a/trunk/drivers/ps3/ps3-lpm.c +++ b/trunk/drivers/ps3/ps3-lpm.c @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include #include #include diff --git a/trunk/drivers/ps3/ps3-vuart.c b/trunk/drivers/ps3/ps3-vuart.c index d9fb729535a1..e4ad5ba5d0a3 100644 --- a/trunk/drivers/ps3/ps3-vuart.c +++ b/trunk/drivers/ps3/ps3-vuart.c @@ -19,7 +19,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/ps3/ps3av.c b/trunk/drivers/ps3/ps3av.c index a409fa050a1a..95a689befc84 100644 --- a/trunk/drivers/ps3/ps3av.c +++ b/trunk/drivers/ps3/ps3av.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/regulator/core.c b/trunk/drivers/regulator/core.c index 2b4e40d31190..5af16c2bb540 100644 --- a/trunk/drivers/regulator/core.c +++ b/trunk/drivers/regulator/core.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/regulator/fixed.c b/trunk/drivers/regulator/fixed.c index 2fe9d99c9f23..d11f7622430b 100644 --- a/trunk/drivers/regulator/fixed.c +++ b/trunk/drivers/regulator/fixed.c @@ -25,7 +25,6 @@ #include #include #include -#include struct fixed_voltage_data { struct regulator_desc desc; diff --git a/trunk/drivers/regulator/lp3971.c b/trunk/drivers/regulator/lp3971.c index 671a7d1f1f0e..b20b3e1d821a 100644 --- a/trunk/drivers/regulator/lp3971.c +++ b/trunk/drivers/regulator/lp3971.c @@ -18,7 +18,6 @@ #include #include #include -#include struct lp3971 { struct device *dev; diff --git a/trunk/drivers/regulator/max1586.c b/trunk/drivers/regulator/max1586.c index b3c1afc16889..c0b09e15edb6 100644 --- a/trunk/drivers/regulator/max1586.c +++ b/trunk/drivers/regulator/max1586.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #define MAX1586_V3_MAX_VSEL 31 diff --git a/trunk/drivers/regulator/max8649.c b/trunk/drivers/regulator/max8649.c index bfc4c5ffdc96..833aaedc7e64 100644 --- a/trunk/drivers/regulator/max8649.c +++ b/trunk/drivers/regulator/max8649.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #define MAX8649_DCDC_VMIN 750000 /* uV */ diff --git a/trunk/drivers/regulator/max8660.c b/trunk/drivers/regulator/max8660.c index 3790b21879ff..47f90b2fc290 100644 --- a/trunk/drivers/regulator/max8660.c +++ b/trunk/drivers/regulator/max8660.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #define MAX8660_DCDC_MIN_UV 725000 diff --git a/trunk/drivers/regulator/mc13783-regulator.c b/trunk/drivers/regulator/mc13783-regulator.c index a681f5e8f786..f7b81845a196 100644 --- a/trunk/drivers/regulator/mc13783-regulator.c +++ b/trunk/drivers/regulator/mc13783-regulator.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/regulator/tps65023-regulator.c b/trunk/drivers/regulator/tps65023-regulator.c index 8e2f2098b005..1f183543bdbd 100644 --- a/trunk/drivers/regulator/tps65023-regulator.c +++ b/trunk/drivers/regulator/tps65023-regulator.c @@ -24,7 +24,6 @@ #include #include #include -#include /* Register definitions */ #define TPS65023_REG_VERSION 0 diff --git a/trunk/drivers/regulator/tps6507x-regulator.c b/trunk/drivers/regulator/tps6507x-regulator.c index 74841abcc9cc..c2a9539acd72 100644 --- a/trunk/drivers/regulator/tps6507x-regulator.c +++ b/trunk/drivers/regulator/tps6507x-regulator.c @@ -24,7 +24,6 @@ #include #include #include -#include /* Register definitions */ #define TPS6507X_REG_PPATH1 0X01 diff --git a/trunk/drivers/regulator/userspace-consumer.c b/trunk/drivers/regulator/userspace-consumer.c index 9d5ba9357597..44917da4ac97 100644 --- a/trunk/drivers/regulator/userspace-consumer.c +++ b/trunk/drivers/regulator/userspace-consumer.c @@ -21,7 +21,6 @@ #include #include #include -#include struct userspace_consumer_data { const char *name; diff --git a/trunk/drivers/regulator/virtual.c b/trunk/drivers/regulator/virtual.c index 69e550f57638..d96cecaac73d 100644 --- a/trunk/drivers/regulator/virtual.c +++ b/trunk/drivers/regulator/virtual.c @@ -15,7 +15,6 @@ #include #include #include -#include struct virtual_consumer_data { struct mutex lock; diff --git a/trunk/drivers/regulator/wm831x-dcdc.c b/trunk/drivers/regulator/wm831x-dcdc.c index dbfaf5945e48..6e18e56d850b 100644 --- a/trunk/drivers/regulator/wm831x-dcdc.c +++ b/trunk/drivers/regulator/wm831x-dcdc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/regulator/wm831x-isink.c b/trunk/drivers/regulator/wm831x-isink.c index 6c446cd6ad54..ca0f6b6c384b 100644 --- a/trunk/drivers/regulator/wm831x-isink.c +++ b/trunk/drivers/regulator/wm831x-isink.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/regulator/wm831x-ldo.c b/trunk/drivers/regulator/wm831x-ldo.c index e686cdb61b97..d2406c1519a1 100644 --- a/trunk/drivers/regulator/wm831x-ldo.c +++ b/trunk/drivers/regulator/wm831x-ldo.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/regulator/wm8994-regulator.c b/trunk/drivers/regulator/wm8994-regulator.c index 5a1dc8a24d35..95454a4637b7 100644 --- a/trunk/drivers/regulator/wm8994-regulator.c +++ b/trunk/drivers/regulator/wm8994-regulator.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/class.c b/trunk/drivers/rtc/class.c index 565562ba6ac9..40845c7e9322 100644 --- a/trunk/drivers/rtc/class.c +++ b/trunk/drivers/rtc/class.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "rtc-core.h" diff --git a/trunk/drivers/rtc/rtc-at32ap700x.c b/trunk/drivers/rtc/rtc-at32ap700x.c index b2752b6e7a2f..8825695777df 100644 --- a/trunk/drivers/rtc/rtc-at32ap700x.c +++ b/trunk/drivers/rtc/rtc-at32ap700x.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-at91sam9.c b/trunk/drivers/rtc/rtc-at91sam9.c index f677e0710ca1..78a018b5c941 100644 --- a/trunk/drivers/rtc/rtc-at91sam9.c +++ b/trunk/drivers/rtc/rtc-at91sam9.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-bfin.c b/trunk/drivers/rtc/rtc-bfin.c index 72b2bcc2c224..b11485b9f21c 100644 --- a/trunk/drivers/rtc/rtc-bfin.c +++ b/trunk/drivers/rtc/rtc-bfin.c @@ -51,7 +51,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/rtc/rtc-bq4802.c b/trunk/drivers/rtc/rtc-bq4802.c index 128270ce355d..280fe48ada0b 100644 --- a/trunk/drivers/rtc/rtc-bq4802.c +++ b/trunk/drivers/rtc/rtc-bq4802.c @@ -10,7 +10,6 @@ #include #include #include -#include MODULE_AUTHOR("David S. Miller "); MODULE_DESCRIPTION("TI BQ4802 RTC driver"); diff --git a/trunk/drivers/rtc/rtc-coh901331.c b/trunk/drivers/rtc/rtc-coh901331.c index 316f484999b5..44c4399ee714 100644 --- a/trunk/drivers/rtc/rtc-coh901331.c +++ b/trunk/drivers/rtc/rtc-coh901331.c @@ -14,7 +14,6 @@ #include #include #include -#include /* * Registers in the COH 901 331 diff --git a/trunk/drivers/rtc/rtc-ds1216.c b/trunk/drivers/rtc/rtc-ds1216.c index 45cd8c9f5a39..4aedc705518c 100644 --- a/trunk/drivers/rtc/rtc-ds1216.c +++ b/trunk/drivers/rtc/rtc-ds1216.c @@ -9,7 +9,6 @@ #include #include #include -#include #define DRV_VERSION "0.2" diff --git a/trunk/drivers/rtc/rtc-ds1286.c b/trunk/drivers/rtc/rtc-ds1286.c index bf430f9091ed..4fcb16bbff4a 100644 --- a/trunk/drivers/rtc/rtc-ds1286.c +++ b/trunk/drivers/rtc/rtc-ds1286.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DRV_VERSION "1.0" diff --git a/trunk/drivers/rtc/rtc-ds1305.c b/trunk/drivers/rtc/rtc-ds1305.c index 7836c9cec557..9630e7d3314e 100644 --- a/trunk/drivers/rtc/rtc-ds1305.c +++ b/trunk/drivers/rtc/rtc-ds1305.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-ds1374.c b/trunk/drivers/rtc/rtc-ds1374.c index 61945734ad00..5317bbcbc7a0 100644 --- a/trunk/drivers/rtc/rtc-ds1374.c +++ b/trunk/drivers/rtc/rtc-ds1374.c @@ -24,7 +24,6 @@ #include #include #include -#include #define DS1374_REG_TOD0 0x00 /* Time of Day */ #define DS1374_REG_TOD1 0x01 diff --git a/trunk/drivers/rtc/rtc-ds1390.c b/trunk/drivers/rtc/rtc-ds1390.c index 26a86d235051..cdb705057091 100644 --- a/trunk/drivers/rtc/rtc-ds1390.c +++ b/trunk/drivers/rtc/rtc-ds1390.c @@ -19,7 +19,6 @@ #include #include #include -#include #define DS1390_REG_100THS 0x00 #define DS1390_REG_SECONDS 0x01 diff --git a/trunk/drivers/rtc/rtc-ds1511.c b/trunk/drivers/rtc/rtc-ds1511.c index 06b8566c4532..4166b84cb514 100644 --- a/trunk/drivers/rtc/rtc-ds1511.c +++ b/trunk/drivers/rtc/rtc-ds1511.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-ds1553.c b/trunk/drivers/rtc/rtc-ds1553.c index 244f9994bcbb..ed1ef7c9cc06 100644 --- a/trunk/drivers/rtc/rtc-ds1553.c +++ b/trunk/drivers/rtc/rtc-ds1553.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-ds1742.c b/trunk/drivers/rtc/rtc-ds1742.c index 2b4b0bc42d6f..cad9ceb89baf 100644 --- a/trunk/drivers/rtc/rtc-ds1742.c +++ b/trunk/drivers/rtc/rtc-ds1742.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-ep93xx.c b/trunk/drivers/rtc/rtc-ep93xx.c index 11ae64dcbf3c..91bde976bc0f 100644 --- a/trunk/drivers/rtc/rtc-ep93xx.c +++ b/trunk/drivers/rtc/rtc-ep93xx.c @@ -13,7 +13,6 @@ #include #include #include -#include #define EP93XX_RTC_DATA 0x000 #define EP93XX_RTC_MATCH 0x004 diff --git a/trunk/drivers/rtc/rtc-fm3130.c b/trunk/drivers/rtc/rtc-fm3130.c index ff6fce61ea41..812c66755083 100644 --- a/trunk/drivers/rtc/rtc-fm3130.c +++ b/trunk/drivers/rtc/rtc-fm3130.c @@ -13,7 +13,6 @@ #include #include #include -#include #define FM3130_RTC_CONTROL (0x0) #define FM3130_CAL_CONTROL (0x1) diff --git a/trunk/drivers/rtc/rtc-m48t35.c b/trunk/drivers/rtc/rtc-m48t35.c index 7410875e5838..8cb5b8959e5b 100644 --- a/trunk/drivers/rtc/rtc-m48t35.c +++ b/trunk/drivers/rtc/rtc-m48t35.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-m48t59.c b/trunk/drivers/rtc/rtc-m48t59.c index 365ff3ac2348..ede43b846859 100644 --- a/trunk/drivers/rtc/rtc-m48t59.c +++ b/trunk/drivers/rtc/rtc-m48t59.c @@ -19,7 +19,6 @@ #include #include #include -#include #ifndef NO_IRQ #define NO_IRQ (-1) diff --git a/trunk/drivers/rtc/rtc-max8925.c b/trunk/drivers/rtc/rtc-max8925.c index 174036dda786..acdbb1760187 100644 --- a/trunk/drivers/rtc/rtc-max8925.c +++ b/trunk/drivers/rtc/rtc-max8925.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-mc13783.c b/trunk/drivers/rtc/rtc-mc13783.c index 675bfb515367..1379c7faa448 100644 --- a/trunk/drivers/rtc/rtc-mc13783.c +++ b/trunk/drivers/rtc/rtc-mc13783.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #define DRIVER_NAME "mc13783-rtc" diff --git a/trunk/drivers/rtc/rtc-mpc5121.c b/trunk/drivers/rtc/rtc-mpc5121.c index f0dbf9cb8f9c..4313ca03a96d 100644 --- a/trunk/drivers/rtc/rtc-mpc5121.c +++ b/trunk/drivers/rtc/rtc-mpc5121.c @@ -15,7 +15,6 @@ #include #include #include -#include struct mpc5121_rtc_regs { u8 set_time; /* RTC + 0x00 */ diff --git a/trunk/drivers/rtc/rtc-msm6242.c b/trunk/drivers/rtc/rtc-msm6242.c index b2fff0ca49f8..5f5968a48925 100644 --- a/trunk/drivers/rtc/rtc-msm6242.c +++ b/trunk/drivers/rtc/rtc-msm6242.c @@ -13,7 +13,6 @@ #include #include #include -#include enum { diff --git a/trunk/drivers/rtc/rtc-mv.c b/trunk/drivers/rtc/rtc-mv.c index bcca47298554..dc052ce6e63a 100644 --- a/trunk/drivers/rtc/rtc-mv.c +++ b/trunk/drivers/rtc/rtc-mv.c @@ -13,7 +13,6 @@ #include #include #include -#include #define RTC_TIME_REG_OFFS 0 diff --git a/trunk/drivers/rtc/rtc-mxc.c b/trunk/drivers/rtc/rtc-mxc.c index c77f6f72f950..8710f9415d98 100644 --- a/trunk/drivers/rtc/rtc-mxc.c +++ b/trunk/drivers/rtc/rtc-mxc.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-nuc900.c b/trunk/drivers/rtc/rtc-nuc900.c index a351bd5d8176..bf59c9c586b2 100644 --- a/trunk/drivers/rtc/rtc-nuc900.c +++ b/trunk/drivers/rtc/rtc-nuc900.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-pcap.c b/trunk/drivers/rtc/rtc-pcap.c index 25c0b3fd44f1..a99c28992d21 100644 --- a/trunk/drivers/rtc/rtc-pcap.c +++ b/trunk/drivers/rtc/rtc-pcap.c @@ -17,7 +17,6 @@ #include #include #include -#include #include struct pcap_rtc { diff --git a/trunk/drivers/rtc/rtc-pcf2123.c b/trunk/drivers/rtc/rtc-pcf2123.c index 71bab0ef5443..2ceb365533b2 100644 --- a/trunk/drivers/rtc/rtc-pcf2123.c +++ b/trunk/drivers/rtc/rtc-pcf2123.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-pcf50633.c b/trunk/drivers/rtc/rtc-pcf50633.c index 16edf94ab42f..854c3cb365a1 100644 --- a/trunk/drivers/rtc/rtc-pcf50633.c +++ b/trunk/drivers/rtc/rtc-pcf50633.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-pcf8563.c b/trunk/drivers/rtc/rtc-pcf8563.c index 1af42b4a6f59..65f346b2fbae 100644 --- a/trunk/drivers/rtc/rtc-pcf8563.c +++ b/trunk/drivers/rtc/rtc-pcf8563.c @@ -17,7 +17,6 @@ #include #include #include -#include #define DRV_VERSION "0.4.3" diff --git a/trunk/drivers/rtc/rtc-pl030.c b/trunk/drivers/rtc/rtc-pl030.c index bbdb2f02798a..457231bb1029 100644 --- a/trunk/drivers/rtc/rtc-pl030.c +++ b/trunk/drivers/rtc/rtc-pl030.c @@ -13,7 +13,6 @@ #include #include #include -#include #define RTC_DR (0) #define RTC_MR (4) diff --git a/trunk/drivers/rtc/rtc-pl031.c b/trunk/drivers/rtc/rtc-pl031.c index 3587d9922f28..c256aacfa954 100644 --- a/trunk/drivers/rtc/rtc-pl031.c +++ b/trunk/drivers/rtc/rtc-pl031.c @@ -24,7 +24,6 @@ #include #include #include -#include /* * Register definitions diff --git a/trunk/drivers/rtc/rtc-pxa.c b/trunk/drivers/rtc/rtc-pxa.c index e9c6fa035989..e6351b743da6 100644 --- a/trunk/drivers/rtc/rtc-pxa.c +++ b/trunk/drivers/rtc/rtc-pxa.c @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/rtc/rtc-rp5c01.c b/trunk/drivers/rtc/rtc-rp5c01.c index a95f733bb15a..e1313feb060f 100644 --- a/trunk/drivers/rtc/rtc-rp5c01.c +++ b/trunk/drivers/rtc/rtc-rp5c01.c @@ -12,7 +12,6 @@ #include #include #include -#include enum { diff --git a/trunk/drivers/rtc/rtc-rs5c348.c b/trunk/drivers/rtc/rtc-rs5c348.c index 368d0e63cf83..2099037cb3ea 100644 --- a/trunk/drivers/rtc/rtc-rs5c348.c +++ b/trunk/drivers/rtc/rtc-rs5c348.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-rs5c372.c b/trunk/drivers/rtc/rtc-rs5c372.c index 90cf0a6ff23e..2f2c68d476da 100644 --- a/trunk/drivers/rtc/rtc-rs5c372.c +++ b/trunk/drivers/rtc/rtc-rs5c372.c @@ -13,7 +13,6 @@ #include #include #include -#include #define DRV_VERSION "0.6" diff --git a/trunk/drivers/rtc/rtc-rx8025.c b/trunk/drivers/rtc/rtc-rx8025.c index b65c82f792d9..b1a29bcfdf13 100644 --- a/trunk/drivers/rtc/rtc-rx8025.c +++ b/trunk/drivers/rtc/rtc-rx8025.c @@ -20,7 +20,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-s3c.c b/trunk/drivers/rtc/rtc-s3c.c index 4969b6059c89..e0d7b9991505 100644 --- a/trunk/drivers/rtc/rtc-s3c.c +++ b/trunk/drivers/rtc/rtc-s3c.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-sh.c b/trunk/drivers/rtc/rtc-sh.c index 5efbd5990ff8..e95cc6f8d61e 100644 --- a/trunk/drivers/rtc/rtc-sh.c +++ b/trunk/drivers/rtc/rtc-sh.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #define DRV_NAME "sh-rtc" diff --git a/trunk/drivers/rtc/rtc-stk17ta8.c b/trunk/drivers/rtc/rtc-stk17ta8.c index 875ba099e7a5..67700831b5c9 100644 --- a/trunk/drivers/rtc/rtc-stk17ta8.c +++ b/trunk/drivers/rtc/rtc-stk17ta8.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/rtc/rtc-stmp3xxx.c b/trunk/drivers/rtc/rtc-stmp3xxx.c index 7e7d0c806f2d..d7ce1a5c857d 100644 --- a/trunk/drivers/rtc/rtc-stmp3xxx.c +++ b/trunk/drivers/rtc/rtc-stmp3xxx.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/rtc/rtc-tx4939.c b/trunk/drivers/rtc/rtc-tx4939.c index 20bfc64a15c8..9ee81d8aa7c0 100644 --- a/trunk/drivers/rtc/rtc-tx4939.c +++ b/trunk/drivers/rtc/rtc-tx4939.c @@ -12,7 +12,6 @@ #include #include #include -#include #include struct tx4939rtc_plat_data { diff --git a/trunk/drivers/rtc/rtc-v3020.c b/trunk/drivers/rtc/rtc-v3020.c index f71c3ce18036..bed4cab07043 100644 --- a/trunk/drivers/rtc/rtc-v3020.c +++ b/trunk/drivers/rtc/rtc-v3020.c @@ -28,7 +28,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/rtc/rtc-wm831x.c b/trunk/drivers/rtc/rtc-wm831x.c index b16cfe57a484..000c7e481e59 100644 --- a/trunk/drivers/rtc/rtc-wm831x.c +++ b/trunk/drivers/rtc/rtc-wm831x.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/block/dasd_3990_erp.c b/trunk/drivers/s390/block/dasd_3990_erp.c index 6927e751ce3e..b3736b8aad39 100644 --- a/trunk/drivers/s390/block/dasd_3990_erp.c +++ b/trunk/drivers/s390/block/dasd_3990_erp.c @@ -10,6 +10,7 @@ #define KMSG_COMPONENT "dasd-eckd" #include +#include #include #define PRINTK_HEADER "dasd_erp(3990): " diff --git a/trunk/drivers/s390/block/dasd_alias.c b/trunk/drivers/s390/block/dasd_alias.c index 8c4814258e93..148b1dd24070 100644 --- a/trunk/drivers/s390/block/dasd_alias.c +++ b/trunk/drivers/s390/block/dasd_alias.c @@ -8,7 +8,6 @@ #define KMSG_COMPONENT "dasd-eckd" #include -#include #include #include "dasd_int.h" #include "dasd_eckd.h" diff --git a/trunk/drivers/s390/block/dasd_devmap.c b/trunk/drivers/s390/block/dasd_devmap.c index eff9c812c5c2..8e23919c8704 100644 --- a/trunk/drivers/s390/block/dasd_devmap.c +++ b/trunk/drivers/s390/block/dasd_devmap.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/block/dasd_eer.c b/trunk/drivers/s390/block/dasd_eer.c index dd88803e4899..1f3e967aaba8 100644 --- a/trunk/drivers/s390/block/dasd_eer.c +++ b/trunk/drivers/s390/block/dasd_eer.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/block/dasd_ioctl.c b/trunk/drivers/s390/block/dasd_ioctl.c index 1557214944f7..3479f8158a1b 100644 --- a/trunk/drivers/s390/block/dasd_ioctl.c +++ b/trunk/drivers/s390/block/dasd_ioctl.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/block/dasd_proc.c b/trunk/drivers/s390/block/dasd_proc.c index 2eb025592809..f13a0bdd148c 100644 --- a/trunk/drivers/s390/block/dasd_proc.c +++ b/trunk/drivers/s390/block/dasd_proc.c @@ -14,7 +14,6 @@ #define KMSG_COMPONENT "dasd" #include -#include #include #include #include diff --git a/trunk/drivers/s390/block/xpram.c b/trunk/drivers/s390/block/xpram.c index c881a14fa5dd..118de392af63 100644 --- a/trunk/drivers/s390/block/xpram.c +++ b/trunk/drivers/s390/block/xpram.c @@ -33,6 +33,7 @@ #include /* isdigit, isxdigit */ #include #include +#include #include #include #include /* HDIO_GETGEO */ @@ -40,7 +41,6 @@ #include #include #include -#include #include #define XPRAM_NAME "xpram" diff --git a/trunk/drivers/s390/char/con3270.c b/trunk/drivers/s390/char/con3270.c index bb07577e8fd4..6bca81aea396 100644 --- a/trunk/drivers/s390/char/con3270.c +++ b/trunk/drivers/s390/char/con3270.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/char/fs3270.c b/trunk/drivers/s390/char/fs3270.c index 0eabcca3c92d..31c59b0d6df0 100644 --- a/trunk/drivers/s390/char/fs3270.c +++ b/trunk/drivers/s390/char/fs3270.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/char/keyboard.c b/trunk/drivers/s390/char/keyboard.c index cb6bffe7141a..cee4d4e42429 100644 --- a/trunk/drivers/s390/char/keyboard.c +++ b/trunk/drivers/s390/char/keyboard.c @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/s390/char/monreader.c b/trunk/drivers/s390/char/monreader.c index 2ed3f82e5c30..33e96484d54f 100644 --- a/trunk/drivers/s390/char/monreader.c +++ b/trunk/drivers/s390/char/monreader.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/monwriter.c b/trunk/drivers/s390/char/monwriter.c index 98a49dfda1de..668a0579b26b 100644 --- a/trunk/drivers/s390/char/monwriter.c +++ b/trunk/drivers/s390/char/monwriter.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/sclp_async.c b/trunk/drivers/s390/char/sclp_async.c index 2aecf7f21361..f449c696e503 100644 --- a/trunk/drivers/s390/char/sclp_async.c +++ b/trunk/drivers/s390/char/sclp_async.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/sclp_con.c b/trunk/drivers/s390/char/sclp_con.c index ecf45c54f8c4..ad698d30cb3b 100644 --- a/trunk/drivers/s390/char/sclp_con.c +++ b/trunk/drivers/s390/char/sclp_con.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "sclp.h" #include "sclp_rw.h" diff --git a/trunk/drivers/s390/char/sclp_tty.c b/trunk/drivers/s390/char/sclp_tty.c index 8258d590505f..434ba04b1309 100644 --- a/trunk/drivers/s390/char/sclp_tty.c +++ b/trunk/drivers/s390/char/sclp_tty.c @@ -13,10 +13,10 @@ #include #include #include +#include #include #include #include -#include #include #include "ctrlchar.h" diff --git a/trunk/drivers/s390/char/sclp_vt220.c b/trunk/drivers/s390/char/sclp_vt220.c index 5d706e6c946f..3796ffdb8479 100644 --- a/trunk/drivers/s390/char/sclp_vt220.c +++ b/trunk/drivers/s390/char/sclp_vt220.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "sclp.h" diff --git a/trunk/drivers/s390/char/tape_34xx.c b/trunk/drivers/s390/char/tape_34xx.c index c17f35b6136a..cb70fa1cf539 100644 --- a/trunk/drivers/s390/char/tape_34xx.c +++ b/trunk/drivers/s390/char/tape_34xx.c @@ -15,7 +15,6 @@ #include #include #include -#include #define TAPE_DBF_AREA tape_34xx_dbf diff --git a/trunk/drivers/s390/char/tape_3590.c b/trunk/drivers/s390/char/tape_3590.c index fc993acf99b6..9821c5886613 100644 --- a/trunk/drivers/s390/char/tape_3590.c +++ b/trunk/drivers/s390/char/tape_3590.c @@ -12,7 +12,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/tape_class.c b/trunk/drivers/s390/char/tape_class.c index 55343df61edd..b2864e3edb6d 100644 --- a/trunk/drivers/s390/char/tape_class.c +++ b/trunk/drivers/s390/char/tape_class.c @@ -11,8 +11,6 @@ #define KMSG_COMPONENT "tape" #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt -#include - #include "tape_class.h" MODULE_AUTHOR("Stefan Bader "); diff --git a/trunk/drivers/s390/char/tape_core.c b/trunk/drivers/s390/char/tape_core.c index 29c2d73d719d..81b094e480e6 100644 --- a/trunk/drivers/s390/char/tape_core.c +++ b/trunk/drivers/s390/char/tape_core.c @@ -20,7 +20,6 @@ #include // for locks #include #include -#include #include // for variable types diff --git a/trunk/drivers/s390/char/vmcp.c b/trunk/drivers/s390/char/vmcp.c index 5bb59d36a6d4..921dcda77676 100644 --- a/trunk/drivers/s390/char/vmcp.c +++ b/trunk/drivers/s390/char/vmcp.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/vmlogrdr.c b/trunk/drivers/s390/char/vmlogrdr.c index e40a1b892866..7dfa5412d5a8 100644 --- a/trunk/drivers/s390/char/vmlogrdr.c +++ b/trunk/drivers/s390/char/vmlogrdr.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/char/vmur.c b/trunk/drivers/s390/char/vmur.c index 1de672f21037..cc56fc708bae 100644 --- a/trunk/drivers/s390/char/vmur.c +++ b/trunk/drivers/s390/char/vmur.c @@ -12,7 +12,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include diff --git a/trunk/drivers/s390/char/vmwatchdog.c b/trunk/drivers/s390/char/vmwatchdog.c index e13508c98b1a..c974058e48d2 100644 --- a/trunk/drivers/s390/char/vmwatchdog.c +++ b/trunk/drivers/s390/char/vmwatchdog.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/char/zcore.c b/trunk/drivers/s390/char/zcore.c index 18daf16aa357..3166d85914f2 100644 --- a/trunk/drivers/s390/char/zcore.c +++ b/trunk/drivers/s390/char/zcore.c @@ -13,7 +13,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include #include diff --git a/trunk/drivers/s390/cio/blacklist.c b/trunk/drivers/s390/cio/blacklist.c index 13cb60162e42..7eab9ab9f406 100644 --- a/trunk/drivers/s390/cio/blacklist.c +++ b/trunk/drivers/s390/cio/blacklist.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/s390/cio/chp.c b/trunk/drivers/s390/cio/chp.c index 1d16189f2f2d..c268a2e5b7c3 100644 --- a/trunk/drivers/s390/cio/chp.c +++ b/trunk/drivers/s390/cio/chp.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/cio/chsc_sch.c b/trunk/drivers/s390/cio/chsc_sch.c index 404f630c27ca..852612f5dba0 100644 --- a/trunk/drivers/s390/cio/chsc_sch.c +++ b/trunk/drivers/s390/cio/chsc_sch.c @@ -7,7 +7,6 @@ * */ -#include #include #include #include diff --git a/trunk/drivers/s390/cio/qdio_main.c b/trunk/drivers/s390/cio/qdio_main.c index 88be7b9ea6e1..4f8f74311778 100644 --- a/trunk/drivers/s390/cio/qdio_main.c +++ b/trunk/drivers/s390/cio/qdio_main.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/cio/qdio_thinint.c b/trunk/drivers/s390/cio/qdio_thinint.c index ce5f8910ff83..9942c1031b25 100644 --- a/trunk/drivers/s390/cio/qdio_thinint.c +++ b/trunk/drivers/s390/cio/qdio_thinint.c @@ -7,7 +7,6 @@ * Jan Glauber */ #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/ap_bus.c b/trunk/drivers/s390/crypto/ap_bus.c index 91c6028d7b74..20836eff88c5 100644 --- a/trunk/drivers/s390/crypto/ap_bus.c +++ b/trunk/drivers/s390/crypto/ap_bus.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/zcrypt_api.c b/trunk/drivers/s390/crypto/zcrypt_api.c index 304caf549973..ba50fe02e572 100644 --- a/trunk/drivers/s390/crypto/zcrypt_api.c +++ b/trunk/drivers/s390/crypto/zcrypt_api.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/zcrypt_cex2a.c b/trunk/drivers/s390/crypto/zcrypt_cex2a.c index 9c409efa1ecf..c6fb0aa89507 100644 --- a/trunk/drivers/s390/crypto/zcrypt_cex2a.c +++ b/trunk/drivers/s390/crypto/zcrypt_cex2a.c @@ -27,7 +27,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/zcrypt_pcica.c b/trunk/drivers/s390/crypto/zcrypt_pcica.c index 09e934b295a0..e78df3671caf 100644 --- a/trunk/drivers/s390/crypto/zcrypt_pcica.c +++ b/trunk/drivers/s390/crypto/zcrypt_pcica.c @@ -27,7 +27,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/zcrypt_pcicc.c b/trunk/drivers/s390/crypto/zcrypt_pcicc.c index 9dec5c77cff4..142f72a2ca5a 100644 --- a/trunk/drivers/s390/crypto/zcrypt_pcicc.c +++ b/trunk/drivers/s390/crypto/zcrypt_pcicc.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/crypto/zcrypt_pcixcc.c b/trunk/drivers/s390/crypto/zcrypt_pcixcc.c index 510fab4577d4..68f3e6204db8 100644 --- a/trunk/drivers/s390/crypto/zcrypt_pcixcc.c +++ b/trunk/drivers/s390/crypto/zcrypt_pcixcc.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/kvm/kvm_virtio.c b/trunk/drivers/s390/kvm/kvm_virtio.c index 4e298bc8949d..b2fc4fd63f7f 100644 --- a/trunk/drivers/s390/kvm/kvm_virtio.c +++ b/trunk/drivers/s390/kvm/kvm_virtio.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/net/ctcm_dbug.c b/trunk/drivers/s390/net/ctcm_dbug.c index d962fd741a23..1ca58f153470 100644 --- a/trunk/drivers/s390/net/ctcm_dbug.c +++ b/trunk/drivers/s390/net/ctcm_dbug.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/s390/net/ctcm_sysfs.c b/trunk/drivers/s390/net/ctcm_sysfs.c index 2b24550e865e..738ad26c74a7 100644 --- a/trunk/drivers/s390/net/ctcm_sysfs.c +++ b/trunk/drivers/s390/net/ctcm_sysfs.c @@ -14,7 +14,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include "ctcm_main.h" /* diff --git a/trunk/drivers/s390/net/fsm.c b/trunk/drivers/s390/net/fsm.c index e5dea67f902e..cae48cbc5e96 100644 --- a/trunk/drivers/s390/net/fsm.c +++ b/trunk/drivers/s390/net/fsm.c @@ -5,7 +5,6 @@ #include "fsm.h" #include -#include #include MODULE_AUTHOR("(C) 2000 IBM Corp. by Fritz Elfert (felfert@millenux.com)"); diff --git a/trunk/drivers/s390/net/lcs.c b/trunk/drivers/s390/net/lcs.c index 9b19ea13b4d8..f6cc46dc0501 100644 --- a/trunk/drivers/s390/net/lcs.c +++ b/trunk/drivers/s390/net/lcs.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/net/qeth_core_main.c b/trunk/drivers/s390/net/qeth_core_main.c index 3ba738b2e271..3bd4206f3470 100644 --- a/trunk/drivers/s390/net/qeth_core_main.c +++ b/trunk/drivers/s390/net/qeth_core_main.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/net/qeth_l2_main.c b/trunk/drivers/s390/net/qeth_l2_main.c index 6a801dc3bf8e..6f1e3036bafd 100644 --- a/trunk/drivers/s390/net/qeth_l2_main.c +++ b/trunk/drivers/s390/net/qeth_l2_main.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/net/qeth_l3_main.c b/trunk/drivers/s390/net/qeth_l3_main.c index fc6ca1da8b98..b3b6e872d806 100644 --- a/trunk/drivers/s390/net/qeth_l3_main.c +++ b/trunk/drivers/s390/net/qeth_l3_main.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/s390/net/qeth_l3_sys.c b/trunk/drivers/s390/net/qeth_l3_sys.c index 25b3e7aae44f..3f08b11274ae 100644 --- a/trunk/drivers/s390/net/qeth_l3_sys.c +++ b/trunk/drivers/s390/net/qeth_l3_sys.c @@ -8,8 +8,6 @@ * Frank Blaschka */ -#include - #include "qeth_l3.h" #define QETH_DEVICE_ATTR(_id, _name, _mode, _show, _store) \ diff --git a/trunk/drivers/s390/net/smsgiucv.c b/trunk/drivers/s390/net/smsgiucv.c index 70491274da16..ecef1edee701 100644 --- a/trunk/drivers/s390/net/smsgiucv.c +++ b/trunk/drivers/s390/net/smsgiucv.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/net/smsgiucv_app.c b/trunk/drivers/s390/net/smsgiucv_app.c index 137688790207..91579dc6a2b0 100644 --- a/trunk/drivers/s390/net/smsgiucv_app.c +++ b/trunk/drivers/s390/net/smsgiucv_app.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/s390/scsi/zfcp_aux.c b/trunk/drivers/s390/scsi/zfcp_aux.c index 1e6183a86ce5..66d6c01fcf3e 100644 --- a/trunk/drivers/s390/scsi/zfcp_aux.c +++ b/trunk/drivers/s390/scsi/zfcp_aux.c @@ -30,7 +30,6 @@ #include #include -#include #include "zfcp_ext.h" #include "zfcp_fc.h" #include "zfcp_reqlist.h" diff --git a/trunk/drivers/s390/scsi/zfcp_cfdc.c b/trunk/drivers/s390/scsi/zfcp_cfdc.c index 25d9e0ae9c57..0eb6eefd2c1a 100644 --- a/trunk/drivers/s390/scsi/zfcp_cfdc.c +++ b/trunk/drivers/s390/scsi/zfcp_cfdc.c @@ -10,7 +10,6 @@ #define KMSG_COMPONENT "zfcp" #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt -#include #include #include #include diff --git a/trunk/drivers/s390/scsi/zfcp_dbf.c b/trunk/drivers/s390/scsi/zfcp_dbf.c index 075852f6968c..7a149fd85f6d 100644 --- a/trunk/drivers/s390/scsi/zfcp_dbf.c +++ b/trunk/drivers/s390/scsi/zfcp_dbf.c @@ -10,7 +10,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include "zfcp_dbf.h" #include "zfcp_ext.h" diff --git a/trunk/drivers/s390/scsi/zfcp_fc.c b/trunk/drivers/s390/scsi/zfcp_fc.c index 2a1cbb74b99b..5219670f0c99 100644 --- a/trunk/drivers/s390/scsi/zfcp_fc.c +++ b/trunk/drivers/s390/scsi/zfcp_fc.c @@ -10,7 +10,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include #include "zfcp_ext.h" diff --git a/trunk/drivers/s390/scsi/zfcp_fsf.c b/trunk/drivers/s390/scsi/zfcp_fsf.c index 18564891ea61..6538742b421a 100644 --- a/trunk/drivers/s390/scsi/zfcp_fsf.c +++ b/trunk/drivers/s390/scsi/zfcp_fsf.c @@ -10,7 +10,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include "zfcp_ext.h" #include "zfcp_fc.h" diff --git a/trunk/drivers/s390/scsi/zfcp_qdio.c b/trunk/drivers/s390/scsi/zfcp_qdio.c index dbfa312a7f50..6479273a3094 100644 --- a/trunk/drivers/s390/scsi/zfcp_qdio.c +++ b/trunk/drivers/s390/scsi/zfcp_qdio.c @@ -9,7 +9,6 @@ #define KMSG_COMPONENT "zfcp" #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt -#include #include "zfcp_ext.h" #include "zfcp_qdio.h" diff --git a/trunk/drivers/s390/scsi/zfcp_scsi.c b/trunk/drivers/s390/scsi/zfcp_scsi.c index 174b6d57d576..c3c4178888af 100644 --- a/trunk/drivers/s390/scsi/zfcp_scsi.c +++ b/trunk/drivers/s390/scsi/zfcp_scsi.c @@ -10,7 +10,6 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include -#include #include #include #include "zfcp_ext.h" diff --git a/trunk/drivers/s390/scsi/zfcp_sysfs.c b/trunk/drivers/s390/scsi/zfcp_sysfs.c index f5f60698dc4c..a43035d4bd70 100644 --- a/trunk/drivers/s390/scsi/zfcp_sysfs.c +++ b/trunk/drivers/s390/scsi/zfcp_sysfs.c @@ -9,7 +9,6 @@ #define KMSG_COMPONENT "zfcp" #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt -#include #include "zfcp_ext.h" #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \ diff --git a/trunk/drivers/sbus/char/bbc_envctrl.c b/trunk/drivers/sbus/char/bbc_envctrl.c index b4951eb0358e..28d86f9df83c 100644 --- a/trunk/drivers/sbus/char/bbc_envctrl.c +++ b/trunk/drivers/sbus/char/bbc_envctrl.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/sbus/char/display7seg.c b/trunk/drivers/sbus/char/display7seg.c index 3e59189f4137..4431578d8c45 100644 --- a/trunk/drivers/sbus/char/display7seg.c +++ b/trunk/drivers/sbus/char/display7seg.c @@ -12,7 +12,6 @@ #include #include #include /* request_region */ -#include #include #include #include diff --git a/trunk/drivers/sbus/char/envctrl.c b/trunk/drivers/sbus/char/envctrl.c index c6e2eff19409..aa2b60a868ba 100644 --- a/trunk/drivers/sbus/char/envctrl.c +++ b/trunk/drivers/sbus/char/envctrl.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/sbus/char/flash.c b/trunk/drivers/sbus/char/flash.c index 19f255b97c86..41083472ff4f 100644 --- a/trunk/drivers/sbus/char/flash.c +++ b/trunk/drivers/sbus/char/flash.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/sbus/char/jsflash.c b/trunk/drivers/sbus/char/jsflash.c index 4942050dc5b6..869a30b49edc 100644 --- a/trunk/drivers/sbus/char/jsflash.c +++ b/trunk/drivers/sbus/char/jsflash.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/3w-9xxx.c b/trunk/drivers/scsi/3w-9xxx.c index e9788f55ab13..84d3bbaa95e7 100644 --- a/trunk/drivers/scsi/3w-9xxx.c +++ b/trunk/drivers/scsi/3w-9xxx.c @@ -91,7 +91,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/3w-sas.c b/trunk/drivers/scsi/3w-sas.c index 54c5ffb1eaa1..4d314d740de4 100644 --- a/trunk/drivers/scsi/3w-sas.c +++ b/trunk/drivers/scsi/3w-sas.c @@ -65,7 +65,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/3w-xxxx.c b/trunk/drivers/scsi/3w-xxxx.c index 5faf903ca8c8..f65a1e92340c 100644 --- a/trunk/drivers/scsi/3w-xxxx.c +++ b/trunk/drivers/scsi/3w-xxxx.c @@ -205,7 +205,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/53c700.c b/trunk/drivers/scsi/53c700.c index 80dc3ac12cde..9f4a911a6d8c 100644 --- a/trunk/drivers/scsi/53c700.c +++ b/trunk/drivers/scsi/53c700.c @@ -117,7 +117,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/BusLogic.c b/trunk/drivers/scsi/BusLogic.c index fc0b4b81d552..1ddcf4031d4c 100644 --- a/trunk/drivers/scsi/BusLogic.c +++ b/trunk/drivers/scsi/BusLogic.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/NCR_D700.c b/trunk/drivers/scsi/NCR_D700.c index 8647256ad66d..1cdf09a4779a 100644 --- a/trunk/drivers/scsi/NCR_D700.c +++ b/trunk/drivers/scsi/NCR_D700.c @@ -97,7 +97,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/NCR_Q720.c b/trunk/drivers/scsi/NCR_Q720.c index afdbb9addf18..a8bbdc2273b8 100644 --- a/trunk/drivers/scsi/NCR_Q720.c +++ b/trunk/drivers/scsi/NCR_Q720.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/a100u2w.c b/trunk/drivers/scsi/a100u2w.c index dbbc601948e5..ff5716d5f044 100644 --- a/trunk/drivers/scsi/a100u2w.c +++ b/trunk/drivers/scsi/a100u2w.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/scsi/a2091.c b/trunk/drivers/scsi/a2091.c index d8fe5b76fee0..4b38c4750f77 100644 --- a/trunk/drivers/scsi/a2091.c +++ b/trunk/drivers/scsi/a2091.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/a3000.c b/trunk/drivers/scsi/a3000.c index c35fc55f1c96..6970ce82c4ac 100644 --- a/trunk/drivers/scsi/a3000.c +++ b/trunk/drivers/scsi/a3000.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/a4000t.c b/trunk/drivers/scsi/a4000t.c index 11ae6be8aeaf..e3519fa5a3ba 100644 --- a/trunk/drivers/scsi/a4000t.c +++ b/trunk/drivers/scsi/a4000t.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/aacraid/rx.c b/trunk/drivers/scsi/aacraid/rx.c index 04057ab72a8b..f70d9f8e79e5 100644 --- a/trunk/drivers/scsi/aacraid/rx.c +++ b/trunk/drivers/scsi/aacraid/rx.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/aacraid/sa.c b/trunk/drivers/scsi/aacraid/sa.c index 622c21c68e65..b6a3c5c187b6 100644 --- a/trunk/drivers/scsi/aacraid/sa.c +++ b/trunk/drivers/scsi/aacraid/sa.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/advansys.c b/trunk/drivers/scsi/advansys.c index 9201afe65609..22626abdb630 100644 --- a/trunk/drivers/scsi/advansys.c +++ b/trunk/drivers/scsi/advansys.c @@ -4781,14 +4781,12 @@ static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", fwname, err); - asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM; return err; } if (fw->size < 4) { printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", fw->size, fwname); release_firmware(fw); - asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM; return -EINVAL; } chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | @@ -5112,14 +5110,12 @@ static int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc) if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", fwname, err); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return err; } if (fw->size < 4) { printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", fw->size, fwname); release_firmware(fw); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return -EINVAL; } chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | @@ -5628,14 +5624,12 @@ static int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc) if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", fwname, err); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return err; } if (fw->size < 4) { printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", fw->size, fwname); release_firmware(fw); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return -EINVAL; } chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | @@ -6130,14 +6124,12 @@ static int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc) if (err) { printk(KERN_ERR "Failed to load image \"%s\" err %d\n", fwname, err); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return err; } if (fw->size < 4) { printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", fw->size, fwname); release_firmware(fw); - asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; return -EINVAL; } chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | diff --git a/trunk/drivers/scsi/aha152x.c b/trunk/drivers/scsi/aha152x.c index 8eab8587ff21..1e5478abd90e 100644 --- a/trunk/drivers/scsi/aha152x.c +++ b/trunk/drivers/scsi/aha152x.c @@ -254,7 +254,6 @@ #include #include #include -#include #include #include "scsi.h" diff --git a/trunk/drivers/scsi/aha1542.c b/trunk/drivers/scsi/aha1542.c index 2a8cf137f609..80594947c6f6 100644 --- a/trunk/drivers/scsi/aha1542.c +++ b/trunk/drivers/scsi/aha1542.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/aha1740.c b/trunk/drivers/scsi/aha1740.c index 0107a4cc3331..538135783aab 100644 --- a/trunk/drivers/scsi/aha1740.c +++ b/trunk/drivers/scsi/aha1740.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c index 4c41332a354b..1222a7ac698a 100644 --- a/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -53,7 +53,6 @@ static struct scsi_transport_template *ahd_linux_transport_template = NULL; #include /* For block_size() */ #include /* For ssleep/msleep */ #include -#include /* * Bucket size for counting good commands in between bad ones. diff --git a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c index 5e42dac23505..8cb05dc8e6a1 100644 --- a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -129,7 +129,6 @@ static struct scsi_transport_template *ahc_linux_transport_template = NULL; #include /* For fetching system memory size */ #include /* For block_size() */ #include /* For ssleep/msleep */ -#include /* diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_hwi.c b/trunk/drivers/scsi/aic94xx/aic94xx_hwi.c index 81b736c76fff..eb9dc3195fdf 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_hwi.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_init.c b/trunk/drivers/scsi/aic94xx/aic94xx_init.c index 24ac2315c5c7..996f7224f90e 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_init.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_init.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_scb.c b/trunk/drivers/scsi/aic94xx/aic94xx_scb.c index c43698b1cb64..ca55013b6ae5 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_scb.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_scb.c @@ -24,7 +24,6 @@ * */ -#include #include #include "aic94xx.h" diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_sds.c b/trunk/drivers/scsi/aic94xx/aic94xx_sds.c index edb43fda9f36..8630a75b2872 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_sds.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_sds.c @@ -26,7 +26,6 @@ */ #include -#include #include #include "aic94xx.h" diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_seq.c b/trunk/drivers/scsi/aic94xx/aic94xx_seq.c index d01dcc62b39a..8f98e33155e9 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_seq.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_seq.c @@ -27,7 +27,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/aic94xx/aic94xx_tmf.c b/trunk/drivers/scsi/aic94xx/aic94xx_tmf.c index 0add73bdf2a4..78eb86fc6276 100644 --- a/trunk/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/trunk/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -25,7 +25,6 @@ */ #include -#include #include "aic94xx.h" #include "aic94xx_sas.h" #include "aic94xx_hwi.h" diff --git a/trunk/drivers/scsi/arcmsr/arcmsr_hba.c b/trunk/drivers/scsi/arcmsr/arcmsr_hba.c index ffbe2192da3c..47d5d19f8c92 100644 --- a/trunk/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/trunk/drivers/scsi/arcmsr/arcmsr_hba.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/atari_NCR5380.c b/trunk/drivers/scsi/atari_NCR5380.c index 158ebc3644d8..4240b05aef6d 100644 --- a/trunk/drivers/scsi/atari_NCR5380.c +++ b/trunk/drivers/scsi/atari_NCR5380.c @@ -651,7 +651,6 @@ static inline void NCR5380_print_phase(struct Scsi_Host *instance) * interrupt or bottom half. */ -#include #include #include diff --git a/trunk/drivers/scsi/atp870u.c b/trunk/drivers/scsi/atp870u.c index ab5bdda6903e..b137e561f5bc 100644 --- a/trunk/drivers/scsi/atp870u.c +++ b/trunk/drivers/scsi/atp870u.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/be2iscsi/be_main.c b/trunk/drivers/scsi/be2iscsi/be_main.c index dd5b105f8f47..fcfb29e02d8a 100644 --- a/trunk/drivers/scsi/be2iscsi/be_main.c +++ b/trunk/drivers/scsi/be2iscsi/be_main.c @@ -19,7 +19,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/bfa/bfad.c b/trunk/drivers/scsi/bfa/bfad.c index 13f5feb308c2..6bff08ea4029 100644 --- a/trunk/drivers/scsi/bfa/bfad.c +++ b/trunk/drivers/scsi/bfa/bfad.c @@ -19,7 +19,6 @@ * bfad.c Linux driver PCI interface module. */ -#include #include #include #include "bfad_drv.h" diff --git a/trunk/drivers/scsi/bfa/bfad_attr.c b/trunk/drivers/scsi/bfa/bfad_attr.c index 6a2efdd5ef24..d97f69191838 100644 --- a/trunk/drivers/scsi/bfa/bfad_attr.c +++ b/trunk/drivers/scsi/bfa/bfad_attr.c @@ -19,7 +19,6 @@ * bfa_attr.c Linux driver configuration interface module. */ -#include #include "bfad_drv.h" #include "bfad_im.h" #include "bfad_trcmod.h" diff --git a/trunk/drivers/scsi/bfa/bfad_im.c b/trunk/drivers/scsi/bfa/bfad_im.c index 78f42aa57369..f9fc67a25bf2 100644 --- a/trunk/drivers/scsi/bfa/bfad_im.c +++ b/trunk/drivers/scsi/bfa/bfad_im.c @@ -19,7 +19,6 @@ * bfad_im.c Linux driver IM module. */ -#include #include "bfad_drv.h" #include "bfad_im.h" #include "bfad_trcmod.h" diff --git a/trunk/drivers/scsi/bfa/rport.c b/trunk/drivers/scsi/bfa/rport.c index 7b096f2e3836..8e73dd9a625a 100644 --- a/trunk/drivers/scsi/bfa/rport.c +++ b/trunk/drivers/scsi/bfa/rport.c @@ -19,7 +19,6 @@ * rport.c Remote port implementation. */ -#include #include #include #include "fcbuild.h" diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c b/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c index 18352ff82101..1af578dec276 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -11,7 +11,6 @@ * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) */ -#include #include #include #include "bnx2i.h" diff --git a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c index f2e9b18fe76c..cb71dc984797 100644 --- a/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/trunk/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -12,7 +12,6 @@ * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) */ -#include #include #include #include "bnx2i.h" diff --git a/trunk/drivers/scsi/bvme6000_scsi.c b/trunk/drivers/scsi/bvme6000_scsi.c index d40ea2f5be10..5799cb5cba6b 100644 --- a/trunk/drivers/scsi/bvme6000_scsi.c +++ b/trunk/drivers/scsi/bvme6000_scsi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ch.c b/trunk/drivers/scsi/ch.c index 4799d4391203..fe11c1d4b31d 100644 --- a/trunk/drivers/scsi/ch.c +++ b/trunk/drivers/scsi/ch.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.c b/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.c index b58d9134ac1b..344fd53b9954 100644 --- a/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.c +++ b/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.c @@ -10,7 +10,6 @@ * Written by: Karen Xie (kxie@chelsio.com) */ -#include #include #include diff --git a/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.h b/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.h index 6761b329124d..87dd56b422bf 100644 --- a/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.h +++ b/trunk/drivers/scsi/cxgb3i/cxgb3i_ddp.h @@ -13,7 +13,6 @@ #ifndef __CXGB3I_ULP2_DDP_H__ #define __CXGB3I_ULP2_DDP_H__ -#include #include /** diff --git a/trunk/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/trunk/drivers/scsi/cxgb3i/cxgb3i_iscsi.c index 7b686abaae64..b7c30585dadd 100644 --- a/trunk/drivers/scsi/cxgb3i/cxgb3i_iscsi.c +++ b/trunk/drivers/scsi/cxgb3i/cxgb3i_iscsi.c @@ -12,7 +12,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/cxgb3i/cxgb3i_offload.c b/trunk/drivers/scsi/cxgb3i/cxgb3i_offload.c index a175be9c496f..3e08c430ff29 100644 --- a/trunk/drivers/scsi/cxgb3i/cxgb3i_offload.c +++ b/trunk/drivers/scsi/cxgb3i/cxgb3i_offload.c @@ -13,7 +13,6 @@ */ #include -#include #include #include "cxgb3_defs.h" diff --git a/trunk/drivers/scsi/cxgb3i/cxgb3i_pdu.c b/trunk/drivers/scsi/cxgb3i/cxgb3i_pdu.c index dc5e3e77a351..9c38539557fc 100644 --- a/trunk/drivers/scsi/cxgb3i/cxgb3i_pdu.c +++ b/trunk/drivers/scsi/cxgb3i/cxgb3i_pdu.c @@ -12,7 +12,6 @@ * Written by: Karen Xie (kxie@chelsio.com) */ -#include #include #include #include diff --git a/trunk/drivers/scsi/dc395x.c b/trunk/drivers/scsi/dc395x.c index bd977be7544e..6c59c02c1ed9 100644 --- a/trunk/drivers/scsi/dc395x.c +++ b/trunk/drivers/scsi/dc395x.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/device_handler/scsi_dh.c b/trunk/drivers/scsi/device_handler/scsi_dh.c index 6fae3d285ae7..e19a1a55270c 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh.c @@ -21,7 +21,6 @@ * Mike Anderson */ -#include #include #include "../scsi_priv.h" diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_alua.c b/trunk/drivers/scsi/device_handler/scsi_dh_alua.c index 1a970a76b1b9..bc9e94f5915e 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_alua.c @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ -#include #include #include #include diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_emc.c b/trunk/drivers/scsi/device_handler/scsi_dh_emc.c index e8a0bc3efd49..63032ec3db92 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_emc.c @@ -20,7 +20,6 @@ * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c index e3916641e627..857fdd6032b2 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -21,7 +21,6 @@ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c b/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c index 5b683e429542..1a660191a905 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -23,7 +23,6 @@ #include #include #include -#include #define RDAC_NAME "rdac" #define RDAC_RETRY_COUNT 5 diff --git a/trunk/drivers/scsi/eata.c b/trunk/drivers/scsi/eata.c index d1c31378f6da..3c5abf7cd762 100644 --- a/trunk/drivers/scsi/eata.c +++ b/trunk/drivers/scsi/eata.c @@ -490,7 +490,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/eata_pio.c b/trunk/drivers/scsi/eata_pio.c index 60886c19065e..152dd15db276 100644 --- a/trunk/drivers/scsi/eata_pio.c +++ b/trunk/drivers/scsi/eata_pio.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/fcoe/fcoe.c b/trunk/drivers/scsi/fcoe/fcoe.c index f01b9b44e8aa..2f47ae7cce91 100644 --- a/trunk/drivers/scsi/fcoe/fcoe.c +++ b/trunk/drivers/scsi/fcoe/fcoe.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/fcoe/libfcoe.c b/trunk/drivers/scsi/fcoe/libfcoe.c index 3440da48d169..511cb6b371ee 100644 --- a/trunk/drivers/scsi/fcoe/libfcoe.c +++ b/trunk/drivers/scsi/fcoe/libfcoe.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/fd_mcs.c b/trunk/drivers/scsi/fd_mcs.c index 2ad95aa8f585..85bd54c77b50 100644 --- a/trunk/drivers/scsi/fd_mcs.c +++ b/trunk/drivers/scsi/fd_mcs.c @@ -88,7 +88,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/fdomain.c b/trunk/drivers/scsi/fdomain.c index e296bcc57d5c..32eef66114c7 100644 --- a/trunk/drivers/scsi/fdomain.c +++ b/trunk/drivers/scsi/fdomain.c @@ -279,7 +279,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/fnic/fnic_fcs.c b/trunk/drivers/scsi/fnic/fnic_fcs.c index 5259888fbfb1..54f8d0e5407f 100644 --- a/trunk/drivers/scsi/fnic/fnic_fcs.c +++ b/trunk/drivers/scsi/fnic/fnic_fcs.c @@ -17,7 +17,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/fnic/fnic_main.c b/trunk/drivers/scsi/fnic/fnic_main.c index 97b212570bcc..507e26c1c29f 100644 --- a/trunk/drivers/scsi/fnic/fnic_main.c +++ b/trunk/drivers/scsi/fnic/fnic_main.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/fnic/fnic_scsi.c b/trunk/drivers/scsi/fnic/fnic_scsi.c index 3cc47c6e1ada..65a39b0f6dc2 100644 --- a/trunk/drivers/scsi/fnic/fnic_scsi.c +++ b/trunk/drivers/scsi/fnic/fnic_scsi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/fnic/vnic_dev.c b/trunk/drivers/scsi/fnic/vnic_dev.c index db710148d156..566770645086 100644 --- a/trunk/drivers/scsi/fnic/vnic_dev.c +++ b/trunk/drivers/scsi/fnic/vnic_dev.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "vnic_resource.h" #include "vnic_devcmd.h" #include "vnic_dev.h" diff --git a/trunk/drivers/scsi/fnic/vnic_rq.c b/trunk/drivers/scsi/fnic/vnic_rq.c index fd2068f5ae16..bedd0d285630 100644 --- a/trunk/drivers/scsi/fnic/vnic_rq.c +++ b/trunk/drivers/scsi/fnic/vnic_rq.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "vnic_dev.h" #include "vnic_rq.h" diff --git a/trunk/drivers/scsi/fnic/vnic_wq.c b/trunk/drivers/scsi/fnic/vnic_wq.c index a414135460db..1f9ea790d130 100644 --- a/trunk/drivers/scsi/fnic/vnic_wq.c +++ b/trunk/drivers/scsi/fnic/vnic_wq.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "vnic_dev.h" #include "vnic_wq.h" diff --git a/trunk/drivers/scsi/gdth.c b/trunk/drivers/scsi/gdth.c index 35a4b3073ec3..ba3c94c9c25f 100644 --- a/trunk/drivers/scsi/gdth.c +++ b/trunk/drivers/scsi/gdth.c @@ -121,7 +121,6 @@ #include #include #include -#include #ifdef GDTH_RTC #include diff --git a/trunk/drivers/scsi/gdth_proc.c b/trunk/drivers/scsi/gdth_proc.c index 0572b9bf4bd6..ffb2b21992ba 100644 --- a/trunk/drivers/scsi/gdth_proc.c +++ b/trunk/drivers/scsi/gdth_proc.c @@ -3,7 +3,6 @@ */ #include -#include int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length, int inout) diff --git a/trunk/drivers/scsi/gvp11.c b/trunk/drivers/scsi/gvp11.c index 48f406850c65..5d1bf7e3d245 100644 --- a/trunk/drivers/scsi/gvp11.c +++ b/trunk/drivers/scsi/gvp11.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/hosts.c b/trunk/drivers/scsi/hosts.c index 6660fa92ffa1..09dbcb847b73 100644 --- a/trunk/drivers/scsi/hosts.c +++ b/trunk/drivers/scsi/hosts.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/hptiop.c b/trunk/drivers/scsi/hptiop.c index 645f7cdf21ab..4f0556571f80 100644 --- a/trunk/drivers/scsi/hptiop.c +++ b/trunk/drivers/scsi/hptiop.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvfc.c b/trunk/drivers/scsi/ibmvscsi/ibmvfc.c index c2eea711a5ce..4e577e2fee38 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvfc.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c index ff5ec5ac1fb5..dc1bcbe3b176 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -70,7 +70,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c b/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c index e2056d517e99..d5eaf9727109 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvstgt.c @@ -23,7 +23,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c index a864ccc0a342..63a30cbbf9de 100644 --- a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "ibmvscsi.h" diff --git a/trunk/drivers/scsi/imm.c b/trunk/drivers/scsi/imm.c index 4734ab0b3ff6..c2a9a13d788f 100644 --- a/trunk/drivers/scsi/imm.c +++ b/trunk/drivers/scsi/imm.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/ipr.c b/trunk/drivers/scsi/ipr.c index 520461b9bc09..c79cd98eb6bf 100644 --- a/trunk/drivers/scsi/ipr.c +++ b/trunk/drivers/scsi/ipr.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/iscsi_tcp.c b/trunk/drivers/scsi/iscsi_tcp.c index 0ee725ced511..249053a9d4fa 100644 --- a/trunk/drivers/scsi/iscsi_tcp.c +++ b/trunk/drivers/scsi/iscsi_tcp.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/jazz_esp.c b/trunk/drivers/scsi/jazz_esp.c index 08e26d4e3731..b2d481dd3750 100644 --- a/trunk/drivers/scsi/jazz_esp.c +++ b/trunk/drivers/scsi/jazz_esp.c @@ -4,7 +4,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/lasi700.c b/trunk/drivers/scsi/lasi700.c index 23880f8fe7e4..b3d31315ac32 100644 --- a/trunk/drivers/scsi/lasi700.c +++ b/trunk/drivers/scsi/lasi700.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/libfc/fc_disc.c b/trunk/drivers/scsi/libfc/fc_disc.c index 1087a7f18e84..9b0a5192a965 100644 --- a/trunk/drivers/scsi/libfc/fc_disc.c +++ b/trunk/drivers/scsi/libfc/fc_disc.c @@ -33,7 +33,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/scsi/libfc/fc_exch.c b/trunk/drivers/scsi/libfc/fc_exch.c index e5df0d4db67e..7f4364770e4a 100644 --- a/trunk/drivers/scsi/libfc/fc_exch.c +++ b/trunk/drivers/scsi/libfc/fc_exch.c @@ -24,7 +24,7 @@ */ #include -#include +#include #include #include diff --git a/trunk/drivers/scsi/libfc/fc_fcp.c b/trunk/drivers/scsi/libfc/fc_fcp.c index 17396c708b08..774e7ac837a5 100644 --- a/trunk/drivers/scsi/libfc/fc_fcp.c +++ b/trunk/drivers/scsi/libfc/fc_fcp.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/libfc/fc_frame.c b/trunk/drivers/scsi/libfc/fc_frame.c index 981329a17c48..6da01c616964 100644 --- a/trunk/drivers/scsi/libfc/fc_frame.c +++ b/trunk/drivers/scsi/libfc/fc_frame.c @@ -24,7 +24,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/scsi/libfc/fc_lport.c b/trunk/drivers/scsi/libfc/fc_lport.c index d126ecfff704..7ec8ce75007c 100644 --- a/trunk/drivers/scsi/libfc/fc_lport.c +++ b/trunk/drivers/scsi/libfc/fc_lport.c @@ -88,7 +88,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/scsi/libfc/fc_rport.c b/trunk/drivers/scsi/libfc/fc_rport.c index b37d0ff28b35..97923bb07765 100644 --- a/trunk/drivers/scsi/libfc/fc_rport.c +++ b/trunk/drivers/scsi/libfc/fc_rport.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/libiscsi.c b/trunk/drivers/scsi/libiscsi.c index 6d5ae4474bb3..685eaec53218 100644 --- a/trunk/drivers/scsi/libiscsi.c +++ b/trunk/drivers/scsi/libiscsi.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -3088,15 +3087,14 @@ static void iscsi_start_session_recovery(struct iscsi_session *session, session->state = ISCSI_STATE_TERMINATE; else if (conn->stop_stage != STOP_CONN_RECOVER) session->state = ISCSI_STATE_IN_RECOVERY; - - old_stop_stage = conn->stop_stage; - conn->stop_stage = flag; spin_unlock_bh(&session->lock); del_timer_sync(&conn->transport_timer); iscsi_suspend_tx(conn); spin_lock_bh(&session->lock); + old_stop_stage = conn->stop_stage; + conn->stop_stage = flag; conn->c_stage = ISCSI_CONN_STOPPED; spin_unlock_bh(&session->lock); diff --git a/trunk/drivers/scsi/libiscsi_tcp.c b/trunk/drivers/scsi/libiscsi_tcp.c index 5c92620292fb..4ad87fd74ddd 100644 --- a/trunk/drivers/scsi/libiscsi_tcp.c +++ b/trunk/drivers/scsi/libiscsi_tcp.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/libsas/sas_ata.c b/trunk/drivers/scsi/libsas/sas_ata.c index b00efd19aadb..e15501170698 100644 --- a/trunk/drivers/scsi/libsas/sas_ata.c +++ b/trunk/drivers/scsi/libsas/sas_ata.c @@ -22,7 +22,6 @@ */ #include -#include #include #include "sas_internal.h" diff --git a/trunk/drivers/scsi/libsas/sas_discover.c b/trunk/drivers/scsi/libsas/sas_discover.c index f5831930df9b..facc5bfcf7db 100644 --- a/trunk/drivers/scsi/libsas/sas_discover.c +++ b/trunk/drivers/scsi/libsas/sas_discover.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include "sas_internal.h" diff --git a/trunk/drivers/scsi/libsas/sas_expander.c b/trunk/drivers/scsi/libsas/sas_expander.c index c65af02dcfe8..33cf988c8c8a 100644 --- a/trunk/drivers/scsi/libsas/sas_expander.c +++ b/trunk/drivers/scsi/libsas/sas_expander.c @@ -24,7 +24,6 @@ #include #include -#include #include "sas_internal.h" diff --git a/trunk/drivers/scsi/libsas/sas_host_smp.c b/trunk/drivers/scsi/libsas/sas_host_smp.c index 04ad8dd1a74c..1bc3b7567994 100644 --- a/trunk/drivers/scsi/libsas/sas_host_smp.c +++ b/trunk/drivers/scsi/libsas/sas_host_smp.c @@ -10,7 +10,6 @@ */ #include #include -#include #include "sas_internal.h" diff --git a/trunk/drivers/scsi/libsas/sas_init.c b/trunk/drivers/scsi/libsas/sas_init.c index 2dc55343f671..9cd5abe9e714 100644 --- a/trunk/drivers/scsi/libsas/sas_init.c +++ b/trunk/drivers/scsi/libsas/sas_init.c @@ -24,7 +24,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/libsas/sas_scsi_host.c b/trunk/drivers/scsi/libsas/sas_scsi_host.c index 2660e1b4569a..14b13196b22d 100644 --- a/trunk/drivers/scsi/libsas/sas_scsi_host.c +++ b/trunk/drivers/scsi/libsas/sas_scsi_host.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/libsrp.c b/trunk/drivers/scsi/libsrp.c index ff6a28ce9b69..22775165bf6a 100644 --- a/trunk/drivers/scsi/libsrp.c +++ b/trunk/drivers/scsi/libsrp.c @@ -19,7 +19,6 @@ * 02110-1301 USA */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_attr.c b/trunk/drivers/scsi/lpfc/lpfc_attr.c index 1849e33e68f9..64cd17eedb64 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_attr.c +++ b/trunk/drivers/scsi/lpfc/lpfc_attr.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_bsg.c b/trunk/drivers/scsi/lpfc/lpfc_bsg.c index ec3723831e89..692c29f6048e 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_bsg.c +++ b/trunk/drivers/scsi/lpfc/lpfc_bsg.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_ct.c b/trunk/drivers/scsi/lpfc/lpfc_ct.c index 463b74902ac4..c7e921973f66 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_ct.c +++ b/trunk/drivers/scsi/lpfc/lpfc_ct.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_debugfs.c b/trunk/drivers/scsi/lpfc/lpfc_debugfs.c index a80d938fafc9..391584183d81 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/trunk/drivers/scsi/lpfc/lpfc_debugfs.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_els.c b/trunk/drivers/scsi/lpfc/lpfc_els.c index 5fbdb22c1899..ee980bd66869 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_els.c +++ b/trunk/drivers/scsi/lpfc/lpfc_els.c @@ -21,7 +21,6 @@ /* See Fibre Channel protocol T11 FC-LS for details */ #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_hbadisc.c b/trunk/drivers/scsi/lpfc/lpfc_hbadisc.c index e1466eec56b7..c555e3b7f202 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/trunk/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -20,7 +20,6 @@ *******************************************************************/ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_init.c b/trunk/drivers/scsi/lpfc/lpfc_init.c index 774663e8e1fe..ea44239eeb33 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_init.c +++ b/trunk/drivers/scsi/lpfc/lpfc_init.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_mbox.c b/trunk/drivers/scsi/lpfc/lpfc_mbox.c index 72e6adb0643e..1e61ae3bc4eb 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_mbox.c +++ b/trunk/drivers/scsi/lpfc/lpfc_mbox.c @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_mem.c b/trunk/drivers/scsi/lpfc/lpfc_mem.c index 8f879e477e9d..a1b6db6016da 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_mem.c +++ b/trunk/drivers/scsi/lpfc/lpfc_mem.c @@ -20,7 +20,6 @@ *******************************************************************/ #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_nportdisc.c b/trunk/drivers/scsi/lpfc/lpfc_nportdisc.c index e331204a4d56..d20ae6b3b3cf 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/trunk/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_scsi.c b/trunk/drivers/scsi/lpfc/lpfc_scsi.c index dccdb822328c..b16bb2c9978b 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_scsi.c +++ b/trunk/drivers/scsi/lpfc/lpfc_scsi.c @@ -19,7 +19,6 @@ * included with this package. * *******************************************************************/ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_sli.c b/trunk/drivers/scsi/lpfc/lpfc_sli.c index 049fb9a17b3f..fe6660ca6452 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_sli.c +++ b/trunk/drivers/scsi/lpfc/lpfc_sli.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/lpfc/lpfc_vport.c b/trunk/drivers/scsi/lpfc/lpfc_vport.c index ffd575c379f3..869f76cbc58a 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_vport.c +++ b/trunk/drivers/scsi/lpfc/lpfc_vport.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/mac_esp.c b/trunk/drivers/scsi/mac_esp.c index 3893337e3dd3..4a90eaf7cb63 100644 --- a/trunk/drivers/scsi/mac_esp.c +++ b/trunk/drivers/scsi/mac_esp.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/megaraid.c b/trunk/drivers/scsi/megaraid.c index 4bf7edca9e69..49eb0612d5af 100644 --- a/trunk/drivers/scsi/megaraid.c +++ b/trunk/drivers/scsi/megaraid.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include "scsi.h" diff --git a/trunk/drivers/scsi/megaraid/megaraid_mbox.c b/trunk/drivers/scsi/megaraid/megaraid_mbox.c index a7810a106b37..7f977967b884 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_mbox.c +++ b/trunk/drivers/scsi/megaraid/megaraid_mbox.c @@ -70,7 +70,6 @@ * For history of changes, see Documentation/ChangeLog.megaraid */ -#include #include "megaraid_mbox.h" static int megaraid_init(void); diff --git a/trunk/drivers/scsi/megaraid/megaraid_mm.c b/trunk/drivers/scsi/megaraid/megaraid_mm.c index 36e0b7d05c1d..f680561d2c6f 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_mm.c +++ b/trunk/drivers/scsi/megaraid/megaraid_mm.c @@ -15,7 +15,6 @@ * Common management module */ #include -#include #include #include "megaraid_mm.h" diff --git a/trunk/drivers/scsi/megaraid/megaraid_sas.c b/trunk/drivers/scsi/megaraid/megaraid_sas.c index 99e4478c3f3e..409648f5845f 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_sas.c +++ b/trunk/drivers/scsi/megaraid/megaraid_sas.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/mesh.c b/trunk/drivers/scsi/mesh.c index a1c97e88068a..11aa917629ac 100644 --- a/trunk/drivers/scsi/mesh.c +++ b/trunk/drivers/scsi/mesh.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/mpt2sas/mpt2sas_config.c b/trunk/drivers/scsi/mpt2sas/mpt2sas_config.c index cf44b355bc97..411c27d7f787 100644 --- a/trunk/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/trunk/drivers/scsi/mpt2sas/mpt2sas_config.c @@ -51,7 +51,6 @@ #include #include #include -#include #include "mpt2sas_base.h" diff --git a/trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c index be171ed682e0..c7ec3f174782 100644 --- a/trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -53,7 +53,6 @@ #include #include #include -#include #include "mpt2sas_base.h" diff --git a/trunk/drivers/scsi/mpt2sas/mpt2sas_transport.c b/trunk/drivers/scsi/mpt2sas/mpt2sas_transport.c index bd7ca2b49f81..789f9ee7f001 100644 --- a/trunk/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/trunk/drivers/scsi/mpt2sas/mpt2sas_transport.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/mvme16x_scsi.c b/trunk/drivers/scsi/mvme16x_scsi.c index 39f554f5f261..b5fbfd6ce870 100644 --- a/trunk/drivers/scsi/mvme16x_scsi.c +++ b/trunk/drivers/scsi/mvme16x_scsi.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/mvsas/mv_sas.h b/trunk/drivers/scsi/mvsas/mv_sas.h index 885858bcc403..aa2270af1bac 100644 --- a/trunk/drivers/scsi/mvsas/mv_sas.h +++ b/trunk/drivers/scsi/mvsas/mv_sas.h @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ncr53c8xx.c b/trunk/drivers/scsi/ncr53c8xx.c index d013a2aa2fd5..a2d569828308 100644 --- a/trunk/drivers/scsi/ncr53c8xx.c +++ b/trunk/drivers/scsi/ncr53c8xx.c @@ -98,7 +98,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/nsp32.c b/trunk/drivers/scsi/nsp32.c index 4c1e54545200..2c98a6ee973b 100644 --- a/trunk/drivers/scsi/nsp32.c +++ b/trunk/drivers/scsi/nsp32.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/osd/osd_initiator.c b/trunk/drivers/scsi/osd/osd_initiator.c index ee4b6914667f..60de85091502 100644 --- a/trunk/drivers/scsi/osd/osd_initiator.c +++ b/trunk/drivers/scsi/osd/osd_initiator.c @@ -39,8 +39,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - #include #include #include diff --git a/trunk/drivers/scsi/osd/osd_uld.c b/trunk/drivers/scsi/osd/osd_uld.c index ffdd9fdb9995..0a90702b3d71 100644 --- a/trunk/drivers/scsi/osd/osd_uld.c +++ b/trunk/drivers/scsi/osd/osd_uld.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/osst.c b/trunk/drivers/scsi/osst.c index b219118f8bd6..acb835837eec 100644 --- a/trunk/drivers/scsi/osst.c +++ b/trunk/drivers/scsi/osst.c @@ -38,7 +38,6 @@ static const char * osst_version = "0.99.4"; #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/pm8001/pm8001_ctl.c b/trunk/drivers/scsi/pm8001/pm8001_ctl.c index 45bc197bc22f..14b13acae6dd 100644 --- a/trunk/drivers/scsi/pm8001/pm8001_ctl.c +++ b/trunk/drivers/scsi/pm8001/pm8001_ctl.c @@ -38,7 +38,6 @@ * */ #include -#include #include "pm8001_sas.h" #include "pm8001_ctl.h" diff --git a/trunk/drivers/scsi/pm8001/pm8001_hwi.c b/trunk/drivers/scsi/pm8001/pm8001_hwi.c index 909c00ec044f..7985ae45d688 100644 --- a/trunk/drivers/scsi/pm8001/pm8001_hwi.c +++ b/trunk/drivers/scsi/pm8001/pm8001_hwi.c @@ -37,7 +37,6 @@ * POSSIBILITY OF SUCH DAMAGES. * */ - #include #include "pm8001_sas.h" #include "pm8001_hwi.h" #include "pm8001_chips.h" diff --git a/trunk/drivers/scsi/pm8001/pm8001_init.c b/trunk/drivers/scsi/pm8001/pm8001_init.c index f8c86b28f03f..f80c1da8f6ca 100644 --- a/trunk/drivers/scsi/pm8001/pm8001_init.c +++ b/trunk/drivers/scsi/pm8001/pm8001_init.c @@ -38,7 +38,6 @@ * */ -#include #include "pm8001_sas.h" #include "pm8001_chips.h" diff --git a/trunk/drivers/scsi/pm8001/pm8001_sas.c b/trunk/drivers/scsi/pm8001/pm8001_sas.c index bff4f5139b9c..3b2c98fba834 100644 --- a/trunk/drivers/scsi/pm8001/pm8001_sas.c +++ b/trunk/drivers/scsi/pm8001/pm8001_sas.c @@ -38,7 +38,6 @@ * */ -#include #include "pm8001_sas.h" /** diff --git a/trunk/drivers/scsi/pmcraid.c b/trunk/drivers/scsi/pmcraid.c index 53aefffbaead..9b1c1433c26b 100644 --- a/trunk/drivers/scsi/pmcraid.c +++ b/trunk/drivers/scsi/pmcraid.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ppa.c b/trunk/drivers/scsi/ppa.c index 7bc2d796e403..8aa0bd987e29 100644 --- a/trunk/drivers/scsi/ppa.c +++ b/trunk/drivers/scsi/ppa.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/ps3rom.c b/trunk/drivers/scsi/ps3rom.c index 92ffbb510498..db90caf43f42 100644 --- a/trunk/drivers/scsi/ps3rom.c +++ b/trunk/drivers/scsi/ps3rom.c @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/scsi/qla1280.c b/trunk/drivers/scsi/qla1280.c index b8166ecfd0e3..49ac4148493b 100644 --- a/trunk/drivers/scsi/qla1280.c +++ b/trunk/drivers/scsi/qla1280.c @@ -17,11 +17,9 @@ * General Public License for more details. * ******************************************************************************/ -#define QLA1280_VERSION "3.27.1" +#define QLA1280_VERSION "3.27" /***************************************************************************** Revision History: - Rev 3.27.1, February 8, 2010, Michael Reed - - Retain firmware image for error recovery. Rev 3.27, February 10, 2009, Michael Reed - General code cleanup. - Improve error recovery. @@ -348,6 +346,7 @@ #include #include #include +#include #include #include #include @@ -539,9 +538,9 @@ __setup("qla1280=", qla1280_setup); /*****************************************/ struct qla_boards { - char *name; /* Board ID String */ + unsigned char name[9]; /* Board ID String */ int numPorts; /* Number of SCSI ports */ - int fw_index; /* index into qla1280_fw_tbl for firmware */ + char *fwname; /* firmware name */ }; /* NOTE: the last argument in each entry is used to index ql1280_board_tbl */ @@ -562,30 +561,15 @@ static struct pci_device_id qla1280_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl); -DEFINE_MUTEX(qla1280_firmware_mutex); - -struct qla_fw { - char *fwname; - const struct firmware *fw; -}; - -#define QL_NUM_FW_IMAGES 3 - -struct qla_fw qla1280_fw_tbl[QL_NUM_FW_IMAGES] = { - {"qlogic/1040.bin", NULL}, /* image 0 */ - {"qlogic/1280.bin", NULL}, /* image 1 */ - {"qlogic/12160.bin", NULL}, /* image 2 */ -}; - -/* NOTE: Order of boards in this table must match order in qla1280_pci_tbl */ static struct qla_boards ql1280_board_tbl[] = { - {.name = "QLA12160", .numPorts = 2, .fw_index = 2}, - {.name = "QLA1040" , .numPorts = 1, .fw_index = 0}, - {.name = "QLA1080" , .numPorts = 1, .fw_index = 1}, - {.name = "QLA1240" , .numPorts = 2, .fw_index = 1}, - {.name = "QLA1280" , .numPorts = 2, .fw_index = 1}, - {.name = "QLA10160", .numPorts = 1, .fw_index = 2}, - {.name = " ", .numPorts = 0, .fw_index = -1}, + /* Name , Number of ports, FW details */ + {"QLA12160", 2, "qlogic/12160.bin"}, + {"QLA1040", 1, "qlogic/1040.bin"}, + {"QLA1080", 1, "qlogic/1280.bin"}, + {"QLA1240", 2, "qlogic/1280.bin"}, + {"QLA1280", 2, "qlogic/1280.bin"}, + {"QLA10160", 1, "qlogic/12160.bin"}, + {" ", 0, " "}, }; static int qla1280_verbose = 1; @@ -1527,63 +1511,6 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha) return status; } -/* - * qla1280_request_firmware - * Acquire firmware for chip. Retain in memory - * for error recovery. - * - * Input: - * ha = adapter block pointer. - * - * Returns: - * Pointer to firmware image or an error code - * cast to pointer via ERR_PTR(). - */ -static const struct firmware * -qla1280_request_firmware(struct scsi_qla_host *ha) -{ - const struct firmware *fw; - int err; - int index; - char *fwname; - - spin_unlock_irq(ha->host->host_lock); - mutex_lock(&qla1280_firmware_mutex); - - index = ql1280_board_tbl[ha->devnum].fw_index; - fw = qla1280_fw_tbl[index].fw; - if (fw) - goto out; - - fwname = qla1280_fw_tbl[index].fwname; - err = request_firmware(&fw, fwname, &ha->pdev->dev); - - if (err) { - printk(KERN_ERR "Failed to load image \"%s\" err %d\n", - fwname, err); - fw = ERR_PTR(err); - goto unlock; - } - if ((fw->size % 2) || (fw->size < 6)) { - printk(KERN_ERR "Invalid firmware length %zu in image \"%s\"\n", - fw->size, fwname); - release_firmware(fw); - fw = ERR_PTR(-EINVAL); - goto unlock; - } - - qla1280_fw_tbl[index].fw = fw; - - out: - ha->fwver1 = fw->data[0]; - ha->fwver2 = fw->data[1]; - ha->fwver3 = fw->data[2]; - unlock: - mutex_unlock(&qla1280_firmware_mutex); - spin_lock_irq(ha->host->host_lock); - return fw; -} - /* * Chip diagnostics * Test chip for proper operation. @@ -1707,18 +1634,30 @@ qla1280_chip_diag(struct scsi_qla_host *ha) static int qla1280_load_firmware_pio(struct scsi_qla_host *ha) { - /* enter with host_lock acquired */ - const struct firmware *fw; const __le16 *fw_data; uint16_t risc_address, risc_code_size; uint16_t mb[MAILBOX_REGISTER_COUNT], i; - int err = 0; - - fw = qla1280_request_firmware(ha); - if (IS_ERR(fw)) - return PTR_ERR(fw); + int err; + spin_unlock_irq(ha->host->host_lock); + err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, + &ha->pdev->dev); + spin_lock_irq(ha->host->host_lock); + if (err) { + printk(KERN_ERR "Failed to load image \"%s\" err %d\n", + ql1280_board_tbl[ha->devnum].fwname, err); + return err; + } + if ((fw->size % 2) || (fw->size < 6)) { + printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", + fw->size, ql1280_board_tbl[ha->devnum].fwname); + err = -EINVAL; + goto out; + } + ha->fwver1 = fw->data[0]; + ha->fwver2 = fw->data[1]; + ha->fwver3 = fw->data[2]; fw_data = (const __le16 *)&fw->data[0]; ha->fwstart = __le16_to_cpu(fw_data[2]); @@ -1736,10 +1675,11 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha) if (err) { printk(KERN_ERR "scsi(%li): Failed to load firmware\n", ha->host_no); - break; + goto out; } } - +out: + release_firmware(fw); return err; } @@ -1747,7 +1687,6 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha) static int qla1280_load_firmware_dma(struct scsi_qla_host *ha) { - /* enter with host_lock acquired */ const struct firmware *fw; const __le16 *fw_data; uint16_t risc_address, risc_code_size; @@ -1762,10 +1701,24 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) return -ENOMEM; #endif - fw = qla1280_request_firmware(ha); - if (IS_ERR(fw)) - return PTR_ERR(fw); - + spin_unlock_irq(ha->host->host_lock); + err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, + &ha->pdev->dev); + spin_lock_irq(ha->host->host_lock); + if (err) { + printk(KERN_ERR "Failed to load image \"%s\" err %d\n", + ql1280_board_tbl[ha->devnum].fwname, err); + return err; + } + if ((fw->size % 2) || (fw->size < 6)) { + printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", + fw->size, ql1280_board_tbl[ha->devnum].fwname); + err = -EINVAL; + goto out; + } + ha->fwver1 = fw->data[0]; + ha->fwver2 = fw->data[1]; + ha->fwver3 = fw->data[2]; fw_data = (const __le16 *)&fw->data[0]; ha->fwstart = __le16_to_cpu(fw_data[2]); @@ -1850,6 +1803,7 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) #if DUMP_IT_BACK pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf); #endif + release_firmware(fw); return err; } @@ -1888,7 +1842,6 @@ qla1280_start_firmware(struct scsi_qla_host *ha) static int qla1280_load_firmware(struct scsi_qla_host *ha) { - /* enter with host_lock taken */ int err; err = qla1280_chip_diag(ha); @@ -4467,16 +4420,7 @@ qla1280_init(void) static void __exit qla1280_exit(void) { - int i; - pci_unregister_driver(&qla1280_pci_driver); - /* release any allocated firmware images */ - for (i = 0; i < QL_NUM_FW_IMAGES; i++) { - if (qla1280_fw_tbl[i].fw) { - release_firmware(qla1280_fw_tbl[i].fw); - qla1280_fw_tbl[i].fw = NULL; - } - } } module_init(qla1280_init); diff --git a/trunk/drivers/scsi/qla2xxx/qla_attr.c b/trunk/drivers/scsi/qla2xxx/qla_attr.c index 359e9a71a021..90d1e062ec4f 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_attr.c +++ b/trunk/drivers/scsi/qla2xxx/qla_attr.c @@ -8,7 +8,6 @@ #include #include -#include #include static int qla24xx_vport_disable(struct fc_vport *, bool); @@ -1275,11 +1274,7 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr, int rval = QLA_FUNCTION_FAILED; uint16_t state[5]; - if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || - test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) - DEBUG2_3_11(printk("%s(%ld): isp reset in progress.\n", - __func__, vha->host_no)); - else if (!vha->hw->flags.eeh_busy) + if (!vha->hw->flags.eeh_busy) rval = qla2x00_get_firmware_state(vha, state); if (rval != QLA_SUCCESS) memset(state, -1, sizeof(state)); diff --git a/trunk/drivers/scsi/qla2xxx/qla_fw.h b/trunk/drivers/scsi/qla2xxx/qla_fw.h index 42c5587cc50c..cebf4f1bb7d9 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_fw.h +++ b/trunk/drivers/scsi/qla2xxx/qla_fw.h @@ -1592,22 +1592,10 @@ struct nvram_81xx { /* Offset 384. */ uint8_t reserved_21[16]; - uint16_t reserved_22[3]; - - /* - * BIT 0 = Extended BB credits for LR - * BIT 1 = Virtual Fabric Enable - * BIT 2 = Enhanced Features Unused - * BIT 3-7 = Enhanced Features Reserved - */ - /* Enhanced Features */ - uint8_t enhanced_features; - - uint8_t reserved_23; - uint16_t reserved_24[4]; + uint16_t reserved_22[8]; /* Offset 416. */ - uint16_t reserved_25[32]; + uint16_t reserved_23[32]; /* Offset 480. */ uint8_t model_name[16]; @@ -1615,7 +1603,7 @@ struct nvram_81xx { /* Offset 496. */ uint16_t feature_mask_l; uint16_t feature_mask_h; - uint16_t reserved_26[2]; + uint16_t reserved_24[2]; uint16_t subsystem_vendor_id; uint16_t subsystem_device_id; diff --git a/trunk/drivers/scsi/qla2xxx/qla_init.c b/trunk/drivers/scsi/qla2xxx/qla_init.c index 4229bb483c5e..a67b2bafb882 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_init.c +++ b/trunk/drivers/scsi/qla2xxx/qla_init.c @@ -8,7 +8,6 @@ #include "qla_gbl.h" #include -#include #include #include "qla_devtbl.h" diff --git a/trunk/drivers/scsi/qla2xxx/qla_isr.c b/trunk/drivers/scsi/qla2xxx/qla_isr.c index db539b0c3dae..ab90329ff2e4 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_isr.c +++ b/trunk/drivers/scsi/qla2xxx/qla_isr.c @@ -7,7 +7,6 @@ #include "qla_def.h" #include -#include #include #include @@ -621,10 +620,11 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) * vp_idx does not match * Event is not global, vp_idx does not match */ - if (IS_QLA2XXX_MIDTYPE(ha) && - ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) || - (mb[1] != 0xffff)) && vha->vp_idx != (mb[3] & 0xff)) - break; + if ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) + || (mb[1] != 0xffff)) { + if (vha->vp_idx != (mb[3] & 0xff)) + break; + } /* Global event -- port logout or port unavailable. */ if (mb[1] == 0xffff && mb[2] == 0x7) { @@ -2272,28 +2272,30 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) /* If possible, enable MSI-X. */ if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && - !IS_QLA8432(ha) && !IS_QLA8001(ha)) - goto skip_msi; - - if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && - (ha->pdev->subsystem_device == 0x7040 || - ha->pdev->subsystem_device == 0x7041 || - ha->pdev->subsystem_device == 0x1705)) { - DEBUG2(qla_printk(KERN_WARNING, ha, - "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X,0x%X).\n", - ha->pdev->subsystem_vendor, - ha->pdev->subsystem_device)); - goto skip_msi; - } + !IS_QLA8432(ha) && !IS_QLA8001(ha)) + goto skip_msix; if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) { DEBUG2(qla_printk(KERN_WARNING, ha, "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n", ha->pdev->revision, ha->fw_attributes)); + goto skip_msix; } + if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && + (ha->pdev->subsystem_device == 0x7040 || + ha->pdev->subsystem_device == 0x7041 || + ha->pdev->subsystem_device == 0x1705)) { + DEBUG2(qla_printk(KERN_WARNING, ha, + "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X, 0x%X).\n", + ha->pdev->subsystem_vendor, + ha->pdev->subsystem_device)); + + goto skip_msi; + } + ret = qla24xx_enable_msix(ha, rsp); if (!ret) { DEBUG2(qla_printk(KERN_INFO, ha, diff --git a/trunk/drivers/scsi/qla2xxx/qla_mbx.c b/trunk/drivers/scsi/qla2xxx/qla_mbx.c index 42eb7ffd5942..6e53bdbb1da8 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_mbx.c +++ b/trunk/drivers/scsi/qla2xxx/qla_mbx.c @@ -7,7 +7,6 @@ #include "qla_def.h" #include -#include /* @@ -340,7 +339,6 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, return rval; } -#define EXTENDED_BB_CREDITS BIT_0 /* * qla2x00_execute_fw * Start adapter firmware. @@ -373,12 +371,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) mcp->mb[1] = MSW(risc_addr); mcp->mb[2] = LSW(risc_addr); mcp->mb[3] = 0; - if (IS_QLA81XX(ha)) { - struct nvram_81xx *nv = ha->nvram; - mcp->mb[4] = (nv->enhanced_features & - EXTENDED_BB_CREDITS); - } else - mcp->mb[4] = 0; + mcp->mb[4] = 0; mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; mcp->in_mb |= MBX_1; } else { diff --git a/trunk/drivers/scsi/qla2xxx/qla_mid.c b/trunk/drivers/scsi/qla2xxx/qla_mid.c index 8220e7b9799b..ff17dee28613 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_mid.c +++ b/trunk/drivers/scsi/qla2xxx/qla_mid.c @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/scsi/qla2xxx/qla_os.c b/trunk/drivers/scsi/qla2xxx/qla_os.c index 48c37e38ed01..46720b23028f 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_os.c +++ b/trunk/drivers/scsi/qla2xxx/qla_os.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -1677,11 +1676,9 @@ qla2x00_iospace_config(struct qla_hw_data *ha) /* Determine queue resources */ ha->max_req_queues = ha->max_rsp_queues = 1; - if ((ql2xmaxqueues <= 1 && !ql2xmultique_tag) || - (ql2xmaxqueues > 1 && ql2xmultique_tag) || + if ((ql2xmaxqueues <= 1 || ql2xmultique_tag < 1) && (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) goto mqiobase_exit; - ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3), pci_resource_len(ha->pdev, 3)); if (ha->mqiobase) { diff --git a/trunk/drivers/scsi/qla2xxx/qla_sup.c b/trunk/drivers/scsi/qla2xxx/qla_sup.c index 8b3de4e54c28..371dc895972a 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_sup.c +++ b/trunk/drivers/scsi/qla2xxx/qla_sup.c @@ -7,7 +7,6 @@ #include "qla_def.h" #include -#include #include #include diff --git a/trunk/drivers/scsi/qla2xxx/qla_version.h b/trunk/drivers/scsi/qla2xxx/qla_version.h index 109068df933f..8d2fc2fa7a6b 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_version.h +++ b/trunk/drivers/scsi/qla2xxx/qla_version.h @@ -7,9 +7,9 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.03.02-k2" +#define QLA2XXX_VERSION "8.03.02-k1" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 3 #define QLA_DRIVER_PATCH_VER 2 -#define QLA_DRIVER_BETA_VER 2 +#define QLA_DRIVER_BETA_VER 1 diff --git a/trunk/drivers/scsi/qla4xxx/ql4_os.c b/trunk/drivers/scsi/qla4xxx/ql4_os.c index 2ccad36bee9f..83c8b5e4fc8b 100644 --- a/trunk/drivers/scsi/qla4xxx/ql4_os.c +++ b/trunk/drivers/scsi/qla4xxx/ql4_os.c @@ -5,7 +5,6 @@ * See LICENSE.qla4xxx for copyright and licensing details. */ #include -#include #include #include diff --git a/trunk/drivers/scsi/qlogicpti.c b/trunk/drivers/scsi/qlogicpti.c index aa406497eebc..1b8217076b0e 100644 --- a/trunk/drivers/scsi/qlogicpti.c +++ b/trunk/drivers/scsi/qlogicpti.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_debug.c b/trunk/drivers/scsi/scsi_debug.c index 3e10c306de94..0b575c871007 100644 --- a/trunk/drivers/scsi/scsi_debug.c +++ b/trunk/drivers/scsi/scsi_debug.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_devinfo.c b/trunk/drivers/scsi/scsi_devinfo.c index 43fad4c09beb..37af178b2d17 100644 --- a/trunk/drivers/scsi/scsi_devinfo.c +++ b/trunk/drivers/scsi/scsi_devinfo.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index d45c69ca5737..08ed506e6059 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/drivers/scsi/scsi_error.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_netlink.c b/trunk/drivers/scsi/scsi_netlink.c index d53e6503c6d5..0fd6ae6911ad 100644 --- a/trunk/drivers/scsi/scsi_netlink.c +++ b/trunk/drivers/scsi/scsi_netlink.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/scsi_proc.c b/trunk/drivers/scsi/scsi_proc.c index c99da926fdac..77fbddb507fd 100644 --- a/trunk/drivers/scsi/scsi_proc.c +++ b/trunk/drivers/scsi/scsi_proc.c @@ -20,12 +20,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/scsi_scan.c b/trunk/drivers/scsi/scsi_scan.c index 38518b088073..4bc8b77a2ef3 100644 --- a/trunk/drivers/scsi/scsi_scan.c +++ b/trunk/drivers/scsi/scsi_scan.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/scsi_sysfs.c b/trunk/drivers/scsi/scsi_sysfs.c index 429c9b73e3e4..19ec9e2d3f39 100644 --- a/trunk/drivers/scsi/scsi_sysfs.c +++ b/trunk/drivers/scsi/scsi_sysfs.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_tgt_if.c b/trunk/drivers/scsi/scsi_tgt_if.c index a87e21c35ef2..0e9533f7aabc 100644 --- a/trunk/drivers/scsi/scsi_tgt_if.c +++ b/trunk/drivers/scsi/scsi_tgt_if.c @@ -20,7 +20,6 @@ * 02110-1301 USA */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_tgt_lib.c b/trunk/drivers/scsi/scsi_tgt_lib.c index 66241dd525ae..10303272ba45 100644 --- a/trunk/drivers/scsi/scsi_tgt_lib.c +++ b/trunk/drivers/scsi/scsi_tgt_lib.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_transport_fc.c b/trunk/drivers/scsi/scsi_transport_fc.c index 6cfffc88022a..1d5b72173dd8 100644 --- a/trunk/drivers/scsi/scsi_transport_fc.c +++ b/trunk/drivers/scsi/scsi_transport_fc.c @@ -27,7 +27,6 @@ */ #include #include -#include #include #include #include @@ -3853,7 +3852,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { req->errors = -ENXIO; spin_unlock_irq(q->queue_lock); - blk_end_request_all(req, -ENXIO); + blk_end_request(req, -ENXIO, blk_rq_bytes(req)); spin_lock_irq(q->queue_lock); continue; } @@ -3863,7 +3862,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, ret = fc_req_to_bsgjob(shost, rport, req); if (ret) { req->errors = ret; - blk_end_request_all(req, ret); + blk_end_request(req, ret, blk_rq_bytes(req)); spin_lock_irq(q->queue_lock); continue; } diff --git a/trunk/drivers/scsi/scsi_transport_iscsi.c b/trunk/drivers/scsi/scsi_transport_iscsi.c index 1e6d4793542c..ea3892e7e0f7 100644 --- a/trunk/drivers/scsi/scsi_transport_iscsi.c +++ b/trunk/drivers/scsi/scsi_transport_iscsi.c @@ -22,7 +22,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/scsi_transport_spi.c b/trunk/drivers/scsi/scsi_transport_spi.c index 8a172d4f4564..c25bd9a34e02 100644 --- a/trunk/drivers/scsi/scsi_transport_spi.c +++ b/trunk/drivers/scsi/scsi_transport_spi.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include "scsi_priv.h" #include diff --git a/trunk/drivers/scsi/scsicam.c b/trunk/drivers/scsi/scsicam.c index 6803b1e26ecc..3f21bc65e8c6 100644 --- a/trunk/drivers/scsi/scsicam.c +++ b/trunk/drivers/scsi/scsicam.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/sd.c b/trunk/drivers/scsi/sd.c index 58c62ff42ab3..7b75c8a2a49d 100644 --- a/trunk/drivers/scsi/sd.c +++ b/trunk/drivers/scsi/sd.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/ses.c b/trunk/drivers/scsi/ses.c index 7f5a6a86f820..0d9d6f7567f5 100644 --- a/trunk/drivers/scsi/ses.c +++ b/trunk/drivers/scsi/ses.c @@ -21,7 +21,6 @@ **----------------------------------------------------------------------------- */ -#include #include #include #include diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index dee1c96288d4..c996d98636f3 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -38,7 +38,6 @@ static int sg_version_num = 30534; /* 2 digits for each component */ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/sim710.c b/trunk/drivers/scsi/sim710.c index 8ac6ce792b69..6dc8b846c112 100644 --- a/trunk/drivers/scsi/sim710.c +++ b/trunk/drivers/scsi/sim710.c @@ -27,7 +27,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/scsi/sni_53c710.c b/trunk/drivers/scsi/sni_53c710.c index 9acc2b2a3601..56cf0bb4ed1f 100644 --- a/trunk/drivers/scsi/sni_53c710.c +++ b/trunk/drivers/scsi/sni_53c710.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/sr.c b/trunk/drivers/scsi/sr.c index 0a90abc7f140..d6f340f48a3b 100644 --- a/trunk/drivers/scsi/sr.c +++ b/trunk/drivers/scsi/sr.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/sr_ioctl.c b/trunk/drivers/scsi/sr_ioctl.c index cbb38c5197fa..291236e6e435 100644 --- a/trunk/drivers/scsi/sr_ioctl.c +++ b/trunk/drivers/scsi/sr_ioctl.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/sr_vendor.c b/trunk/drivers/scsi/sr_vendor.c index 92cc2efb25d7..4ad3e017213f 100644 --- a/trunk/drivers/scsi/sr_vendor.c +++ b/trunk/drivers/scsi/sr_vendor.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/st.c b/trunk/drivers/scsi/st.c index 3ea1a713ef25..f67d1a159aad 100644 --- a/trunk/drivers/scsi/st.c +++ b/trunk/drivers/scsi/st.c @@ -27,7 +27,6 @@ static const char *verstr = "20081215"; #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/stex.c b/trunk/drivers/scsi/stex.c index 9c73dbda3bbb..fd7b15be7640 100644 --- a/trunk/drivers/scsi/stex.c +++ b/trunk/drivers/scsi/stex.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/scsi/sun3_NCR5380.c b/trunk/drivers/scsi/sun3_NCR5380.c index b5838d547c68..75da6e58ce55 100644 --- a/trunk/drivers/scsi/sun3_NCR5380.c +++ b/trunk/drivers/scsi/sun3_NCR5380.c @@ -645,7 +645,6 @@ __inline__ void NCR5380_print_phase(struct Scsi_Host *instance) { }; * interrupt or bottom half. */ -#include #include #include diff --git a/trunk/drivers/scsi/sun3x_esp.c b/trunk/drivers/scsi/sun3x_esp.c index 0621037f0271..34a99620e5bd 100644 --- a/trunk/drivers/scsi/sun3x_esp.c +++ b/trunk/drivers/scsi/sun3x_esp.c @@ -4,7 +4,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/scsi/sun_esp.c b/trunk/drivers/scsi/sun_esp.c index fc23d273fb1a..3d73aad4bc82 100644 --- a/trunk/drivers/scsi/sun_esp.c +++ b/trunk/drivers/scsi/sun_esp.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/tmscsim.c b/trunk/drivers/scsi/tmscsim.c index 27866b0adfeb..9a4273445c0d 100644 --- a/trunk/drivers/scsi/tmscsim.c +++ b/trunk/drivers/scsi/tmscsim.c @@ -233,7 +233,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/u14-34f.c b/trunk/drivers/scsi/u14-34f.c index 5d9fdeeb2315..26e8e0e6b8dd 100644 --- a/trunk/drivers/scsi/u14-34f.c +++ b/trunk/drivers/scsi/u14-34f.c @@ -420,7 +420,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/vmw_pvscsi.c b/trunk/drivers/scsi/vmw_pvscsi.c index 26894459c37f..e4ac5829b637 100644 --- a/trunk/drivers/scsi/vmw_pvscsi.c +++ b/trunk/drivers/scsi/vmw_pvscsi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/scsi/wd7000.c b/trunk/drivers/scsi/wd7000.c index d0b7d2ff9ac5..2f6e9d8eaf71 100644 --- a/trunk/drivers/scsi/wd7000.c +++ b/trunk/drivers/scsi/wd7000.c @@ -171,6 +171,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/scsi/zorro7xx.c b/trunk/drivers/scsi/zorro7xx.c index 105449c15fa9..64d40a2d4d4d 100644 --- a/trunk/drivers/scsi/zorro7xx.c +++ b/trunk/drivers/scsi/zorro7xx.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/68328serial.c b/trunk/drivers/serial/68328serial.c index 78ed24bb6a35..ae0251ef6f4e 100644 --- a/trunk/drivers/serial/68328serial.c +++ b/trunk/drivers/serial/68328serial.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/8250.c b/trunk/drivers/serial/8250.c index 2b1ea3d4c4f4..c3db16b7afa1 100644 --- a/trunk/drivers/serial/8250.c +++ b/trunk/drivers/serial/8250.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/8250_gsc.c b/trunk/drivers/serial/8250_gsc.c index d8c0ffbfa6e3..33149d982e82 100644 --- a/trunk/drivers/serial/8250_gsc.c +++ b/trunk/drivers/serial/8250_gsc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/serial/8250_hp300.c b/trunk/drivers/serial/8250_hp300.c index c13438c93012..0e1410f2c033 100644 --- a/trunk/drivers/serial/8250_hp300.c +++ b/trunk/drivers/serial/8250_hp300.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "8250.h" diff --git a/trunk/drivers/serial/amba-pl010.c b/trunk/drivers/serial/amba-pl010.c index b09a638d051f..e4b3c2c88bb6 100644 --- a/trunk/drivers/serial/amba-pl010.c +++ b/trunk/drivers/serial/amba-pl010.c @@ -47,7 +47,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/serial/amba-pl011.c b/trunk/drivers/serial/amba-pl011.c index 743ebf5f16da..ce6c35333ff7 100644 --- a/trunk/drivers/serial/amba-pl011.c +++ b/trunk/drivers/serial/amba-pl011.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/bfin_5xx.c b/trunk/drivers/serial/bfin_5xx.c index 96f7e7484fee..fcf273e3f48c 100644 --- a/trunk/drivers/serial/bfin_5xx.c +++ b/trunk/drivers/serial/bfin_5xx.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/serial/bfin_sport_uart.c b/trunk/drivers/serial/bfin_sport_uart.c index c88f8ad3ff82..7c72888fbf94 100644 --- a/trunk/drivers/serial/bfin_sport_uart.c +++ b/trunk/drivers/serial/bfin_sport_uart.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 3fc1d66e32c6..1b94c56ec239 100644 --- a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c index 814ac006393f..722eac18f382 100644 --- a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/serial/imx.c b/trunk/drivers/serial/imx.c index 4315b23590bd..e579d7a1807a 100644 --- a/trunk/drivers/serial/imx.c +++ b/trunk/drivers/serial/imx.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/ioc3_serial.c b/trunk/drivers/serial/ioc3_serial.c index f164ba4eba02..23ba6b40b3ac 100644 --- a/trunk/drivers/serial/ioc3_serial.c +++ b/trunk/drivers/serial/ioc3_serial.c @@ -20,7 +20,6 @@ #include #include #include -#include /* * Interesting things about the ioc3 diff --git a/trunk/drivers/serial/ioc4_serial.c b/trunk/drivers/serial/ioc4_serial.c index 8ad28fc64926..836d9ab4f729 100644 --- a/trunk/drivers/serial/ioc4_serial.c +++ b/trunk/drivers/serial/ioc4_serial.c @@ -22,7 +22,6 @@ #include #include #include -#include /* * interesting things about the ioc4 diff --git a/trunk/drivers/serial/jsm/jsm_driver.c b/trunk/drivers/serial/jsm/jsm_driver.c index eaf545014119..12cb5e446a4f 100644 --- a/trunk/drivers/serial/jsm/jsm_driver.c +++ b/trunk/drivers/serial/jsm/jsm_driver.c @@ -26,7 +26,6 @@ ***********************************************************************/ #include #include -#include #include "jsm.h" diff --git a/trunk/drivers/serial/jsm/jsm_tty.c b/trunk/drivers/serial/jsm/jsm_tty.c index 7a4a914ecff0..5673ca9dfdc8 100644 --- a/trunk/drivers/serial/jsm/jsm_tty.c +++ b/trunk/drivers/serial/jsm/jsm_tty.c @@ -30,7 +30,6 @@ #include #include /* For udelay */ #include -#include #include "jsm.h" diff --git a/trunk/drivers/serial/max3100.c b/trunk/drivers/serial/max3100.c index 3351c3bd59e4..3c30c56aa2e1 100644 --- a/trunk/drivers/serial/max3100.c +++ b/trunk/drivers/serial/max3100.c @@ -41,7 +41,6 @@ #define MAX_MAX3100 4 #include -#include #include #include #include diff --git a/trunk/drivers/serial/mpsc.c b/trunk/drivers/serial/mpsc.c index 55e113a0be03..b5496c28e60b 100644 --- a/trunk/drivers/serial/mpsc.c +++ b/trunk/drivers/serial/mpsc.c @@ -70,7 +70,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/serial/mux.c b/trunk/drivers/serial/mux.c index 9711e06a8374..7571aaa138b0 100644 --- a/trunk/drivers/serial/mux.c +++ b/trunk/drivers/serial/mux.c @@ -22,6 +22,7 @@ #include #include #include +#include #include /* for udelay */ #include #include diff --git a/trunk/drivers/serial/of_serial.c b/trunk/drivers/serial/of_serial.c index 4abfebdb0fcc..cdf172eda2e3 100644 --- a/trunk/drivers/serial/of_serial.c +++ b/trunk/drivers/serial/of_serial.c @@ -11,7 +11,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/serial/pmac_zilog.c b/trunk/drivers/serial/pmac_zilog.c index 4eaa043ca2a8..f020de1cdd50 100644 --- a/trunk/drivers/serial/pmac_zilog.c +++ b/trunk/drivers/serial/pmac_zilog.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/serial/pxa.c b/trunk/drivers/serial/pxa.c index 1102a39b44f5..56ee082157aa 100644 --- a/trunk/drivers/serial/pxa.c +++ b/trunk/drivers/serial/pxa.c @@ -44,7 +44,6 @@ #include #include #include -#include struct uart_pxa_port { struct uart_port port; diff --git a/trunk/drivers/serial/sh-sci.c b/trunk/drivers/serial/sh-sci.c index 8eb094c1f61b..309de6be8204 100644 --- a/trunk/drivers/serial/sh-sci.c +++ b/trunk/drivers/serial/sh-sci.c @@ -50,7 +50,6 @@ #include #include #include -#include #ifdef CONFIG_SUPERH #include diff --git a/trunk/drivers/serial/sunsu.c b/trunk/drivers/serial/sunsu.c index 01f7731e59b8..170d3d68c8f0 100644 --- a/trunk/drivers/serial/sunsu.c +++ b/trunk/drivers/serial/sunsu.c @@ -29,7 +29,6 @@ #include #include #include -#include #ifdef CONFIG_SERIO #include #endif @@ -1454,10 +1453,8 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { err = sunsu_kbd_ms_init(up); if (err) { - of_iounmap(&op->resource[0], - up->port.membase, up->reg_size); kfree(up); - return err; + goto out_unmap; } dev_set_drvdata(&op->dev, up); diff --git a/trunk/drivers/serial/timbuart.c b/trunk/drivers/serial/timbuart.c index 786ba85c170b..7bf10264a6ac 100644 --- a/trunk/drivers/serial/timbuart.c +++ b/trunk/drivers/serial/timbuart.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "timbuart.h" diff --git a/trunk/drivers/serial/ucc_uart.c b/trunk/drivers/serial/ucc_uart.c index 074904912f64..465f2fae1025 100644 --- a/trunk/drivers/serial/ucc_uart.c +++ b/trunk/drivers/serial/ucc_uart.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/sh/intc.c b/trunk/drivers/sh/intc.c index 94ad6bd86a00..a3d8677af6a5 100644 --- a/trunk/drivers/sh/intc.c +++ b/trunk/drivers/sh/intc.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/sn/ioc3.c b/trunk/drivers/sn/ioc3.c index b3b33fa26acd..66802a4390cc 100644 --- a/trunk/drivers/sn/ioc3.c +++ b/trunk/drivers/sn/ioc3.c @@ -16,7 +16,6 @@ #include #include #include -#include #define IOC3_PCI_SIZE 0x100000 diff --git a/trunk/drivers/spi/amba-pl022.c b/trunk/drivers/spi/amba-pl022.c index e9aeee16d922..9aeb68113100 100644 --- a/trunk/drivers/spi/amba-pl022.c +++ b/trunk/drivers/spi/amba-pl022.c @@ -44,7 +44,6 @@ #include #include #include -#include /* * This macro is used to define some register default values. diff --git a/trunk/drivers/spi/atmel_spi.c b/trunk/drivers/spi/atmel_spi.c index c4e04428992d..d21c24eaf0a9 100644 --- a/trunk/drivers/spi/atmel_spi.c +++ b/trunk/drivers/spi/atmel_spi.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/au1550_spi.c b/trunk/drivers/spi/au1550_spi.c index 3c9ade69643f..ba8ac4f599d3 100644 --- a/trunk/drivers/spi/au1550_spi.c +++ b/trunk/drivers/spi/au1550_spi.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/spi/davinci_spi.c b/trunk/drivers/spi/davinci_spi.c index 95afb6b77395..225ab60b02c4 100644 --- a/trunk/drivers/spi/davinci_spi.c +++ b/trunk/drivers/spi/davinci_spi.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/dw_spi.c b/trunk/drivers/spi/dw_spi.c index d256cb00604c..8ed38f1d6c18 100644 --- a/trunk/drivers/spi/dw_spi.c +++ b/trunk/drivers/spi/dw_spi.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/dw_spi_mmio.c b/trunk/drivers/spi/dw_spi_mmio.c index db35bd9c1b24..e35b45ac5174 100644 --- a/trunk/drivers/spi/dw_spi_mmio.c +++ b/trunk/drivers/spi/dw_spi_mmio.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/dw_spi_pci.c b/trunk/drivers/spi/dw_spi_pci.c index 1f52755dc878..1f0735f9cc76 100644 --- a/trunk/drivers/spi/dw_spi_pci.c +++ b/trunk/drivers/spi/dw_spi_pci.c @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/spi/mpc52xx_psc_spi.c b/trunk/drivers/spi/mpc52xx_psc_spi.c index 77d4cc88edea..04747868d6c4 100644 --- a/trunk/drivers/spi/mpc52xx_psc_spi.c +++ b/trunk/drivers/spi/mpc52xx_psc_spi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/mpc52xx_spi.c b/trunk/drivers/spi/mpc52xx_spi.c index cd68f1ce5cc3..6eab46537a0a 100644 --- a/trunk/drivers/spi/mpc52xx_spi.c +++ b/trunk/drivers/spi/mpc52xx_spi.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/omap2_mcspi.c b/trunk/drivers/spi/omap2_mcspi.c index d8356af118a8..4dd786b99b8b 100644 --- a/trunk/drivers/spi/omap2_mcspi.c +++ b/trunk/drivers/spi/omap2_mcspi.c @@ -32,7 +32,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/spi/omap_spi_100k.c b/trunk/drivers/spi/omap_spi_100k.c index 24668b30a52d..5355d90d1bee 100644 --- a/trunk/drivers/spi/omap_spi_100k.c +++ b/trunk/drivers/spi/omap_spi_100k.c @@ -33,7 +33,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/spi/omap_uwire.c b/trunk/drivers/spi/omap_uwire.c index 160d3266205f..6c3a8557db27 100644 --- a/trunk/drivers/spi/omap_uwire.c +++ b/trunk/drivers/spi/omap_uwire.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/pxa2xx_spi.c b/trunk/drivers/spi/pxa2xx_spi.c index 36828358a4d8..c2f707e5ce74 100644 --- a/trunk/drivers/spi/pxa2xx_spi.c +++ b/trunk/drivers/spi/pxa2xx_spi.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/spi.c b/trunk/drivers/spi/spi.c index 9ffb0fdbd6fe..b76f2468a84a 100644 --- a/trunk/drivers/spi/spi.c +++ b/trunk/drivers/spi/spi.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/spi_bfin5xx.c b/trunk/drivers/spi/spi_bfin5xx.c index 10a6dc3d37ac..1d41058bbab2 100644 --- a/trunk/drivers/spi/spi_bfin5xx.c +++ b/trunk/drivers/spi/spi_bfin5xx.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/spi/spi_bitbang.c b/trunk/drivers/spi/spi_bitbang.c index 5265330a528f..f1db395dd889 100644 --- a/trunk/drivers/spi/spi_bitbang.c +++ b/trunk/drivers/spi/spi_bitbang.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/spi_imx.c b/trunk/drivers/spi/spi_imx.c index 7972e9077473..0ddbbe45e834 100644 --- a/trunk/drivers/spi/spi_imx.c +++ b/trunk/drivers/spi/spi_imx.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/spi/spi_mpc8xxx.c b/trunk/drivers/spi/spi_mpc8xxx.c index 14d052316502..4f0cc9d457e0 100644 --- a/trunk/drivers/spi/spi_mpc8xxx.c +++ b/trunk/drivers/spi/spi_mpc8xxx.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/spi_nuc900.c b/trunk/drivers/spi/spi_nuc900.c index dff63be0d0a8..b319f9bf9b9b 100644 --- a/trunk/drivers/spi/spi_nuc900.c +++ b/trunk/drivers/spi/spi_nuc900.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/spi_ppc4xx.c b/trunk/drivers/spi/spi_ppc4xx.c index 7cb5ff37f6e2..6d8d4026a07a 100644 --- a/trunk/drivers/spi/spi_ppc4xx.c +++ b/trunk/drivers/spi/spi_ppc4xx.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/spi/spi_s3c24xx.c b/trunk/drivers/spi/spi_s3c24xx.c index 151a95e40653..1fabede9e061 100644 --- a/trunk/drivers/spi/spi_s3c24xx.c +++ b/trunk/drivers/spi/spi_s3c24xx.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/spi/tle62x0.c b/trunk/drivers/spi/tle62x0.c index a3938958147c..bf9540f5fb98 100644 --- a/trunk/drivers/spi/tle62x0.c +++ b/trunk/drivers/spi/tle62x0.c @@ -11,7 +11,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/spi/xilinx_spi_of.c b/trunk/drivers/spi/xilinx_spi_of.c index 748d33a76d29..ed34a8d419c7 100644 --- a/trunk/drivers/spi/xilinx_spi_of.c +++ b/trunk/drivers/spi/xilinx_spi_of.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ssb/driver_gige.c b/trunk/drivers/ssb/driver_gige.c index 5ba92a2719a4..172f90407b93 100644 --- a/trunk/drivers/ssb/driver_gige.c +++ b/trunk/drivers/ssb/driver_gige.c @@ -12,7 +12,6 @@ #include #include #include -#include /* diff --git a/trunk/drivers/ssb/main.c b/trunk/drivers/ssb/main.c index 80ff7d9e60de..03dfd27c4bfb 100644 --- a/trunk/drivers/ssb/main.c +++ b/trunk/drivers/ssb/main.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/ssb/pci.c b/trunk/drivers/ssb/pci.c index a8dbb06623c9..9e50896233aa 100644 --- a/trunk/drivers/ssb/pci.c +++ b/trunk/drivers/ssb/pci.c @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/ssb/pcihost_wrapper.c b/trunk/drivers/ssb/pcihost_wrapper.c index 6536a041d90d..26737a010c6d 100644 --- a/trunk/drivers/ssb/pcihost_wrapper.c +++ b/trunk/drivers/ssb/pcihost_wrapper.c @@ -12,7 +12,6 @@ */ #include -#include #include diff --git a/trunk/drivers/ssb/sprom.c b/trunk/drivers/ssb/sprom.c index f2f920fef10d..d0e6762fec50 100644 --- a/trunk/drivers/ssb/sprom.c +++ b/trunk/drivers/ssb/sprom.c @@ -14,7 +14,6 @@ #include "ssb_private.h" #include -#include static const struct ssb_sprom *fallback_sprom; diff --git a/trunk/drivers/staging/batman-adv/device.c b/trunk/drivers/staging/batman-adv/device.c index 2f61500186f2..e7f44215b5f3 100644 --- a/trunk/drivers/staging/batman-adv/device.c +++ b/trunk/drivers/staging/batman-adv/device.c @@ -20,7 +20,6 @@ */ #include -#include #include "main.h" #include "device.h" #include "send.h" diff --git a/trunk/drivers/staging/batman-adv/main.h b/trunk/drivers/staging/batman-adv/main.h index 2e9bb891a5de..deb41f5beda6 100644 --- a/trunk/drivers/staging/batman-adv/main.h +++ b/trunk/drivers/staging/batman-adv/main.h @@ -109,7 +109,6 @@ extern int bat_debug_type(int type); #include /* kernel threads */ #include /* schedule types */ #include /* workqueue */ -#include #include /* struct sock */ #include #include "types.h" diff --git a/trunk/drivers/staging/batman-adv/soft-interface.c b/trunk/drivers/staging/batman-adv/soft-interface.c index 0e2307f3cb96..c9b35d9f7991 100644 --- a/trunk/drivers/staging/batman-adv/soft-interface.c +++ b/trunk/drivers/staging/batman-adv/soft-interface.c @@ -26,7 +26,6 @@ #include "translation-table.h" #include "types.h" #include "hash.h" -#include #include #include diff --git a/trunk/drivers/staging/comedi/drivers/8255.c b/trunk/drivers/staging/comedi/drivers/8255.c index 2d54993ffb12..10f488f0e5ee 100644 --- a/trunk/drivers/staging/comedi/drivers/8255.c +++ b/trunk/drivers/staging/comedi/drivers/8255.c @@ -81,7 +81,6 @@ I/O port base address can be found in the output of 'lspci -v'. #include "../comedidev.h" #include -#include #define _8255_SIZE 4 diff --git a/trunk/drivers/staging/comedi/drivers/addi-data/addi_common.c b/trunk/drivers/staging/comedi/drivers/addi-data/addi_common.c index 6625fdc8e903..8db5ab63e363 100644 --- a/trunk/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/trunk/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -50,6 +50,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour #include #include #include +#include #include #include #include @@ -57,7 +58,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour #include #include #include -#include #include "../../comedidev.h" #include #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300) diff --git a/trunk/drivers/staging/comedi/drivers/adl_pci9118.c b/trunk/drivers/staging/comedi/drivers/adl_pci9118.c index 944f20ae5a6a..9934a3cf2548 100644 --- a/trunk/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/trunk/drivers/staging/comedi/drivers/adl_pci9118.c @@ -66,7 +66,6 @@ Configuration options: #include "../pci_ids.h" #include -#include #include #include "amcc_s5933.h" diff --git a/trunk/drivers/staging/comedi/drivers/amplc_dio200.c b/trunk/drivers/staging/comedi/drivers/amplc_dio200.c index 92bcc205dd4b..204f30ef6e96 100644 --- a/trunk/drivers/staging/comedi/drivers/amplc_dio200.c +++ b/trunk/drivers/staging/comedi/drivers/amplc_dio200.c @@ -206,7 +206,6 @@ order they appear in the channel list. */ #include -#include #include "../comedidev.h" diff --git a/trunk/drivers/staging/comedi/drivers/amplc_pci224.c b/trunk/drivers/staging/comedi/drivers/amplc_pci224.c index c54cca8b2565..b41e5e5963aa 100644 --- a/trunk/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/trunk/drivers/staging/comedi/drivers/amplc_pci224.c @@ -104,7 +104,6 @@ Passing a zero for an option is the same as leaving it unspecified. */ #include -#include #include "../comedidev.h" diff --git a/trunk/drivers/staging/comedi/drivers/cb_das16_cs.c b/trunk/drivers/staging/comedi/drivers/cb_das16_cs.c index 5632991760af..bc375e73abc1 100644 --- a/trunk/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/trunk/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -32,7 +32,6 @@ Status: experimental */ #include -#include #include "../comedidev.h" #include #include diff --git a/trunk/drivers/staging/comedi/drivers/comedi_bond.c b/trunk/drivers/staging/comedi/drivers/comedi_bond.c index 41311d99473b..d7260cc86985 100644 --- a/trunk/drivers/staging/comedi/drivers/comedi_bond.c +++ b/trunk/drivers/staging/comedi/drivers/comedi_bond.c @@ -90,7 +90,6 @@ Configuration Options: #include "../comedilib.h" #include "../comedidev.h" #include -#include /* The maxiumum number of channels per subdevice. */ #define MAX_CHANS 256 diff --git a/trunk/drivers/staging/comedi/drivers/das08_cs.c b/trunk/drivers/staging/comedi/drivers/das08_cs.c index 9164ce158dcd..f12ef1cd6f53 100644 --- a/trunk/drivers/staging/comedi/drivers/das08_cs.c +++ b/trunk/drivers/staging/comedi/drivers/das08_cs.c @@ -43,7 +43,6 @@ Command support does not exist, but could be added for this board. #include #include -#include #include "das08.h" diff --git a/trunk/drivers/staging/comedi/drivers/das16.c b/trunk/drivers/staging/comedi/drivers/das16.c index f2aadda9b241..10a87e6a8095 100644 --- a/trunk/drivers/staging/comedi/drivers/das16.c +++ b/trunk/drivers/staging/comedi/drivers/das16.c @@ -79,7 +79,6 @@ Computer boards manuals also available from their website www.measurementcomputi */ #include -#include #include #include #include "../comedidev.h" diff --git a/trunk/drivers/staging/comedi/drivers/das1800.c b/trunk/drivers/staging/comedi/drivers/das1800.c index 3c3e0455c7c4..6ea59cc6b2bb 100644 --- a/trunk/drivers/staging/comedi/drivers/das1800.c +++ b/trunk/drivers/staging/comedi/drivers/das1800.c @@ -101,7 +101,6 @@ Unipolar and bipolar ranges cannot be mixed in the channel/gain list. */ #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/dt282x.c b/trunk/drivers/staging/comedi/drivers/dt282x.c index e548763cf2f3..99ca294b1ec5 100644 --- a/trunk/drivers/staging/comedi/drivers/dt282x.c +++ b/trunk/drivers/staging/comedi/drivers/dt282x.c @@ -58,7 +58,6 @@ Configuration options: #include "../comedidev.h" -#include #include #include #include diff --git a/trunk/drivers/staging/comedi/drivers/jr3_pci.c b/trunk/drivers/staging/comedi/drivers/jr3_pci.c index d330b1886846..fe5b4953f7ec 100644 --- a/trunk/drivers/staging/comedi/drivers/jr3_pci.c +++ b/trunk/drivers/staging/comedi/drivers/jr3_pci.c @@ -46,7 +46,6 @@ Devices: [JR3] PCI force sensor board (jr3_pci) #include #include #include -#include #include #include "comedi_pci.h" #include "jr3_pci.h" diff --git a/trunk/drivers/staging/comedi/drivers/ni_65xx.c b/trunk/drivers/staging/comedi/drivers/ni_65xx.c index 9a4fffe5655f..c223f76031f6 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_65xx.c +++ b/trunk/drivers/staging/comedi/drivers/ni_65xx.c @@ -52,7 +52,6 @@ except maybe the 6514. #define DEBUG 1 #define DEBUG_FLAGS #include -#include #include "../comedidev.h" #include "mite.h" diff --git a/trunk/drivers/staging/comedi/drivers/ni_670x.c b/trunk/drivers/staging/comedi/drivers/ni_670x.c index 68221bfba5dd..1e792d592f73 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_670x.c +++ b/trunk/drivers/staging/comedi/drivers/ni_670x.c @@ -42,7 +42,6 @@ Commands are not supported. */ #include -#include #include "../comedidev.h" #include "mite.h" diff --git a/trunk/drivers/staging/comedi/drivers/ni_at_a2150.c b/trunk/drivers/staging/comedi/drivers/ni_at_a2150.c index 9bff34cf06d1..dd75dfb34309 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/trunk/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -65,7 +65,6 @@ TRIG_WAKE_EOS */ #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/ni_daq_700.c b/trunk/drivers/staging/comedi/drivers/ni_daq_700.c index 7ea64538e055..c9b0395a6103 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/trunk/drivers/staging/comedi/drivers/ni_daq_700.c @@ -42,7 +42,6 @@ IRQ is assigned but not used. */ #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/ni_daq_dio24.c b/trunk/drivers/staging/comedi/drivers/ni_daq_dio24.c index ddc312b5d20d..9017be3a92f1 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/trunk/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -41,7 +41,6 @@ the PCMCIA interface. #undef LABPC_DEBUG #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/ni_labpc.c b/trunk/drivers/staging/comedi/drivers/ni_labpc.c index 558e525fed37..3c88caaa9dab 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_labpc.c +++ b/trunk/drivers/staging/comedi/drivers/ni_labpc.c @@ -77,7 +77,6 @@ NI manuals: /* #define LABPC_DEBUG enable debugging messages */ #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/ni_labpc_cs.c b/trunk/drivers/staging/comedi/drivers/ni_labpc_cs.c index 8ad1055a5cc1..0b963bb3328b 100644 --- a/trunk/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/trunk/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -64,7 +64,6 @@ NI manuals: #include "../comedidev.h" #include -#include #include "8253.h" #include "8255.h" diff --git a/trunk/drivers/staging/comedi/drivers/pcl812.c b/trunk/drivers/staging/comedi/drivers/pcl812.c index 1ddc19c705a6..d4634c4f02dc 100644 --- a/trunk/drivers/staging/comedi/drivers/pcl812.c +++ b/trunk/drivers/staging/comedi/drivers/pcl812.c @@ -108,7 +108,6 @@ Options for ACL-8113, ISO-813: */ #include -#include #include "../comedidev.h" #include diff --git a/trunk/drivers/staging/comedi/drivers/pcl816.c b/trunk/drivers/staging/comedi/drivers/pcl816.c index 71c2a3aa379e..9820759ec54f 100644 --- a/trunk/drivers/staging/comedi/drivers/pcl816.c +++ b/trunk/drivers/staging/comedi/drivers/pcl816.c @@ -36,7 +36,6 @@ Configuration Options: #include #include -#include #include #include diff --git a/trunk/drivers/staging/comedi/drivers/pcl818.c b/trunk/drivers/staging/comedi/drivers/pcl818.c index 9d6aa393ef13..c9d75385755d 100644 --- a/trunk/drivers/staging/comedi/drivers/pcl818.c +++ b/trunk/drivers/staging/comedi/drivers/pcl818.c @@ -102,7 +102,6 @@ A word or two about DMA. Driver support DMA operations at two ways: #include #include -#include #include #include diff --git a/trunk/drivers/staging/comedi/drivers/pcmmio.c b/trunk/drivers/staging/comedi/drivers/pcmmio.c index 025a52e8981d..6ca4105610c1 100644 --- a/trunk/drivers/staging/comedi/drivers/pcmmio.c +++ b/trunk/drivers/staging/comedi/drivers/pcmmio.c @@ -77,7 +77,6 @@ Configuration Options: */ #include -#include #include "../comedidev.h" #include "pcm_common.h" #include /* for PCI devices */ diff --git a/trunk/drivers/staging/comedi/drivers/pcmuio.c b/trunk/drivers/staging/comedi/drivers/pcmuio.c index 5af4c8448a3a..c1ae20ffb379 100644 --- a/trunk/drivers/staging/comedi/drivers/pcmuio.c +++ b/trunk/drivers/staging/comedi/drivers/pcmuio.c @@ -76,7 +76,6 @@ Configuration Options: */ #include -#include #include "../comedidev.h" #include "pcm_common.h" diff --git a/trunk/drivers/staging/comedi/drivers/serial2002.c b/trunk/drivers/staging/comedi/drivers/serial2002.c index 0792617ebc35..dd2b90372794 100644 --- a/trunk/drivers/staging/comedi/drivers/serial2002.c +++ b/trunk/drivers/staging/comedi/drivers/serial2002.c @@ -36,7 +36,6 @@ Status: in development #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/comedi/drivers/unioxx5.c b/trunk/drivers/staging/comedi/drivers/unioxx5.c index be1d83df0de5..75a9a62e1a70 100644 --- a/trunk/drivers/staging/comedi/drivers/unioxx5.c +++ b/trunk/drivers/staging/comedi/drivers/unioxx5.c @@ -44,7 +44,6 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5), #include "../comedidev.h" #include -#include #define DRIVER_NAME "unioxx5" #define UNIOXX5_SIZE 0x10 diff --git a/trunk/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/trunk/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 288fef4fcbcc..6552ef6d8297 100644 --- a/trunk/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/trunk/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "../comedi.h" diff --git a/trunk/drivers/staging/comedi/kcomedilib/ksyms.c b/trunk/drivers/staging/comedi/kcomedilib/ksyms.c index 8bf4471ce6c1..19293d1f998d 100644 --- a/trunk/drivers/staging/comedi/kcomedilib/ksyms.c +++ b/trunk/drivers/staging/comedi/kcomedilib/ksyms.c @@ -34,6 +34,7 @@ #include #include #include +#include /* functions specific to kcomedilib */ diff --git a/trunk/drivers/staging/crystalhd/crystalhd_hw.c b/trunk/drivers/staging/crystalhd/crystalhd_hw.c index c438c489aa92..01819d34201a 100644 --- a/trunk/drivers/staging/crystalhd/crystalhd_hw.c +++ b/trunk/drivers/staging/crystalhd/crystalhd_hw.c @@ -23,7 +23,6 @@ **********************************************************************/ #include -#include #include #include "crystalhd_hw.h" diff --git a/trunk/drivers/staging/crystalhd/crystalhd_lnx.c b/trunk/drivers/staging/crystalhd/crystalhd_lnx.c index 54bad652c0c5..3eac70aa213c 100644 --- a/trunk/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/trunk/drivers/staging/crystalhd/crystalhd_lnx.c @@ -16,7 +16,6 @@ ***************************************************************************/ #include -#include #include "crystalhd_lnx.h" diff --git a/trunk/drivers/staging/crystalhd/crystalhd_misc.c b/trunk/drivers/staging/crystalhd/crystalhd_misc.c index 73593b078b33..587dcc477865 100644 --- a/trunk/drivers/staging/crystalhd/crystalhd_misc.c +++ b/trunk/drivers/staging/crystalhd/crystalhd_misc.c @@ -24,8 +24,6 @@ * along with this driver. If not, see . **********************************************************************/ -#include - #include "crystalhd_misc.h" #include "crystalhd_lnx.h" diff --git a/trunk/drivers/staging/cx25821/cx25821-alsa.c b/trunk/drivers/staging/cx25821/cx25821-alsa.c index 061add30ba8a..e0eef12759e4 100644 --- a/trunk/drivers/staging/cx25821/cx25821-alsa.c +++ b/trunk/drivers/staging/cx25821/cx25821-alsa.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/cx25821/cx25821-audio-upstream.c b/trunk/drivers/staging/cx25821/cx25821-audio-upstream.c index 11c56bdb0ceb..ddddf651266b 100644 --- a/trunk/drivers/staging/cx25821/cx25821-audio-upstream.c +++ b/trunk/drivers/staging/cx25821/cx25821-audio-upstream.c @@ -32,7 +32,6 @@ #include #include #include -#include #include MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); diff --git a/trunk/drivers/staging/cx25821/cx25821-audups11.c b/trunk/drivers/staging/cx25821/cx25821-audups11.c index e76451c309f1..46c7f78bb972 100644 --- a/trunk/drivers/staging/cx25821/cx25821-audups11.c +++ b/trunk/drivers/staging/cx25821/cx25821-audups11.c @@ -21,8 +21,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - #include "cx25821-video.h" static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) diff --git a/trunk/drivers/staging/cx25821/cx25821-core.c b/trunk/drivers/staging/cx25821/cx25821-core.c index 9e9b8c3c9311..67f689de4daa 100644 --- a/trunk/drivers/staging/cx25821/cx25821-core.c +++ b/trunk/drivers/staging/cx25821/cx25821-core.c @@ -22,7 +22,6 @@ */ #include -#include #include "cx25821.h" #include "cx25821-sram.h" #include "cx25821-video.h" diff --git a/trunk/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/trunk/drivers/staging/cx25821/cx25821-video-upstream-ch2.c index cc51618cffa9..c8905e0ac509 100644 --- a/trunk/drivers/staging/cx25821/cx25821-video-upstream-ch2.c +++ b/trunk/drivers/staging/cx25821/cx25821-video-upstream-ch2.c @@ -31,7 +31,6 @@ #include #include #include -#include #include MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); diff --git a/trunk/drivers/staging/cx25821/cx25821-video-upstream.c b/trunk/drivers/staging/cx25821/cx25821-video-upstream.c index 6d48a1e26d1b..3d7dd3f66541 100644 --- a/trunk/drivers/staging/cx25821/cx25821-video-upstream.c +++ b/trunk/drivers/staging/cx25821/cx25821-video-upstream.c @@ -31,7 +31,6 @@ #include #include #include -#include #include MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); diff --git a/trunk/drivers/staging/dream/camera/msm_camera.c b/trunk/drivers/staging/dream/camera/msm_camera.c index 81bd71fd816e..dc7c603625c7 100644 --- a/trunk/drivers/staging/dream/camera/msm_camera.c +++ b/trunk/drivers/staging/dream/camera/msm_camera.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/msm_v4l2.c b/trunk/drivers/staging/dream/camera/msm_v4l2.c index c276f2f7583a..6a7d46cf11eb 100644 --- a/trunk/drivers/staging/dream/camera/msm_v4l2.c +++ b/trunk/drivers/staging/dream/camera/msm_v4l2.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/msm_vfe7x.c b/trunk/drivers/staging/dream/camera/msm_vfe7x.c index 198656ac3de5..62fd24d632d5 100644 --- a/trunk/drivers/staging/dream/camera/msm_vfe7x.c +++ b/trunk/drivers/staging/dream/camera/msm_vfe7x.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/msm_vfe8x.c b/trunk/drivers/staging/dream/camera/msm_vfe8x.c index e61fdba62838..03de6ec2eb44 100644 --- a/trunk/drivers/staging/dream/camera/msm_vfe8x.c +++ b/trunk/drivers/staging/dream/camera/msm_vfe8x.c @@ -1,7 +1,6 @@ /* * Copyright (C) 2008-2009 QUALCOMM Incorporated. */ -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/mt9d112.c b/trunk/drivers/staging/dream/camera/mt9d112.c index e6f2d5124611..4f938f9dfc47 100644 --- a/trunk/drivers/staging/dream/camera/mt9d112.c +++ b/trunk/drivers/staging/dream/camera/mt9d112.c @@ -3,7 +3,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/mt9p012_fox.c b/trunk/drivers/staging/dream/camera/mt9p012_fox.c index 791bd6c40615..70119d5e0ab3 100644 --- a/trunk/drivers/staging/dream/camera/mt9p012_fox.c +++ b/trunk/drivers/staging/dream/camera/mt9p012_fox.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/mt9t013.c b/trunk/drivers/staging/dream/camera/mt9t013.c index 8fd7727ba234..88229f2663b5 100644 --- a/trunk/drivers/staging/dream/camera/mt9t013.c +++ b/trunk/drivers/staging/dream/camera/mt9t013.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/camera/s5k3e2fx.c b/trunk/drivers/staging/dream/camera/s5k3e2fx.c index 1459903a339d..841792e2624b 100644 --- a/trunk/drivers/staging/dream/camera/s5k3e2fx.c +++ b/trunk/drivers/staging/dream/camera/s5k3e2fx.c @@ -3,7 +3,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/gpio_axis.c b/trunk/drivers/staging/dream/gpio_axis.c index eb54724b1d3a..c801172aa9ee 100644 --- a/trunk/drivers/staging/dream/gpio_axis.c +++ b/trunk/drivers/staging/dream/gpio_axis.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/gpio_event.c b/trunk/drivers/staging/dream/gpio_event.c index 97a511d11f49..e60e2c0db9c0 100644 --- a/trunk/drivers/staging/dream/gpio_event.c +++ b/trunk/drivers/staging/dream/gpio_event.c @@ -14,7 +14,6 @@ */ -#include #include #include #include diff --git a/trunk/drivers/staging/dream/gpio_input.c b/trunk/drivers/staging/dream/gpio_input.c index ca29e5eb070a..0638ec43601a 100644 --- a/trunk/drivers/staging/dream/gpio_input.c +++ b/trunk/drivers/staging/dream/gpio_input.c @@ -19,7 +19,6 @@ #include #include #include -#include enum { DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */ diff --git a/trunk/drivers/staging/dream/gpio_matrix.c b/trunk/drivers/staging/dream/gpio_matrix.c index b377ee1f5a5f..796de4faf859 100644 --- a/trunk/drivers/staging/dream/gpio_matrix.c +++ b/trunk/drivers/staging/dream/gpio_matrix.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/pmem.c b/trunk/drivers/staging/dream/pmem.c index 6edfdd4ef804..503ba212dc96 100644 --- a/trunk/drivers/staging/dream/pmem.c +++ b/trunk/drivers/staging/dream/pmem.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/qdsp5/adsp.c b/trunk/drivers/staging/dream/qdsp5/adsp.c index f1e9d81674e8..9069535fcaf1 100644 --- a/trunk/drivers/staging/dream/qdsp5/adsp.c +++ b/trunk/drivers/staging/dream/qdsp5/adsp.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/qdsp5/adsp_driver.c b/trunk/drivers/staging/dream/qdsp5/adsp_driver.c index 8197765aae1e..e55a0db53a93 100644 --- a/trunk/drivers/staging/dream/qdsp5/adsp_driver.c +++ b/trunk/drivers/staging/dream/qdsp5/adsp_driver.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "adsp.h" diff --git a/trunk/drivers/staging/dream/qdsp5/audio_aac.c b/trunk/drivers/staging/dream/qdsp5/audio_aac.c index a373f3522384..ad2390f32a4f 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_aac.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_aac.c @@ -24,7 +24,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_amrnb.c b/trunk/drivers/staging/dream/qdsp5/audio_amrnb.c index 07b79d5836e5..cd818a526f83 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_amrnb.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_amrnb.c @@ -32,7 +32,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_evrc.c b/trunk/drivers/staging/dream/qdsp5/audio_evrc.c index ad989ee87690..4b43e183f9e8 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_evrc.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_evrc.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_in.c b/trunk/drivers/staging/dream/qdsp5/audio_in.c index 6ae48e72d145..3d950a245895 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_in.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_in.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_mp3.c b/trunk/drivers/staging/dream/qdsp5/audio_mp3.c index 530e1f35eed3..7ed6e261d6c9 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_mp3.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_mp3.c @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_out.c b/trunk/drivers/staging/dream/qdsp5/audio_out.c index fe7809dd4401..df87ca337b94 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_out.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_out.c @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audio_qcelp.c b/trunk/drivers/staging/dream/qdsp5/audio_qcelp.c index effa96f34fdc..f0f50e36805a 100644 --- a/trunk/drivers/staging/dream/qdsp5/audio_qcelp.c +++ b/trunk/drivers/staging/dream/qdsp5/audio_qcelp.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/qdsp5/audmgr.c b/trunk/drivers/staging/dream/qdsp5/audmgr.c index 427ae6c0bea8..1ad8b82c2570 100644 --- a/trunk/drivers/staging/dream/qdsp5/audmgr.c +++ b/trunk/drivers/staging/dream/qdsp5/audmgr.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/smd/smd_rpcrouter.c b/trunk/drivers/staging/dream/smd/smd_rpcrouter.c index 8744a6e499cb..69911a7bc87a 100644 --- a/trunk/drivers/staging/dream/smd/smd_rpcrouter.c +++ b/trunk/drivers/staging/dream/smd/smd_rpcrouter.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/dream/smd/smd_rpcrouter_device.c b/trunk/drivers/staging/dream/smd/smd_rpcrouter_device.c index e9c28eddce31..cd3910bcc4ed 100644 --- a/trunk/drivers/staging/dream/smd/smd_rpcrouter_device.c +++ b/trunk/drivers/staging/dream/smd/smd_rpcrouter_device.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/smd/smd_rpcrouter_servers.c b/trunk/drivers/staging/dream/smd/smd_rpcrouter_servers.c index 1b152abb2783..2597bbbc6f5e 100644 --- a/trunk/drivers/staging/dream/smd/smd_rpcrouter_servers.c +++ b/trunk/drivers/staging/dream/smd/smd_rpcrouter_servers.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/dream/synaptics_i2c_rmi.c b/trunk/drivers/staging/dream/synaptics_i2c_rmi.c index d2ca116a1c25..4de6bc917595 100644 --- a/trunk/drivers/staging/dream/synaptics_i2c_rmi.c +++ b/trunk/drivers/staging/dream/synaptics_i2c_rmi.c @@ -18,7 +18,6 @@ #include #include -#include #ifdef CONFIG_HAS_EARLYSUSPEND #include #endif diff --git a/trunk/drivers/staging/dt3155/allocator.c b/trunk/drivers/staging/dt3155/allocator.c index db382ef90217..c74234c66895 100644 --- a/trunk/drivers/staging/dt3155/allocator.c +++ b/trunk/drivers/staging/dt3155/allocator.c @@ -55,7 +55,6 @@ #include #include /* PAGE_ALIGN() */ #include -#include #include diff --git a/trunk/drivers/staging/dt3155/dt3155_isr.c b/trunk/drivers/staging/dt3155/dt3155_isr.c index 09d7d9b8272d..fd7f93d6c33d 100644 --- a/trunk/drivers/staging/dt3155/dt3155_isr.c +++ b/trunk/drivers/staging/dt3155/dt3155_isr.c @@ -45,7 +45,7 @@ Purpose: Buffer management routines, and other routines for the ISR */ #include -#include +#include #include #include diff --git a/trunk/drivers/staging/et131x/et1310_eeprom.c b/trunk/drivers/staging/et131x/et1310_eeprom.c index e4d095b0b52a..3ca253672ba1 100644 --- a/trunk/drivers/staging/et131x/et1310_eeprom.c +++ b/trunk/drivers/staging/et131x/et1310_eeprom.c @@ -66,6 +66,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et1310_mac.c b/trunk/drivers/staging/et131x/et1310_mac.c index 16fa13d4821f..737a9f5401d1 100644 --- a/trunk/drivers/staging/et131x/et1310_mac.c +++ b/trunk/drivers/staging/et131x/et1310_mac.c @@ -65,6 +65,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et1310_phy.c b/trunk/drivers/staging/et131x/et1310_phy.c index 34cd5d1b586a..4a55fbfbd59d 100644 --- a/trunk/drivers/staging/et131x/et1310_phy.c +++ b/trunk/drivers/staging/et131x/et1310_phy.c @@ -66,6 +66,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et1310_pm.c b/trunk/drivers/staging/et131x/et1310_pm.c index c64bb2c6d0d6..41019e390af5 100644 --- a/trunk/drivers/staging/et131x/et1310_pm.c +++ b/trunk/drivers/staging/et131x/et1310_pm.c @@ -65,6 +65,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et131x_initpci.c b/trunk/drivers/staging/et131x/et131x_initpci.c index 1dd5fa5b888b..5ad7e5a6f631 100644 --- a/trunk/drivers/staging/et131x/et131x_initpci.c +++ b/trunk/drivers/staging/et131x/et131x_initpci.c @@ -68,6 +68,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et131x_isr.c b/trunk/drivers/staging/et131x/et131x_isr.c index cb7f6775ce0a..8b6e0b7ec568 100644 --- a/trunk/drivers/staging/et131x/et131x_isr.c +++ b/trunk/drivers/staging/et131x/et131x_isr.c @@ -66,6 +66,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/et131x/et131x_netdev.c b/trunk/drivers/staging/et131x/et131x_netdev.c index ab047f2ff72c..40f8954dde47 100644 --- a/trunk/drivers/staging/et131x/et131x_netdev.c +++ b/trunk/drivers/staging/et131x/et131x_netdev.c @@ -65,6 +65,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/go7007/go7007-driver.c b/trunk/drivers/staging/go7007/go7007-driver.c index 372a7c6791ca..d42ba1696999 100644 --- a/trunk/drivers/staging/go7007/go7007-driver.c +++ b/trunk/drivers/staging/go7007/go7007-driver.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/go7007-fw.c b/trunk/drivers/staging/go7007/go7007-fw.c index ee622ff1707e..a8bb264e0074 100644 --- a/trunk/drivers/staging/go7007/go7007-fw.c +++ b/trunk/drivers/staging/go7007/go7007-fw.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "go7007-priv.h" diff --git a/trunk/drivers/staging/go7007/go7007-v4l2.c b/trunk/drivers/staging/go7007/go7007-v4l2.c index 723c1a64d87f..3af79242313e 100644 --- a/trunk/drivers/staging/go7007/go7007-v4l2.c +++ b/trunk/drivers/staging/go7007/go7007-v4l2.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/s2250-board.c b/trunk/drivers/staging/go7007/s2250-board.c index 93f26048e3b4..dc89502ea1b7 100644 --- a/trunk/drivers/staging/go7007/s2250-board.c +++ b/trunk/drivers/staging/go7007/s2250-board.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/s2250-loader.c b/trunk/drivers/staging/go7007/s2250-loader.c index 7547a8f77345..1de2dfb16d3f 100644 --- a/trunk/drivers/staging/go7007/s2250-loader.c +++ b/trunk/drivers/staging/go7007/s2250-loader.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/snd-go7007.c b/trunk/drivers/staging/go7007/snd-go7007.c index deac938d8505..03c4dfc138a1 100644 --- a/trunk/drivers/staging/go7007/snd-go7007.c +++ b/trunk/drivers/staging/go7007/snd-go7007.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/wis-saa7113.c b/trunk/drivers/staging/go7007/wis-saa7113.c index 5c12b4d38459..d196e16fe72b 100644 --- a/trunk/drivers/staging/go7007/wis-saa7113.c +++ b/trunk/drivers/staging/go7007/wis-saa7113.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "wis-i2c.h" diff --git a/trunk/drivers/staging/go7007/wis-saa7115.c b/trunk/drivers/staging/go7007/wis-saa7115.c index 73f2283a8803..0f2b4a0ceccf 100644 --- a/trunk/drivers/staging/go7007/wis-saa7115.c +++ b/trunk/drivers/staging/go7007/wis-saa7115.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "wis-i2c.h" diff --git a/trunk/drivers/staging/go7007/wis-sony-tuner.c b/trunk/drivers/staging/go7007/wis-sony-tuner.c index b1013291190f..c723e4aa7147 100644 --- a/trunk/drivers/staging/go7007/wis-sony-tuner.c +++ b/trunk/drivers/staging/go7007/wis-sony-tuner.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/go7007/wis-tw2804.c b/trunk/drivers/staging/go7007/wis-tw2804.c index 315268d130dd..1983839f554d 100644 --- a/trunk/drivers/staging/go7007/wis-tw2804.c +++ b/trunk/drivers/staging/go7007/wis-tw2804.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "wis-i2c.h" diff --git a/trunk/drivers/staging/go7007/wis-tw9903.c b/trunk/drivers/staging/go7007/wis-tw9903.c index 3ac6f785c4ad..f97e2be3c0b5 100644 --- a/trunk/drivers/staging/go7007/wis-tw9903.c +++ b/trunk/drivers/staging/go7007/wis-tw9903.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "wis-i2c.h" diff --git a/trunk/drivers/staging/hv/Channel.c b/trunk/drivers/staging/hv/Channel.c index e69e9ee704ac..d46eb145484f 100644 --- a/trunk/drivers/staging/hv/Channel.c +++ b/trunk/drivers/staging/hv/Channel.c @@ -20,7 +20,6 @@ */ #include #include -#include #include "osd.h" #include "logging.h" #include "VmbusPrivate.h" diff --git a/trunk/drivers/staging/hv/ChannelMgmt.c b/trunk/drivers/staging/hv/ChannelMgmt.c index 5f92c2102ab4..ef38467ed4e2 100644 --- a/trunk/drivers/staging/hv/ChannelMgmt.c +++ b/trunk/drivers/staging/hv/ChannelMgmt.c @@ -20,7 +20,6 @@ */ #include #include -#include #include #include "osd.h" #include "logging.h" diff --git a/trunk/drivers/staging/hv/Connection.c b/trunk/drivers/staging/hv/Connection.c index e0ea9cf90f03..43c2e6855015 100644 --- a/trunk/drivers/staging/hv/Connection.c +++ b/trunk/drivers/staging/hv/Connection.c @@ -22,7 +22,6 @@ */ #include #include -#include #include #include "osd.h" #include "logging.h" diff --git a/trunk/drivers/staging/hv/Hv.c b/trunk/drivers/staging/hv/Hv.c index 5d53889fb4a4..51149e69f3e8 100644 --- a/trunk/drivers/staging/hv/Hv.c +++ b/trunk/drivers/staging/hv/Hv.c @@ -21,7 +21,6 @@ */ #include #include -#include #include #include "osd.h" #include "logging.h" diff --git a/trunk/drivers/staging/hv/NetVsc.c b/trunk/drivers/staging/hv/NetVsc.c index e4bf82297504..1c717f9a554e 100644 --- a/trunk/drivers/staging/hv/NetVsc.c +++ b/trunk/drivers/staging/hv/NetVsc.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "osd.h" #include "logging.h" #include "NetVsc.h" diff --git a/trunk/drivers/staging/hv/RndisFilter.c b/trunk/drivers/staging/hv/RndisFilter.c index cd2930de2176..1ab7fa97d373 100644 --- a/trunk/drivers/staging/hv/RndisFilter.c +++ b/trunk/drivers/staging/hv/RndisFilter.c @@ -20,7 +20,6 @@ */ #include #include -#include #include #include "osd.h" #include "logging.h" diff --git a/trunk/drivers/staging/hv/StorVsc.c b/trunk/drivers/staging/hv/StorVsc.c index e426a23ca537..38ea1407f222 100644 --- a/trunk/drivers/staging/hv/StorVsc.c +++ b/trunk/drivers/staging/hv/StorVsc.c @@ -20,7 +20,6 @@ */ #include #include -#include #include #include #include "osd.h" diff --git a/trunk/drivers/staging/hv/Vmbus.c b/trunk/drivers/staging/hv/Vmbus.c index 2f84bf7c0a9f..3d0a240ed664 100644 --- a/trunk/drivers/staging/hv/Vmbus.c +++ b/trunk/drivers/staging/hv/Vmbus.c @@ -21,7 +21,6 @@ */ #include #include -#include #include "osd.h" #include "logging.h" #include "VersionInfo.h" diff --git a/trunk/drivers/staging/hv/blkvsc_drv.c b/trunk/drivers/staging/hv/blkvsc_drv.c index 8f1fda3256ad..abeac12c093d 100644 --- a/trunk/drivers/staging/hv/blkvsc_drv.c +++ b/trunk/drivers/staging/hv/blkvsc_drv.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/hv/netvsc_drv.c b/trunk/drivers/staging/hv/netvsc_drv.c index 2ccb6b93fe47..1af3dcbafd65 100644 --- a/trunk/drivers/staging/hv/netvsc_drv.c +++ b/trunk/drivers/staging/hv/netvsc_drv.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/hv/osd.c b/trunk/drivers/staging/hv/osd.c index 9aea31067295..3a4793a0fd05 100644 --- a/trunk/drivers/staging/hv/osd.c +++ b/trunk/drivers/staging/hv/osd.c @@ -40,7 +40,6 @@ #include #include #include -#include #include "osd.h" struct osd_callback_struct { diff --git a/trunk/drivers/staging/hv/storvsc_drv.c b/trunk/drivers/staging/hv/storvsc_drv.c index 8a58272b8039..3988f4bec1ce 100644 --- a/trunk/drivers/staging/hv/storvsc_drv.c +++ b/trunk/drivers/staging/hv/storvsc_drv.c @@ -19,7 +19,6 @@ * Hank Janssen */ #include -#include #include #include #include diff --git a/trunk/drivers/staging/hv/vmbus_drv.c b/trunk/drivers/staging/hv/vmbus_drv.c index 3397ef08e0aa..2c906195b9c8 100644 --- a/trunk/drivers/staging/hv/vmbus_drv.c +++ b/trunk/drivers/staging/hv/vmbus_drv.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "VersionInfo.h" #include "osd.h" #include "logging.h" diff --git a/trunk/drivers/staging/iio/accel/kxsd9.c b/trunk/drivers/staging/iio/accel/kxsd9.c index db2dd537ffb0..33d16b6f7b50 100644 --- a/trunk/drivers/staging/iio/accel/kxsd9.c +++ b/trunk/drivers/staging/iio/accel/kxsd9.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "../iio.h" #include "../sysfs.h" diff --git a/trunk/drivers/staging/iio/accel/lis3l02dq_core.c b/trunk/drivers/staging/iio/accel/lis3l02dq_core.c index ea76902797bb..f008837e5a14 100644 --- a/trunk/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/trunk/drivers/staging/iio/accel/lis3l02dq_core.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/iio/accel/lis3l02dq_ring.c b/trunk/drivers/staging/iio/accel/lis3l02dq_ring.c index 93712430e579..a6b7c72a86f4 100644 --- a/trunk/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/trunk/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -8,7 +8,6 @@ #include #include #include -#include #include "../iio.h" #include "../sysfs.h" diff --git a/trunk/drivers/staging/iio/accel/sca3000_core.c b/trunk/drivers/staging/iio/accel/sca3000_core.c index 1c229869a22d..cedcaa2b3d1f 100644 --- a/trunk/drivers/staging/iio/accel/sca3000_core.c +++ b/trunk/drivers/staging/iio/accel/sca3000_core.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/iio/accel/sca3000_ring.c b/trunk/drivers/staging/iio/accel/sca3000_ring.c index 40cbab2a6592..d5ea237793a6 100644 --- a/trunk/drivers/staging/iio/accel/sca3000_ring.c +++ b/trunk/drivers/staging/iio/accel/sca3000_ring.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/iio/adc/max1363_core.c b/trunk/drivers/staging/iio/adc/max1363_core.c index 790d1cc9cdc3..9703881cb3f8 100644 --- a/trunk/drivers/staging/iio/adc/max1363_core.c +++ b/trunk/drivers/staging/iio/adc/max1363_core.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "../iio.h" #include "../sysfs.h" diff --git a/trunk/drivers/staging/iio/adc/max1363_ring.c b/trunk/drivers/staging/iio/adc/max1363_ring.c index f94fe2d38a97..a953eac6fd62 100644 --- a/trunk/drivers/staging/iio/adc/max1363_ring.c +++ b/trunk/drivers/staging/iio/adc/max1363_ring.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/iio/industrialio-core.c b/trunk/drivers/staging/iio/industrialio-core.c index 37f58f66e491..b456dfc8fe27 100644 --- a/trunk/drivers/staging/iio/industrialio-core.c +++ b/trunk/drivers/staging/iio/industrialio-core.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "iio.h" #include "trigger_consumer.h" diff --git a/trunk/drivers/staging/iio/industrialio-ring.c b/trunk/drivers/staging/iio/industrialio-ring.c index e53e214bfeb0..ebe5cccb4034 100644 --- a/trunk/drivers/staging/iio/industrialio-ring.c +++ b/trunk/drivers/staging/iio/industrialio-ring.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "iio.h" #include "ring_generic.h" diff --git a/trunk/drivers/staging/iio/industrialio-trigger.c b/trunk/drivers/staging/iio/industrialio-trigger.c index 35ec80ba444f..693ebc48597c 100644 --- a/trunk/drivers/staging/iio/industrialio-trigger.c +++ b/trunk/drivers/staging/iio/industrialio-trigger.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "iio.h" #include "trigger.h" diff --git a/trunk/drivers/staging/iio/light/tsl2563.c b/trunk/drivers/staging/iio/light/tsl2563.c index 1ba4aa392f6e..78b9432c8105 100644 --- a/trunk/drivers/staging/iio/light/tsl2563.c +++ b/trunk/drivers/staging/iio/light/tsl2563.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "../iio.h" #include "tsl2563.h" diff --git a/trunk/drivers/staging/iio/ring_sw.c b/trunk/drivers/staging/iio/ring_sw.c index b104c3d9c35e..6f7f4d5a93f3 100644 --- a/trunk/drivers/staging/iio/ring_sw.c +++ b/trunk/drivers/staging/iio/ring_sw.c @@ -7,7 +7,6 @@ * the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/drivers/staging/iio/trigger/iio-trig-gpio.c b/trunk/drivers/staging/iio/trigger/iio-trig-gpio.c index 0c3bad3187f5..539e4169a02e 100644 --- a/trunk/drivers/staging/iio/trigger/iio-trig-gpio.c +++ b/trunk/drivers/staging/iio/trigger/iio-trig-gpio.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "../iio.h" #include "../trigger.h" diff --git a/trunk/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/trunk/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index 4295bbc7b50d..e310dc009855 100644 --- a/trunk/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/trunk/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "../iio.h" #include "../trigger.h" diff --git a/trunk/drivers/staging/line6/capture.c b/trunk/drivers/staging/line6/capture.c index ca092247f363..fd4890de8dbc 100644 --- a/trunk/drivers/staging/line6/capture.c +++ b/trunk/drivers/staging/line6/capture.c @@ -11,8 +11,6 @@ #include "driver.h" -#include - #include #include #include diff --git a/trunk/drivers/staging/line6/driver.c b/trunk/drivers/staging/line6/driver.c index 258555417bc7..0392a4bc8cc8 100644 --- a/trunk/drivers/staging/line6/driver.c +++ b/trunk/drivers/staging/line6/driver.c @@ -13,7 +13,6 @@ #include #include -#include #include #include "audio.h" diff --git a/trunk/drivers/staging/line6/dumprequest.c b/trunk/drivers/staging/line6/dumprequest.c index bb8c9da5803f..decbaa971b68 100644 --- a/trunk/drivers/staging/line6/dumprequest.c +++ b/trunk/drivers/staging/line6/dumprequest.c @@ -10,9 +10,6 @@ */ #include "driver.h" - -#include - #include "dumprequest.h" diff --git a/trunk/drivers/staging/line6/midi.c b/trunk/drivers/staging/line6/midi.c index 32b6ca75cadb..6ef4455d87d8 100644 --- a/trunk/drivers/staging/line6/midi.c +++ b/trunk/drivers/staging/line6/midi.c @@ -12,7 +12,6 @@ #include "driver.h" #include -#include #include #include diff --git a/trunk/drivers/staging/line6/pcm.c b/trunk/drivers/staging/line6/pcm.c index fbe4b083eac5..dd98121eb80b 100644 --- a/trunk/drivers/staging/line6/pcm.c +++ b/trunk/drivers/staging/line6/pcm.c @@ -11,8 +11,6 @@ #include "driver.h" -#include - #include #include #include diff --git a/trunk/drivers/staging/line6/playback.c b/trunk/drivers/staging/line6/playback.c index fbcd6e150aaf..3431f5cd2852 100644 --- a/trunk/drivers/staging/line6/playback.c +++ b/trunk/drivers/staging/line6/playback.c @@ -11,8 +11,6 @@ #include "driver.h" -#include - #include #include #include diff --git a/trunk/drivers/staging/line6/pod.c b/trunk/drivers/staging/line6/pod.c index 4983f2b51cf2..685c529950eb 100644 --- a/trunk/drivers/staging/line6/pod.c +++ b/trunk/drivers/staging/line6/pod.c @@ -11,8 +11,6 @@ #include "driver.h" -#include - #include "audio.h" #include "capture.h" #include "control.h" diff --git a/trunk/drivers/staging/line6/variax.c b/trunk/drivers/staging/line6/variax.c index 28eb89983f36..58fef82c247d 100644 --- a/trunk/drivers/staging/line6/variax.c +++ b/trunk/drivers/staging/line6/variax.c @@ -11,8 +11,6 @@ #include "driver.h" -#include - #include "audio.h" #include "control.h" #include "variax.h" diff --git a/trunk/drivers/staging/netwave/netwave_cs.c b/trunk/drivers/staging/netwave/netwave_cs.c index 3875a722d12b..e936717d1f4b 100644 --- a/trunk/drivers/staging/netwave/netwave_cs.c +++ b/trunk/drivers/staging/netwave/netwave_cs.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/octeon/ethernet-mem.c b/trunk/drivers/staging/octeon/ethernet-mem.c index 635bb86cdcff..00cc91df6b46 100644 --- a/trunk/drivers/staging/octeon/ethernet-mem.c +++ b/trunk/drivers/staging/octeon/ethernet-mem.c @@ -26,7 +26,6 @@ **********************************************************************/ #include #include -#include #include diff --git a/trunk/drivers/staging/octeon/ethernet.c b/trunk/drivers/staging/octeon/ethernet.c index e50a17d80707..4a2161f70c7f 100644 --- a/trunk/drivers/staging/octeon/ethernet.c +++ b/trunk/drivers/staging/octeon/ethernet.c @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/staging/otus/ioctl.c b/trunk/drivers/staging/otus/ioctl.c index 84be4b2cd692..8c47b1a68627 100644 --- a/trunk/drivers/staging/otus/ioctl.c +++ b/trunk/drivers/staging/otus/ioctl.c @@ -23,7 +23,6 @@ /* Platform dependent. */ /* */ /************************************************************************/ -#include #include #include #include diff --git a/trunk/drivers/staging/otus/usbdrv.c b/trunk/drivers/staging/otus/usbdrv.c index 0ce65b5b9456..5e6a12037b12 100644 --- a/trunk/drivers/staging/otus/usbdrv.c +++ b/trunk/drivers/staging/otus/usbdrv.c @@ -38,7 +38,6 @@ #include "linux/netlink.h" #include "linux/rtnetlink.h" -#include "linux/slab.h" #include diff --git a/trunk/drivers/staging/otus/usbdrv.h b/trunk/drivers/staging/otus/usbdrv.h index 7e66c2d72a69..330d1b95cb88 100644 --- a/trunk/drivers/staging/otus/usbdrv.h +++ b/trunk/drivers/staging/otus/usbdrv.h @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "zdcompat.h" diff --git a/trunk/drivers/staging/otus/wrap_mem.c b/trunk/drivers/staging/otus/wrap_mem.c index b0037568e870..47cbce1346a9 100644 --- a/trunk/drivers/staging/otus/wrap_mem.c +++ b/trunk/drivers/staging/otus/wrap_mem.c @@ -27,7 +27,6 @@ #include "usbdrv.h" #include -#include #include /* Memory management */ diff --git a/trunk/drivers/staging/otus/wrap_pkt.c b/trunk/drivers/staging/otus/wrap_pkt.c index 5ecf38e355a8..a2f5cb1f5298 100644 --- a/trunk/drivers/staging/otus/wrap_pkt.c +++ b/trunk/drivers/staging/otus/wrap_pkt.c @@ -28,7 +28,6 @@ #include "usbdrv.h" #include -#include #include diff --git a/trunk/drivers/staging/otus/wrap_usb.c b/trunk/drivers/staging/otus/wrap_usb.c index 93459cadc472..6b336ede8867 100644 --- a/trunk/drivers/staging/otus/wrap_usb.c +++ b/trunk/drivers/staging/otus/wrap_usb.c @@ -28,7 +28,6 @@ #include "usbdrv.h" #include -#include #include extern void zfLnxInitUsbTxQ(zdev_t *dev); diff --git a/trunk/drivers/staging/otus/wwrap.c b/trunk/drivers/staging/otus/wwrap.c index a74f7eea56e4..53d2a45d55f9 100644 --- a/trunk/drivers/staging/otus/wwrap.c +++ b/trunk/drivers/staging/otus/wwrap.c @@ -26,7 +26,6 @@ #include "usbdrv.h" #include -#include #include extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); diff --git a/trunk/drivers/staging/otus/zdusb.c b/trunk/drivers/staging/otus/zdusb.c index bb89d85a4c7c..4cd9b7f5a887 100644 --- a/trunk/drivers/staging/otus/zdusb.c +++ b/trunk/drivers/staging/otus/zdusb.c @@ -29,7 +29,6 @@ #endif #include -#include #include #include "usbdrv.h" diff --git a/trunk/drivers/staging/poch/poch.c b/trunk/drivers/staging/poch/poch.c index f940a34c1a0c..9095158fb1b3 100644 --- a/trunk/drivers/staging/poch/poch.c +++ b/trunk/drivers/staging/poch/poch.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "poch.h" diff --git a/trunk/drivers/staging/pohmelfs/config.c b/trunk/drivers/staging/pohmelfs/config.c index eed0e5545a55..5d04bf5b021a 100644 --- a/trunk/drivers/staging/pohmelfs/config.c +++ b/trunk/drivers/staging/pohmelfs/config.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "netfs.h" diff --git a/trunk/drivers/staging/pohmelfs/dir.c b/trunk/drivers/staging/pohmelfs/dir.c index 79819f07bfb9..aacd25bfb0cb 100644 --- a/trunk/drivers/staging/pohmelfs/dir.c +++ b/trunk/drivers/staging/pohmelfs/dir.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "netfs.h" diff --git a/trunk/drivers/staging/pohmelfs/lock.c b/trunk/drivers/staging/pohmelfs/lock.c index 6710114cd425..22fef18cae90 100644 --- a/trunk/drivers/staging/pohmelfs/lock.c +++ b/trunk/drivers/staging/pohmelfs/lock.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "netfs.h" diff --git a/trunk/drivers/staging/pohmelfs/net.c b/trunk/drivers/staging/pohmelfs/net.c index 4a86f0b1ea88..af7f262e68c2 100644 --- a/trunk/drivers/staging/pohmelfs/net.c +++ b/trunk/drivers/staging/pohmelfs/net.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/pohmelfs/path_entry.c b/trunk/drivers/staging/pohmelfs/path_entry.c index cdc4dd50d638..3bad888ced13 100644 --- a/trunk/drivers/staging/pohmelfs/path_entry.c +++ b/trunk/drivers/staging/pohmelfs/path_entry.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/trunk/drivers/staging/ramzswap/ramzswap_drv.c b/trunk/drivers/staging/ramzswap/ramzswap_drv.c index ee5eb12b9285..5e422e254ee8 100644 --- a/trunk/drivers/staging/ramzswap/ramzswap_drv.c +++ b/trunk/drivers/staging/ramzswap/ramzswap_drv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/rt2860/pci_main_dev.c b/trunk/drivers/staging/rt2860/pci_main_dev.c index e665d862281c..6af430419070 100644 --- a/trunk/drivers/staging/rt2860/pci_main_dev.c +++ b/trunk/drivers/staging/rt2860/pci_main_dev.c @@ -37,7 +37,6 @@ #include "rt_config.h" #include -#include /* Following information will be show when you run 'modinfo' */ /* *** If you have a solution for the bug in current version of driver, please mail to me. */ diff --git a/trunk/drivers/staging/rt2860/rt_linux.c b/trunk/drivers/staging/rt2860/rt_linux.c index fd9a2072139b..b5c78aecf5e3 100644 --- a/trunk/drivers/staging/rt2860/rt_linux.c +++ b/trunk/drivers/staging/rt2860/rt_linux.c @@ -27,7 +27,6 @@ #include #include -#include #include "rt_config.h" unsigned long RTDebugLevel = RT_DEBUG_ERROR; diff --git a/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index be2d17f60c35..c2f472ee6eb6 100644 --- a/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c index c5b80f9c32c0..bd5e77bf7162 100644 --- a/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c +++ b/trunk/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c @@ -31,7 +31,6 @@ ******************************************************************************/ #include #include -#include #include #include "ieee80211.h" diff --git a/trunk/drivers/staging/rtl8187se/r8180_core.c b/trunk/drivers/staging/rtl8187se/r8180_core.c index 55d12e3271de..b1757acabedc 100644 --- a/trunk/drivers/staging/rtl8187se/r8180_core.c +++ b/trunk/drivers/staging/rtl8187se/r8180_core.c @@ -30,7 +30,6 @@ #undef RX_DONT_PASS_UL #undef DUMMY_RX -#include #include #include diff --git a/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index d1d7b0866755..ea96c4956930 100644 --- a/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #ifdef ENABLE_DOT11D diff --git a/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c index de57967b9681..a3302d5e01ab 100644 --- a/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c +++ b/trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "ieee80211.h" diff --git a/trunk/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c b/trunk/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c index e8699616fad4..e2cbfd3aa00f 100644 --- a/trunk/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c +++ b/trunk/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c @@ -1,6 +1,5 @@ #include "ieee80211.h" #include -#include #include "rtl819x_TS.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) diff --git a/trunk/drivers/staging/rtl8192e/r8192E_core.c b/trunk/drivers/staging/rtl8192e/r8192E_core.c index bb7e1ef28d3b..886105db8b7c 100644 --- a/trunk/drivers/staging/rtl8192e/r8192E_core.c +++ b/trunk/drivers/staging/rtl8192e/r8192E_core.c @@ -47,7 +47,6 @@ //#define CONFIG_RTL8192_IO_MAP #include -#include #include #include "r8192E_hw.h" #include "r8192E.h" diff --git a/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c index 84a4e23b60b3..9d8cb0e575d3 100644 --- a/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c +++ b/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include "dot11d.h" diff --git a/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c index 727cc552c5ee..122f8004904b 100644 --- a/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +++ b/trunk/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c @@ -31,7 +31,6 @@ ******************************************************************************/ #include #include -#include #include #include "ieee80211.h" diff --git a/trunk/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c b/trunk/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c index 38468c539675..60cf1f8781ce 100644 --- a/trunk/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c +++ b/trunk/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c @@ -1,6 +1,5 @@ #include "ieee80211.h" #include -#include #include "rtl819x_TS.h" void TsSetupTimeOut(unsigned long data) diff --git a/trunk/drivers/staging/rtl8192su/r8192U_core.c b/trunk/drivers/staging/rtl8192su/r8192U_core.c index e16256fe595a..7d0305cc2106 100644 --- a/trunk/drivers/staging/rtl8192su/r8192U_core.c +++ b/trunk/drivers/staging/rtl8192su/r8192U_core.c @@ -25,7 +25,6 @@ */ #include -#include #undef LOOP_TEST #undef DUMP_RX diff --git a/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d54e3a77423f..27d925712cdd 100644 --- a/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #ifdef ENABLE_DOT11D diff --git a/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index 750e94e17114..c0b2c02b0ac4 100644 --- a/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/trunk/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "ieee80211.h" diff --git a/trunk/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/trunk/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index 451120ff2130..d1275e887f0c 100644 --- a/trunk/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/trunk/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -1,6 +1,5 @@ #include "ieee80211.h" #include -#include #include "rtl819x_TS.h" void TsSetupTimeOut(unsigned long data) diff --git a/trunk/drivers/staging/rtl8192u/r8192U_core.c b/trunk/drivers/staging/rtl8192u/r8192U_core.c index 68ebb0256771..f1e085ba1cf1 100644 --- a/trunk/drivers/staging/rtl8192u/r8192U_core.c +++ b/trunk/drivers/staging/rtl8192u/r8192U_core.c @@ -70,7 +70,6 @@ double __extendsfdf2(float a) {return a;} #include "r8192U_dm.h" //#include "r8192xU_phyreg.h" #include -#include // FIXME: check if 2.6.7 is ok #ifdef CONFIG_RTL8192_PM diff --git a/trunk/drivers/staging/sep/sep_driver.c b/trunk/drivers/staging/sep/sep_driver.c index 88880734921a..265de7949a78 100644 --- a/trunk/drivers/staging/sep/sep_driver.c +++ b/trunk/drivers/staging/sep/sep_driver.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/sm7xx/smtcfb.c b/trunk/drivers/staging/sm7xx/smtcfb.c index 8d7261c052eb..9c82a1a81ccc 100644 --- a/trunk/drivers/staging/sm7xx/smtcfb.c +++ b/trunk/drivers/staging/sm7xx/smtcfb.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/strip/strip.c b/trunk/drivers/staging/strip/strip.c index c976c6b4d28a..698aade79d40 100644 --- a/trunk/drivers/staging/strip/strip.c +++ b/trunk/drivers/staging/strip/strip.c @@ -107,7 +107,6 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE"; #include #include #include -#include #include #include diff --git a/trunk/drivers/staging/udlfb/udlfb.c b/trunk/drivers/staging/udlfb/udlfb.c index a78ade0dc687..8f6223c8303a 100644 --- a/trunk/drivers/staging/udlfb/udlfb.c +++ b/trunk/drivers/staging/udlfb/udlfb.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "udlfb.h" diff --git a/trunk/drivers/staging/usbip/stub_dev.c b/trunk/drivers/staging/usbip/stub_dev.c index 3f95605427a7..173b018c56d8 100644 --- a/trunk/drivers/staging/usbip/stub_dev.c +++ b/trunk/drivers/staging/usbip/stub_dev.c @@ -17,8 +17,6 @@ * USA. */ -#include - #include "usbip_common.h" #include "stub.h" diff --git a/trunk/drivers/staging/usbip/stub_main.c b/trunk/drivers/staging/usbip/stub_main.c index 6665cefe573b..ba1678fa6311 100644 --- a/trunk/drivers/staging/usbip/stub_main.c +++ b/trunk/drivers/staging/usbip/stub_main.c @@ -17,7 +17,6 @@ * USA. */ -#include #include "usbip_common.h" #include "stub.h" diff --git a/trunk/drivers/staging/usbip/stub_rx.c b/trunk/drivers/staging/usbip/stub_rx.c index bc2674086673..815fb7cc3b23 100644 --- a/trunk/drivers/staging/usbip/stub_rx.c +++ b/trunk/drivers/staging/usbip/stub_rx.c @@ -17,8 +17,6 @@ * USA. */ -#include - #include "usbip_common.h" #include "stub.h" #include "../../usb/core/hcd.h" diff --git a/trunk/drivers/staging/usbip/stub_tx.c b/trunk/drivers/staging/usbip/stub_tx.c index d7136e2c86fa..e2ab4f3fdac2 100644 --- a/trunk/drivers/staging/usbip/stub_tx.c +++ b/trunk/drivers/staging/usbip/stub_tx.c @@ -17,8 +17,6 @@ * USA. */ -#include - #include "usbip_common.h" #include "stub.h" diff --git a/trunk/drivers/staging/usbip/usbip_common.c b/trunk/drivers/staging/usbip/usbip_common.c index e3fa4216c1cd..7a45da8f9565 100644 --- a/trunk/drivers/staging/usbip/usbip_common.c +++ b/trunk/drivers/staging/usbip/usbip_common.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "usbip_common.h" /* version information */ diff --git a/trunk/drivers/staging/usbip/vhci_hcd.c b/trunk/drivers/staging/usbip/vhci_hcd.c index 0b1766122d38..ef4371358dbe 100644 --- a/trunk/drivers/staging/usbip/vhci_hcd.c +++ b/trunk/drivers/staging/usbip/vhci_hcd.c @@ -17,7 +17,6 @@ * USA. */ -#include #include "usbip_common.h" #include "vhci.h" diff --git a/trunk/drivers/staging/usbip/vhci_rx.c b/trunk/drivers/staging/usbip/vhci_rx.c index 8147d7202b2d..7636d86c2388 100644 --- a/trunk/drivers/staging/usbip/vhci_rx.c +++ b/trunk/drivers/staging/usbip/vhci_rx.c @@ -17,8 +17,6 @@ * USA. */ -#include - #include "usbip_common.h" #include "vhci.h" diff --git a/trunk/drivers/staging/usbip/vhci_tx.c b/trunk/drivers/staging/usbip/vhci_tx.c index b71b4c2fbd86..7a00eb44b795 100644 --- a/trunk/drivers/staging/usbip/vhci_tx.c +++ b/trunk/drivers/staging/usbip/vhci_tx.c @@ -17,8 +17,6 @@ * USA. */ -#include - #include "usbip_common.h" #include "vhci.h" diff --git a/trunk/drivers/staging/vme/bridges/vme_ca91cx42.c b/trunk/drivers/staging/vme/bridges/vme_ca91cx42.c index b159ea58adf7..2795ff2411e0 100644 --- a/trunk/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/trunk/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/vme/bridges/vme_tsi148.c b/trunk/drivers/staging/vme/bridges/vme_tsi148.c index 68f24425977f..faf652edb70f 100644 --- a/trunk/drivers/staging/vme/bridges/vme_tsi148.c +++ b/trunk/drivers/staging/vme/bridges/vme_tsi148.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/vme/devices/vme_user.c b/trunk/drivers/staging/vme/devices/vme_user.c index 1ab9a985dfb9..c60c80fb241d 100644 --- a/trunk/drivers/staging/vme/devices/vme_user.c +++ b/trunk/drivers/staging/vme/devices/vme_user.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/staging/vme/vme.c b/trunk/drivers/staging/vme/vme.c index 934283a19ca5..d6d84ebeeec0 100644 --- a/trunk/drivers/staging/vme/vme.c +++ b/trunk/drivers/staging/vme/vme.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "vme.h" #include "vme_bridge.h" diff --git a/trunk/drivers/staging/vt6655/device_main.c b/trunk/drivers/staging/vt6655/device_main.c index e40a2e990f4f..1d643653a7ed 100644 --- a/trunk/drivers/staging/vt6655/device_main.c +++ b/trunk/drivers/staging/vt6655/device_main.c @@ -84,7 +84,6 @@ #include "iowpa.h" #include #include -#include //#define DEBUG /*--------------------- Static Definitions -------------------------*/ diff --git a/trunk/drivers/staging/winbond/wb35reg.c b/trunk/drivers/staging/winbond/wb35reg.c index 1b93547ff5bc..f5608ad9ed00 100644 --- a/trunk/drivers/staging/winbond/wb35reg.c +++ b/trunk/drivers/staging/winbond/wb35reg.c @@ -2,7 +2,6 @@ #include "wb35reg_f.h" #include -#include extern void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency); diff --git a/trunk/drivers/staging/winbond/wb35rx.c b/trunk/drivers/staging/winbond/wb35rx.c index d7b57e62db08..4d41f6c3563c 100644 --- a/trunk/drivers/staging/winbond/wb35rx.c +++ b/trunk/drivers/staging/winbond/wb35rx.c @@ -9,7 +9,6 @@ // //============================================================================ #include -#include #include "core.h" #include "sysdef.h" diff --git a/trunk/drivers/staging/winbond/wb35tx.c b/trunk/drivers/staging/winbond/wb35tx.c index bda7a913edf8..5869ef473fcd 100644 --- a/trunk/drivers/staging/winbond/wb35tx.c +++ b/trunk/drivers/staging/winbond/wb35tx.c @@ -9,7 +9,6 @@ // //============================================================================ #include -#include #include "wb35tx_f.h" #include "mds_f.h" diff --git a/trunk/drivers/staging/wlags49_h2/wl_cs.c b/trunk/drivers/staging/wlags49_h2/wl_cs.c index 9da42e66085e..811a8daa660e 100644 --- a/trunk/drivers/staging/wlags49_h2/wl_cs.c +++ b/trunk/drivers/staging/wlags49_h2/wl_cs.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/wlags49_h2/wl_netdev.c b/trunk/drivers/staging/wlags49_h2/wl_netdev.c index 1db73ebcae28..fa082d90fcad 100644 --- a/trunk/drivers/staging/wlags49_h2/wl_netdev.c +++ b/trunk/drivers/staging/wlags49_h2/wl_netdev.c @@ -65,7 +65,6 @@ #include #include -#include #include #include // #include diff --git a/trunk/drivers/staging/wlags49_h2/wl_pci.c b/trunk/drivers/staging/wlags49_h2/wl_pci.c index 6751b4bad2e4..01e4bec9fd5b 100644 --- a/trunk/drivers/staging/wlags49_h2/wl_pci.c +++ b/trunk/drivers/staging/wlags49_h2/wl_pci.c @@ -71,6 +71,7 @@ #include #include #include +#include #include #include //#include diff --git a/trunk/drivers/staging/wlags49_h2/wl_priv.c b/trunk/drivers/staging/wlags49_h2/wl_priv.c index 727ea8a483af..ee610c76457e 100644 --- a/trunk/drivers/staging/wlags49_h2/wl_priv.c +++ b/trunk/drivers/staging/wlags49_h2/wl_priv.c @@ -65,7 +65,6 @@ #include #include -#include #include #include diff --git a/trunk/drivers/staging/wlan-ng/p80211req.c b/trunk/drivers/staging/wlan-ng/p80211req.c index e1e7bf1bf27c..c2e95f166828 100644 --- a/trunk/drivers/staging/wlan-ng/p80211req.c +++ b/trunk/drivers/staging/wlan-ng/p80211req.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/wlan-ng/p80211wep.c b/trunk/drivers/staging/wlan-ng/p80211wep.c index 80c2d3b672bb..ecbb15b297ae 100644 --- a/trunk/drivers/staging/wlan-ng/p80211wep.c +++ b/trunk/drivers/staging/wlan-ng/p80211wep.c @@ -50,6 +50,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/staging/wlan-ng/p80211wext.c b/trunk/drivers/staging/wlan-ng/p80211wext.c index 83f1d6cd7991..2fa1dfa23783 100644 --- a/trunk/drivers/staging/wlan-ng/p80211wext.c +++ b/trunk/drivers/staging/wlan-ng/p80211wext.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/wlan-ng/prism2fw.c b/trunk/drivers/staging/wlan-ng/prism2fw.c index d383ea85c9bc..4be54cea6ad7 100644 --- a/trunk/drivers/staging/wlan-ng/prism2fw.c +++ b/trunk/drivers/staging/wlan-ng/prism2fw.c @@ -48,7 +48,6 @@ /*================================================================*/ /* System Includes */ #include -#include /*================================================================*/ /* Local Constants */ diff --git a/trunk/drivers/staging/wlan-ng/prism2mgmt.c b/trunk/drivers/staging/wlan-ng/prism2mgmt.c index 4d1cdfc35420..ad163da72ae4 100644 --- a/trunk/drivers/staging/wlan-ng/prism2mgmt.c +++ b/trunk/drivers/staging/wlan-ng/prism2mgmt.c @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/staging/wlan-ng/prism2mib.c b/trunk/drivers/staging/wlan-ng/prism2mib.c index 0b0ec9c59a5d..98a5d58c3f55 100644 --- a/trunk/drivers/staging/wlan-ng/prism2mib.c +++ b/trunk/drivers/staging/wlan-ng/prism2mib.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/tc/tc.c b/trunk/drivers/tc/tc.c index a8aaf6ac2ae2..e5bd4470a570 100644 --- a/trunk/drivers/tc/tc.c +++ b/trunk/drivers/tc/tc.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/thermal/thermal_sys.c b/trunk/drivers/thermal/thermal_sys.c index 9b6297f07b83..5066de5cfc0c 100644 --- a/trunk/drivers/thermal/thermal_sys.c +++ b/trunk/drivers/thermal/thermal_sys.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/uio/uio.c b/trunk/drivers/uio/uio.c index bff1afbde5a4..4de382acd8f2 100644 --- a/trunk/drivers/uio/uio.c +++ b/trunk/drivers/uio/uio.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/uio/uio_aec.c b/trunk/drivers/uio/uio_aec.c index 72b22d44e8b9..b7830e9a3baa 100644 --- a/trunk/drivers/uio/uio_aec.c +++ b/trunk/drivers/uio/uio_aec.c @@ -27,7 +27,6 @@ #include #include #include -#include #define PCI_VENDOR_ID_AEC 0xaecb #define PCI_DEVICE_ID_AEC_VITCLTC 0x6250 diff --git a/trunk/drivers/uio/uio_cif.c b/trunk/drivers/uio/uio_cif.c index 371f87f8bc22..28034c812914 100644 --- a/trunk/drivers/uio/uio_cif.c +++ b/trunk/drivers/uio/uio_cif.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/uio/uio_netx.c b/trunk/drivers/uio/uio_netx.c index 5a18e9f7b836..afbf0bd55cc9 100644 --- a/trunk/drivers/uio/uio_netx.c +++ b/trunk/drivers/uio/uio_netx.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #define PCI_VENDOR_ID_HILSCHER 0x15CF diff --git a/trunk/drivers/uio/uio_pci_generic.c b/trunk/drivers/uio/uio_pci_generic.c index 85c9884a67fd..313da35984af 100644 --- a/trunk/drivers/uio/uio_pci_generic.c +++ b/trunk/drivers/uio/uio_pci_generic.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/uio/uio_pdrv.c b/trunk/drivers/uio/uio_pdrv.c index 7d3e469b9904..d494ce9288c3 100644 --- a/trunk/drivers/uio/uio_pdrv.c +++ b/trunk/drivers/uio/uio_pdrv.c @@ -11,7 +11,6 @@ #include #include #include -#include #define DRIVER_NAME "uio_pdrv" diff --git a/trunk/drivers/uio/uio_pdrv_genirq.c b/trunk/drivers/uio/uio_pdrv_genirq.c index 61e569df2bba..1ef3b8fc50b3 100644 --- a/trunk/drivers/uio/uio_pdrv_genirq.c +++ b/trunk/drivers/uio/uio_pdrv_genirq.c @@ -21,7 +21,6 @@ #include #include #include -#include #define DRIVER_NAME "uio_pdrv_genirq" diff --git a/trunk/drivers/uio/uio_sercos3.c b/trunk/drivers/uio/uio_sercos3.c index 3d461cd73e6b..a6d1b2bc47f3 100644 --- a/trunk/drivers/uio/uio_sercos3.c +++ b/trunk/drivers/uio/uio_sercos3.c @@ -28,7 +28,6 @@ #include #include #include -#include /* ID's for SERCOS III PCI card (PLX 9030) */ #define SERCOS_SUB_VENDOR_ID 0x1971 diff --git a/trunk/drivers/usb/atm/speedtch.c b/trunk/drivers/usb/atm/speedtch.c index 1e9ba4bdffef..3e862401a638 100644 --- a/trunk/drivers/usb/atm/speedtch.c +++ b/trunk/drivers/usb/atm/speedtch.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/atm/ueagle-atm.c b/trunk/drivers/usb/atm/ueagle-atm.c index 25f01b536f67..c5395246886d 100644 --- a/trunk/drivers/usb/atm/ueagle-atm.c +++ b/trunk/drivers/usb/atm/ueagle-atm.c @@ -66,7 +66,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/usb/c67x00/c67x00-drv.c b/trunk/drivers/usb/c67x00/c67x00-drv.c index b6d49234e521..029ee4a8a1f3 100644 --- a/trunk/drivers/usb/c67x00/c67x00-drv.c +++ b/trunk/drivers/usb/c67x00/c67x00-drv.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/c67x00/c67x00-sched.c b/trunk/drivers/usb/c67x00/c67x00-sched.c index f6b3c253f3fa..85dfe2965661 100644 --- a/trunk/drivers/usb/c67x00/c67x00-sched.c +++ b/trunk/drivers/usb/c67x00/c67x00-sched.c @@ -22,7 +22,6 @@ */ #include -#include #include "c67x00.h" #include "c67x00-hcd.h" diff --git a/trunk/drivers/usb/class/usbtmc.c b/trunk/drivers/usb/class/usbtmc.c index 3e7c1b800ebb..8588c0937a89 100644 --- a/trunk/drivers/usb/class/usbtmc.c +++ b/trunk/drivers/usb/class/usbtmc.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/core/devices.c b/trunk/drivers/usb/core/devices.c index 19bc03a9fecf..d41811bfef2a 100644 --- a/trunk/drivers/usb/core/devices.c +++ b/trunk/drivers/usb/core/devices.c @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index 6a3b5cae3a6e..f3c233806fa3 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/core/endpoint.c b/trunk/drivers/usb/core/endpoint.c index 4f84a41ee7a8..d26b9ea981f9 100644 --- a/trunk/drivers/usb/core/endpoint.c +++ b/trunk/drivers/usb/core/endpoint.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include "usb.h" diff --git a/trunk/drivers/usb/core/file.c b/trunk/drivers/usb/core/file.c index f06f5dbc8cdc..c3536f151f02 100644 --- a/trunk/drivers/usb/core/file.c +++ b/trunk/drivers/usb/core/file.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/at91_udc.c b/trunk/drivers/usb/gadget/at91_udc.c index df1bae9b048e..12ac9cd32a07 100644 --- a/trunk/drivers/usb/gadget/at91_udc.c +++ b/trunk/drivers/usb/gadget/at91_udc.c @@ -1370,12 +1370,6 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) { struct at91_udc *udc = _udc; u32 rescans = 5; - int disable_clock = 0; - - if (!udc->clocked) { - clk_on(udc); - disable_clock = 1; - } while (rescans--) { u32 status; @@ -1464,9 +1458,6 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) } } - if (disable_clock) - clk_off(udc); - return IRQ_HANDLED; } diff --git a/trunk/drivers/usb/gadget/atmel_usba_udc.c b/trunk/drivers/usb/gadget/atmel_usba_udc.c index 75a256f3d45b..f79bdfe4bed9 100644 --- a/trunk/drivers/usb/gadget/atmel_usba_udc.c +++ b/trunk/drivers/usb/gadget/atmel_usba_udc.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/ci13xxx_udc.c b/trunk/drivers/usb/gadget/ci13xxx_udc.c index 699695128e33..c7cb87a6fee2 100644 --- a/trunk/drivers/usb/gadget/ci13xxx_udc.c +++ b/trunk/drivers/usb/gadget/ci13xxx_udc.c @@ -62,7 +62,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/config.c b/trunk/drivers/usb/gadget/config.c index 47e8e722682c..e1191b9a316a 100644 --- a/trunk/drivers/usb/gadget/config.c +++ b/trunk/drivers/usb/gadget/config.c @@ -19,7 +19,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/f_acm.c b/trunk/drivers/usb/gadget/f_acm.c index 400e1ebe6976..e49c7325dce2 100644 --- a/trunk/drivers/usb/gadget/f_acm.c +++ b/trunk/drivers/usb/gadget/f_acm.c @@ -14,7 +14,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_audio.c b/trunk/drivers/usb/gadget/f_audio.c index 43bf44514c41..f1e3aad76c37 100644 --- a/trunk/drivers/usb/gadget/f_audio.c +++ b/trunk/drivers/usb/gadget/f_audio.c @@ -9,7 +9,6 @@ * Licensed under the GPL-2 or later. */ -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/f_ecm.c b/trunk/drivers/usb/gadget/f_ecm.c index 4e595324c614..2fff530efc19 100644 --- a/trunk/drivers/usb/gadget/f_ecm.c +++ b/trunk/drivers/usb/gadget/f_ecm.c @@ -21,7 +21,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/f_eem.c b/trunk/drivers/usb/gadget/f_eem.c index 38226e9a371d..d4f0db58a8ad 100644 --- a/trunk/drivers/usb/gadget/f_eem.c +++ b/trunk/drivers/usb/gadget/f_eem.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "u_ether.h" diff --git a/trunk/drivers/usb/gadget/f_loopback.c b/trunk/drivers/usb/gadget/f_loopback.c index e91d1b16d9be..6cb29d3df575 100644 --- a/trunk/drivers/usb/gadget/f_loopback.c +++ b/trunk/drivers/usb/gadget/f_loopback.c @@ -21,7 +21,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_obex.c b/trunk/drivers/usb/gadget/f_obex.c index 8f8c64371475..b4a3ba654ea5 100644 --- a/trunk/drivers/usb/gadget/f_obex.c +++ b/trunk/drivers/usb/gadget/f_obex.c @@ -23,7 +23,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_phonet.c b/trunk/drivers/usb/gadget/f_phonet.c index 3c6e1a058745..d2de10b9dc4b 100644 --- a/trunk/drivers/usb/gadget/f_phonet.c +++ b/trunk/drivers/usb/gadget/f_phonet.c @@ -20,7 +20,6 @@ * 02110-1301 USA */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_rndis.c b/trunk/drivers/usb/gadget/f_rndis.c index 56b022150f22..a30e60c7f129 100644 --- a/trunk/drivers/usb/gadget/f_rndis.c +++ b/trunk/drivers/usb/gadget/f_rndis.c @@ -24,7 +24,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/f_serial.c b/trunk/drivers/usb/gadget/f_serial.c index 490b00b01a7d..db0aa93606ef 100644 --- a/trunk/drivers/usb/gadget/f_serial.c +++ b/trunk/drivers/usb/gadget/f_serial.c @@ -10,7 +10,6 @@ * either version 2 of that License or (at your option) any later version. */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_sourcesink.c b/trunk/drivers/usb/gadget/f_sourcesink.c index 6d3cc443d914..09cba273d2db 100644 --- a/trunk/drivers/usb/gadget/f_sourcesink.c +++ b/trunk/drivers/usb/gadget/f_sourcesink.c @@ -21,7 +21,6 @@ /* #define VERBOSE_DEBUG */ -#include #include #include diff --git a/trunk/drivers/usb/gadget/f_subset.c b/trunk/drivers/usb/gadget/f_subset.c index 8675ca415329..a9c98fdb626d 100644 --- a/trunk/drivers/usb/gadget/f_subset.c +++ b/trunk/drivers/usb/gadget/f_subset.c @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/gmidi.c b/trunk/drivers/usb/gadget/gmidi.c index 2b56ce621852..04f6224b7e06 100644 --- a/trunk/drivers/usb/gadget/gmidi.c +++ b/trunk/drivers/usb/gadget/gmidi.c @@ -21,7 +21,6 @@ /* #define VERBOSE_DEBUG */ #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/imx_udc.c b/trunk/drivers/usb/gadget/imx_udc.c index e743122fcd93..01ee0b9bc957 100644 --- a/trunk/drivers/usb/gadget/imx_udc.c +++ b/trunk/drivers/usb/gadget/imx_udc.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/lh7a40x_udc.c b/trunk/drivers/usb/gadget/lh7a40x_udc.c index fded3fca793b..6cd3d54f5640 100644 --- a/trunk/drivers/usb/gadget/lh7a40x_udc.c +++ b/trunk/drivers/usb/gadget/lh7a40x_udc.c @@ -22,7 +22,6 @@ */ #include -#include #include "lh7a40x_udc.h" diff --git a/trunk/drivers/usb/gadget/m66592-udc.c b/trunk/drivers/usb/gadget/m66592-udc.c index 166bf71fd348..a8c8543d1b08 100644 --- a/trunk/drivers/usb/gadget/m66592-udc.c +++ b/trunk/drivers/usb/gadget/m66592-udc.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/pxa27x_udc.c b/trunk/drivers/usb/gadget/pxa27x_udc.c index 85b0d8921eae..05b892c3d686 100644 --- a/trunk/drivers/usb/gadget/pxa27x_udc.c +++ b/trunk/drivers/usb/gadget/pxa27x_udc.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/r8a66597-udc.c b/trunk/drivers/usb/gadget/r8a66597-udc.c index 888d8f166c0b..5e13d23b5f0c 100644 --- a/trunk/drivers/usb/gadget/r8a66597-udc.c +++ b/trunk/drivers/usb/gadget/r8a66597-udc.c @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/rndis.c b/trunk/drivers/usb/gadget/rndis.c index 5c0d06c79a81..48267bc0b2e0 100644 --- a/trunk/drivers/usb/gadget/rndis.c +++ b/trunk/drivers/usb/gadget/rndis.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/s3c-hsotg.c b/trunk/drivers/usb/gadget/s3c-hsotg.c index 124a8ccfdcda..f742c8e7397c 100644 --- a/trunk/drivers/usb/gadget/s3c-hsotg.c +++ b/trunk/drivers/usb/gadget/s3c-hsotg.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/gadget/u_audio.c b/trunk/drivers/usb/gadget/u_audio.c index 7a86d2c9109c..35e0930f5bbb 100644 --- a/trunk/drivers/usb/gadget/u_audio.c +++ b/trunk/drivers/usb/gadget/u_audio.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/u_ether.c b/trunk/drivers/usb/gadget/u_ether.c index 07f4178ad178..84ca195c2d10 100644 --- a/trunk/drivers/usb/gadget/u_ether.c +++ b/trunk/drivers/usb/gadget/u_ether.c @@ -23,7 +23,6 @@ /* #define VERBOSE_DEBUG */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/gadget/u_serial.c b/trunk/drivers/usb/gadget/u_serial.c index 16bdf77f582a..adf8260c3a6a 100644 --- a/trunk/drivers/usb/gadget/u_serial.c +++ b/trunk/drivers/usb/gadget/u_serial.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "u_serial.h" diff --git a/trunk/drivers/usb/gadget/zero.c b/trunk/drivers/usb/gadget/zero.c index 807280d069f9..fac81ee193dd 100644 --- a/trunk/drivers/usb/gadget/zero.c +++ b/trunk/drivers/usb/gadget/zero.c @@ -50,7 +50,6 @@ /* #define VERBOSE_DEBUG */ #include -#include #include #include diff --git a/trunk/drivers/usb/host/ehci-hcd.c b/trunk/drivers/usb/host/ehci-hcd.c index 207e7a85aeb0..dc55a62859c6 100644 --- a/trunk/drivers/usb/host/ehci-hcd.c +++ b/trunk/drivers/usb/host/ehci-hcd.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/ehci-mxc.c b/trunk/drivers/usb/host/ehci-mxc.c index ead59f42e69b..23cd917088b4 100644 --- a/trunk/drivers/usb/host/ehci-mxc.c +++ b/trunk/drivers/usb/host/ehci-mxc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/usb/host/ehci-omap.c b/trunk/drivers/usb/host/ehci-omap.c index a67a0030dd57..f0282d6bb7aa 100644 --- a/trunk/drivers/usb/host/ehci-omap.c +++ b/trunk/drivers/usb/host/ehci-omap.c @@ -37,7 +37,6 @@ #include #include #include -#include #include /* diff --git a/trunk/drivers/usb/host/fhci-hcd.c b/trunk/drivers/usb/host/fhci-hcd.c index 15379c636143..5dcfb3de9945 100644 --- a/trunk/drivers/usb/host/fhci-hcd.c +++ b/trunk/drivers/usb/host/fhci-hcd.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/fhci-mem.c b/trunk/drivers/usb/host/fhci-mem.c index 5591bfb499d1..2c0736c99712 100644 --- a/trunk/drivers/usb/host/fhci-mem.c +++ b/trunk/drivers/usb/host/fhci-mem.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/fhci-q.c b/trunk/drivers/usb/host/fhci-q.c index f73c92359beb..b0a1446ba292 100644 --- a/trunk/drivers/usb/host/fhci-q.c +++ b/trunk/drivers/usb/host/fhci-q.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/fhci-tds.c b/trunk/drivers/usb/host/fhci-tds.c index 57013479d7f7..e1232890c78b 100644 --- a/trunk/drivers/usb/host/fhci-tds.c +++ b/trunk/drivers/usb/host/fhci-tds.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/host/hwa-hc.c b/trunk/drivers/usb/host/hwa-hc.c index 35742f8c7cda..88b03214622b 100644 --- a/trunk/drivers/usb/host/hwa-hc.c +++ b/trunk/drivers/usb/host/hwa-hc.c @@ -55,7 +55,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/host/imx21-hcd.c b/trunk/drivers/usb/host/imx21-hcd.c index 8a12f297645f..213e270e1c29 100644 --- a/trunk/drivers/usb/host/imx21-hcd.c +++ b/trunk/drivers/usb/host/imx21-hcd.c @@ -54,7 +54,6 @@ #include #include #include -#include #include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/isp116x-hcd.c b/trunk/drivers/usb/host/isp116x-hcd.c index 92de71dc7729..a2b305477afe 100644 --- a/trunk/drivers/usb/host/isp116x-hcd.c +++ b/trunk/drivers/usb/host/isp116x-hcd.c @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/host/ohci-q.c b/trunk/drivers/usb/host/ohci-q.c index 83094d067e0f..35288bcae0db 100644 --- a/trunk/drivers/usb/host/ohci-q.c +++ b/trunk/drivers/usb/host/ohci-q.c @@ -8,7 +8,6 @@ */ #include -#include static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) { diff --git a/trunk/drivers/usb/host/r8a66597-hcd.c b/trunk/drivers/usb/host/r8a66597-hcd.c index d478ffad59b4..f71a73a93d0c 100644 --- a/trunk/drivers/usb/host/r8a66597-hcd.c +++ b/trunk/drivers/usb/host/r8a66597-hcd.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "../core/hcd.h" diff --git a/trunk/drivers/usb/host/uhci-debug.c b/trunk/drivers/usb/host/uhci-debug.c index 98cf0b26b968..e52b954dda47 100644 --- a/trunk/drivers/usb/host/uhci-debug.c +++ b/trunk/drivers/usb/host/uhci-debug.c @@ -9,7 +9,6 @@ * (C) Copyright 1999-2001 Johannes Erdfelt */ -#include #include #include #include diff --git a/trunk/drivers/usb/host/whci/asl.c b/trunk/drivers/usb/host/whci/asl.c index 773249306031..562eba108816 100644 --- a/trunk/drivers/usb/host/whci/asl.c +++ b/trunk/drivers/usb/host/whci/asl.c @@ -16,7 +16,6 @@ * along with this program. If not, see . */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/host/whci/debug.c b/trunk/drivers/usb/host/whci/debug.c index c5305b599ca0..8c1c610c9513 100644 --- a/trunk/drivers/usb/host/whci/debug.c +++ b/trunk/drivers/usb/host/whci/debug.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include #include #include #include diff --git a/trunk/drivers/usb/host/whci/init.c b/trunk/drivers/usb/host/whci/init.c index f7582e8e2169..34a783cb0133 100644 --- a/trunk/drivers/usb/host/whci/init.c +++ b/trunk/drivers/usb/host/whci/init.c @@ -16,7 +16,6 @@ * along with this program. If not, see . */ #include -#include #include #include diff --git a/trunk/drivers/usb/host/whci/pzl.c b/trunk/drivers/usb/host/whci/pzl.c index 33c5580b4d25..0db3fb2dc03a 100644 --- a/trunk/drivers/usb/host/whci/pzl.c +++ b/trunk/drivers/usb/host/whci/pzl.c @@ -16,7 +16,6 @@ * along with this program. If not, see . */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/host/whci/qset.c b/trunk/drivers/usb/host/whci/qset.c index 141d049beb3e..7d4204db0f61 100644 --- a/trunk/drivers/usb/host/whci/qset.c +++ b/trunk/drivers/usb/host/whci/qset.c @@ -17,7 +17,6 @@ */ #include #include -#include #include #include diff --git a/trunk/drivers/usb/host/xhci-mem.c b/trunk/drivers/usb/host/xhci-mem.c index c09539bad1ee..bba9b19ed1b9 100644 --- a/trunk/drivers/usb/host/xhci-mem.c +++ b/trunk/drivers/usb/host/xhci-mem.c @@ -22,7 +22,6 @@ #include #include -#include #include #include "xhci.h" diff --git a/trunk/drivers/usb/host/xhci-ring.c b/trunk/drivers/usb/host/xhci-ring.c index 85d7e8f2085e..6ba841bca4a2 100644 --- a/trunk/drivers/usb/host/xhci-ring.c +++ b/trunk/drivers/usb/host/xhci-ring.c @@ -65,7 +65,6 @@ */ #include -#include #include "xhci.h" /* diff --git a/trunk/drivers/usb/host/xhci.c b/trunk/drivers/usb/host/xhci.c index 7e4277273908..492a61c2c79d 100644 --- a/trunk/drivers/usb/host/xhci.c +++ b/trunk/drivers/usb/host/xhci.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "xhci.h" diff --git a/trunk/drivers/usb/misc/appledisplay.c b/trunk/drivers/usb/misc/appledisplay.c index 094f91cbc578..3adab041355a 100644 --- a/trunk/drivers/usb/misc/appledisplay.c +++ b/trunk/drivers/usb/misc/appledisplay.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/misc/cypress_cy7c63.c b/trunk/drivers/usb/misc/cypress_cy7c63.c index 2f43c57743c9..1547d8cac5fb 100644 --- a/trunk/drivers/usb/misc/cypress_cy7c63.c +++ b/trunk/drivers/usb/misc/cypress_cy7c63.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #define DRIVER_AUTHOR "Oliver Bock (bock@tfh-berlin.de)" diff --git a/trunk/drivers/usb/misc/cytherm.c b/trunk/drivers/usb/misc/cytherm.c index 1d7251bc1b5f..b9cbbbda8245 100644 --- a/trunk/drivers/usb/misc/cytherm.c +++ b/trunk/drivers/usb/misc/cytherm.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/misc/isight_firmware.c b/trunk/drivers/usb/misc/isight_firmware.c index fe1d44319d0a..06e990adc6cd 100644 --- a/trunk/drivers/usb/misc/isight_firmware.c +++ b/trunk/drivers/usb/misc/isight_firmware.c @@ -25,7 +25,6 @@ #include #include #include -#include static const struct usb_device_id id_table[] = { {USB_DEVICE(0x05ac, 0x8300)}, diff --git a/trunk/drivers/usb/misc/sisusbvga/sisusb_con.c b/trunk/drivers/usb/misc/sisusbvga/sisusb_con.c index b271b0557a1f..b624320df903 100644 --- a/trunk/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/trunk/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/misc/sisusbvga/sisusb_init.c b/trunk/drivers/usb/misc/sisusbvga/sisusb_init.c index cb8a3d91f970..0ab990744830 100644 --- a/trunk/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/trunk/drivers/usb/misc/sisusbvga/sisusb_init.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "sisusb.h" diff --git a/trunk/drivers/usb/misc/trancevibrator.c b/trunk/drivers/usb/misc/trancevibrator.c index d77aba46ae85..5da28eaee314 100644 --- a/trunk/drivers/usb/misc/trancevibrator.c +++ b/trunk/drivers/usb/misc/trancevibrator.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/misc/uss720.c b/trunk/drivers/usb/misc/uss720.c index 796e2f68f749..f56fed53f2dd 100644 --- a/trunk/drivers/usb/misc/uss720.c +++ b/trunk/drivers/usb/misc/uss720.c @@ -49,7 +49,6 @@ #include #include #include -#include /* * Version Information diff --git a/trunk/drivers/usb/mon/mon_bin.c b/trunk/drivers/usb/mon/mon_bin.c index ddf7f9a1b336..6dd44bc1f5ff 100644 --- a/trunk/drivers/usb/mon/mon_bin.c +++ b/trunk/drivers/usb/mon/mon_bin.c @@ -17,7 +17,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/usb/mon/mon_main.c b/trunk/drivers/usb/mon/mon_main.c index e4af18b93c7d..e0c2db3b767b 100644 --- a/trunk/drivers/usb/mon/mon_main.c +++ b/trunk/drivers/usb/mon/mon_main.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/mon/mon_stat.c b/trunk/drivers/usb/mon/mon_stat.c index 1becdc3837e6..ac8b0d5ce7f8 100644 --- a/trunk/drivers/usb/mon/mon_stat.c +++ b/trunk/drivers/usb/mon/mon_stat.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/mon/mon_text.c b/trunk/drivers/usb/mon/mon_text.c index 4d0be130f49b..31c11888ec6a 100644 --- a/trunk/drivers/usb/mon/mon_text.c +++ b/trunk/drivers/usb/mon/mon_text.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/musb/blackfin.c b/trunk/drivers/usb/musb/blackfin.c index 719a22d664ef..bcee1339d4fd 100644 --- a/trunk/drivers/usb/musb/blackfin.c +++ b/trunk/drivers/usb/musb/blackfin.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/musb/cppi_dma.c b/trunk/drivers/usb/musb/cppi_dma.c index 59dc3d351b60..3c69a76ec392 100644 --- a/trunk/drivers/usb/musb/cppi_dma.c +++ b/trunk/drivers/usb/musb/cppi_dma.c @@ -7,7 +7,6 @@ */ #include -#include #include #include "musb_core.h" diff --git a/trunk/drivers/usb/musb/davinci.c b/trunk/drivers/usb/musb/davinci.c index 29bce5c0fd10..a883f9dd3f8a 100644 --- a/trunk/drivers/usb/musb/davinci.c +++ b/trunk/drivers/usb/musb/davinci.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/musb/musb_gadget.c b/trunk/drivers/usb/musb/musb_gadget.c index 6fca870e957e..a9f288cd70ed 100644 --- a/trunk/drivers/usb/musb/musb_gadget.c +++ b/trunk/drivers/usb/musb/musb_gadget.c @@ -43,7 +43,6 @@ #include #include #include -#include #include "musb_core.h" diff --git a/trunk/drivers/usb/musb/musb_virthub.c b/trunk/drivers/usb/musb/musb_virthub.c index 7775e1c0a215..bfe5fe4ebfee 100644 --- a/trunk/drivers/usb/musb/musb_virthub.c +++ b/trunk/drivers/usb/musb/musb_virthub.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/musb/musbhsdma.c b/trunk/drivers/usb/musb/musbhsdma.c index 1008044a3bbc..2fa7d5c00f31 100644 --- a/trunk/drivers/usb/musb/musbhsdma.c +++ b/trunk/drivers/usb/musb/musbhsdma.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "musb_core.h" #include "musbhsdma.h" diff --git a/trunk/drivers/usb/musb/omap2430.c b/trunk/drivers/usb/musb/omap2430.c index 490cdf15ccb6..3fe16867b5a8 100644 --- a/trunk/drivers/usb/musb/omap2430.c +++ b/trunk/drivers/usb/musb/omap2430.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/musb/tusb6010_omap.c b/trunk/drivers/usb/musb/tusb6010_omap.c index 5afa070d7dc9..1c868096bd6f 100644 --- a/trunk/drivers/usb/musb/tusb6010_omap.c +++ b/trunk/drivers/usb/musb/tusb6010_omap.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/otg/gpio_vbus.c b/trunk/drivers/usb/otg/gpio_vbus.c index 221c44444ec6..1c26c94513e9 100644 --- a/trunk/drivers/usb/otg/gpio_vbus.c +++ b/trunk/drivers/usb/otg/gpio_vbus.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/otg/nop-usb-xceiv.c b/trunk/drivers/usb/otg/nop-usb-xceiv.c index e70014ab0976..af456b48985f 100644 --- a/trunk/drivers/usb/otg/nop-usb-xceiv.c +++ b/trunk/drivers/usb/otg/nop-usb-xceiv.c @@ -30,7 +30,6 @@ #include #include #include -#include struct nop_usb_xceiv { struct otg_transceiver otg; diff --git a/trunk/drivers/usb/otg/twl4030-usb.c b/trunk/drivers/usb/otg/twl4030-usb.c index 223cdf46ccb7..3e4e9f434d78 100644 --- a/trunk/drivers/usb/otg/twl4030-usb.c +++ b/trunk/drivers/usb/otg/twl4030-usb.c @@ -37,7 +37,6 @@ #include #include #include -#include /* Register defines */ diff --git a/trunk/drivers/usb/otg/ulpi.c b/trunk/drivers/usb/otg/ulpi.c index 9010225e0d06..896527456b7e 100644 --- a/trunk/drivers/usb/otg/ulpi.c +++ b/trunk/drivers/usb/otg/ulpi.c @@ -24,7 +24,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/aircable.c b/trunk/drivers/usb/serial/aircable.c index 4fd7af98b1ae..365db1097bfd 100644 --- a/trunk/drivers/usb/serial/aircable.c +++ b/trunk/drivers/usb/serial/aircable.c @@ -43,7 +43,6 @@ */ #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/ark3116.c b/trunk/drivers/usb/serial/ark3116.c index 9b66bf19f751..547c9448c28c 100644 --- a/trunk/drivers/usb/serial/ark3116.c +++ b/trunk/drivers/usb/serial/ark3116.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/bus.c b/trunk/drivers/usb/serial/bus.c index 7f547dc3a590..ba555c528cc6 100644 --- a/trunk/drivers/usb/serial/bus.c +++ b/trunk/drivers/usb/serial/bus.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/ch341.c b/trunk/drivers/usb/serial/ch341.c index 7e8e39818414..9f4fed1968b5 100644 --- a/trunk/drivers/usb/serial/ch341.c +++ b/trunk/drivers/usb/serial/ch341.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/navman.c b/trunk/drivers/usb/serial/navman.c index a6b207c84917..04a6cbbed2c0 100644 --- a/trunk/drivers/usb/serial/navman.c +++ b/trunk/drivers/usb/serial/navman.c @@ -12,7 +12,6 @@ * flags as the navman is rx only so cannot echo. */ -#include #include #include #include diff --git a/trunk/drivers/usb/serial/opticon.c b/trunk/drivers/usb/serial/opticon.c index ed01f3b2de8c..701452ae9197 100644 --- a/trunk/drivers/usb/serial/opticon.c +++ b/trunk/drivers/usb/serial/opticon.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index ca9d866672aa..950cb311ca94 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/safe_serial.c b/trunk/drivers/usb/serial/safe_serial.c index 43a0cadd5782..4b463cd140ef 100644 --- a/trunk/drivers/usb/serial/safe_serial.c +++ b/trunk/drivers/usb/serial/safe_serial.c @@ -64,8 +64,8 @@ #include #include -#include #include +#include #include #include #include diff --git a/trunk/drivers/usb/serial/sierra.c b/trunk/drivers/usb/serial/sierra.c index 9202f94505e6..34e6f894cba9 100644 --- a/trunk/drivers/usb/serial/sierra.c +++ b/trunk/drivers/usb/serial/sierra.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/symbolserial.c b/trunk/drivers/usb/serial/symbolserial.c index d9457bd4fe10..ee190cc1757c 100644 --- a/trunk/drivers/usb/serial/symbolserial.c +++ b/trunk/drivers/usb/serial/symbolserial.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/serial/usb_debug.c b/trunk/drivers/usb/serial/usb_debug.c index 28026b47344a..252cc2d993b2 100644 --- a/trunk/drivers/usb/serial/usb_debug.c +++ b/trunk/drivers/usb/serial/usb_debug.c @@ -8,7 +8,6 @@ * 2 as published by the Free Software Foundation. */ -#include #include #include #include diff --git a/trunk/drivers/usb/storage/alauda.c b/trunk/drivers/usb/storage/alauda.c index 42d0eaed4a01..67edc65acb8e 100644 --- a/trunk/drivers/usb/storage/alauda.c +++ b/trunk/drivers/usb/storage/alauda.c @@ -32,7 +32,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/usb/storage/karma.c b/trunk/drivers/usb/storage/karma.c index ba1b78906880..7953d93a7739 100644 --- a/trunk/drivers/usb/storage/karma.c +++ b/trunk/drivers/usb/storage/karma.c @@ -19,7 +19,6 @@ */ #include -#include #include #include diff --git a/trunk/drivers/usb/storage/option_ms.c b/trunk/drivers/usb/storage/option_ms.c index 89460181d122..773a5cd38c5a 100644 --- a/trunk/drivers/usb/storage/option_ms.c +++ b/trunk/drivers/usb/storage/option_ms.c @@ -21,7 +21,6 @@ */ #include -#include #include "usb.h" #include "transport.h" diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index d8d98cfecada..4cc035562cc2 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -43,6 +43,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include diff --git a/trunk/drivers/usb/storage/sierra_ms.c b/trunk/drivers/usb/storage/sierra_ms.c index 57fc2f532cab..4395c4100ec2 100644 --- a/trunk/drivers/usb/storage/sierra_ms.c +++ b/trunk/drivers/usb/storage/sierra_ms.c @@ -3,7 +3,6 @@ #include #include #include -#include #include "usb.h" #include "transport.h" diff --git a/trunk/drivers/usb/storage/transport.c b/trunk/drivers/usb/storage/transport.c index f253edec3bb8..468038126e5e 100644 --- a/trunk/drivers/usb/storage/transport.c +++ b/trunk/drivers/usb/storage/transport.c @@ -44,8 +44,8 @@ */ #include -#include #include +#include #include diff --git a/trunk/drivers/usb/wusbcore/cbaf.c b/trunk/drivers/usb/wusbcore/cbaf.c index c0c5665e60a9..51a8e0d5789d 100644 --- a/trunk/drivers/usb/wusbcore/cbaf.c +++ b/trunk/drivers/usb/wusbcore/cbaf.c @@ -92,7 +92,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/usb/wusbcore/crypto.c b/trunk/drivers/usb/wusbcore/crypto.c index 827c87f10cc5..9579cf4c38bf 100644 --- a/trunk/drivers/usb/wusbcore/crypto.c +++ b/trunk/drivers/usb/wusbcore/crypto.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/usb/wusbcore/devconnect.c b/trunk/drivers/usb/wusbcore/devconnect.c index 46e79d349498..1c918286159c 100644 --- a/trunk/drivers/usb/wusbcore/devconnect.c +++ b/trunk/drivers/usb/wusbcore/devconnect.c @@ -88,7 +88,6 @@ #include #include -#include #include #include "wusbhc.h" diff --git a/trunk/drivers/usb/wusbcore/mmc.c b/trunk/drivers/usb/wusbcore/mmc.c index 0a57ff0a0b0c..2d827397e30b 100644 --- a/trunk/drivers/usb/wusbcore/mmc.c +++ b/trunk/drivers/usb/wusbcore/mmc.c @@ -37,7 +37,6 @@ * - add timers that autoremove intervalled IEs? */ #include -#include #include "wusbhc.h" /* Initialize the MMCIEs handling mechanism */ diff --git a/trunk/drivers/usb/wusbcore/rh.c b/trunk/drivers/usb/wusbcore/rh.c index a68ad7aa0b59..9fe4246cecb9 100644 --- a/trunk/drivers/usb/wusbcore/rh.c +++ b/trunk/drivers/usb/wusbcore/rh.c @@ -69,7 +69,6 @@ * * wusbhc_rh_start_port_reset() ??? unimplemented */ -#include #include "wusbhc.h" /* diff --git a/trunk/drivers/usb/wusbcore/security.c b/trunk/drivers/usb/wusbcore/security.c index b60799b811c1..edcd2d756037 100644 --- a/trunk/drivers/usb/wusbcore/security.c +++ b/trunk/drivers/usb/wusbcore/security.c @@ -23,7 +23,6 @@ * FIXME: docs */ #include -#include #include #include #include "wusbhc.h" diff --git a/trunk/drivers/usb/wusbcore/wa-hc.c b/trunk/drivers/usb/wusbcore/wa-hc.c index 59a748a0e5da..9d04722415bb 100644 --- a/trunk/drivers/usb/wusbcore/wa-hc.c +++ b/trunk/drivers/usb/wusbcore/wa-hc.c @@ -22,7 +22,6 @@ * * FIXME: docs */ -#include #include "wusbhc.h" #include "wa-hc.h" diff --git a/trunk/drivers/usb/wusbcore/wa-nep.c b/trunk/drivers/usb/wusbcore/wa-nep.c index f67f7f1e6df9..17d2626038be 100644 --- a/trunk/drivers/usb/wusbcore/wa-nep.c +++ b/trunk/drivers/usb/wusbcore/wa-nep.c @@ -51,7 +51,6 @@ */ #include #include -#include #include "wa-hc.h" #include "wusbhc.h" diff --git a/trunk/drivers/usb/wusbcore/wa-rpipe.c b/trunk/drivers/usb/wusbcore/wa-rpipe.c index c7b1d8108de9..7369655f69cd 100644 --- a/trunk/drivers/usb/wusbcore/wa-rpipe.c +++ b/trunk/drivers/usb/wusbcore/wa-rpipe.c @@ -60,7 +60,6 @@ #include #include #include -#include #include "wusbhc.h" #include "wa-hc.h" diff --git a/trunk/drivers/usb/wusbcore/wa-xfer.c b/trunk/drivers/usb/wusbcore/wa-xfer.c index 112ef7e26f6b..489b47833e2c 100644 --- a/trunk/drivers/usb/wusbcore/wa-xfer.c +++ b/trunk/drivers/usb/wusbcore/wa-xfer.c @@ -81,7 +81,6 @@ */ #include #include -#include #include #include "wa-hc.h" diff --git a/trunk/drivers/uwb/address.c b/trunk/drivers/uwb/address.c index 973321327c44..ad21b1d7218c 100644 --- a/trunk/drivers/uwb/address.c +++ b/trunk/drivers/uwb/address.c @@ -23,7 +23,6 @@ * FIXME: docs */ -#include #include #include #include diff --git a/trunk/drivers/uwb/allocator.c b/trunk/drivers/uwb/allocator.c index 436e4f7110cb..c13cec7dcbc5 100644 --- a/trunk/drivers/uwb/allocator.c +++ b/trunk/drivers/uwb/allocator.c @@ -16,7 +16,6 @@ * along with this program. If not, see . */ #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/beacon.c b/trunk/drivers/uwb/beacon.c index dcdd59bfcd09..36bc3158006f 100644 --- a/trunk/drivers/uwb/beacon.c +++ b/trunk/drivers/uwb/beacon.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/drp-ie.c b/trunk/drivers/uwb/drp-ie.c index 520673109a7e..2840d7bf9e67 100644 --- a/trunk/drivers/uwb/drp-ie.c +++ b/trunk/drivers/uwb/drp-ie.c @@ -18,7 +18,6 @@ */ #include #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/drp.c b/trunk/drivers/uwb/drp.c index a8d83e25e3b6..4f5ca99a04b9 100644 --- a/trunk/drivers/uwb/drp.c +++ b/trunk/drivers/uwb/drp.c @@ -20,7 +20,6 @@ */ #include #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/est.c b/trunk/drivers/uwb/est.c index a2eaa3c33b0b..328fcc2b6099 100644 --- a/trunk/drivers/uwb/est.c +++ b/trunk/drivers/uwb/est.c @@ -40,7 +40,6 @@ * uwb_est_get_size() */ #include -#include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/hwa-rc.c b/trunk/drivers/uwb/hwa-rc.c index 2babcd4fbfc1..b409c228f254 100644 --- a/trunk/drivers/uwb/hwa-rc.c +++ b/trunk/drivers/uwb/hwa-rc.c @@ -53,7 +53,6 @@ */ #include #include -#include #include #include #include diff --git a/trunk/drivers/uwb/i1480/dfu/mac.c b/trunk/drivers/uwb/i1480/dfu/mac.c index 6ec14f5fcde4..694d0daf88ab 100644 --- a/trunk/drivers/uwb/i1480/dfu/mac.c +++ b/trunk/drivers/uwb/i1480/dfu/mac.c @@ -28,7 +28,6 @@ */ #include #include -#include #include #include "i1480-dfu.h" diff --git a/trunk/drivers/uwb/i1480/dfu/usb.c b/trunk/drivers/uwb/i1480/dfu/usb.c index ba8664328afa..a99e211a1b87 100644 --- a/trunk/drivers/uwb/i1480/dfu/usb.c +++ b/trunk/drivers/uwb/i1480/dfu/usb.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/uwb/i1480/i1480u-wlp/lc.c b/trunk/drivers/uwb/i1480/i1480u-wlp/lc.c index def778cf2216..f272dfe54d49 100644 --- a/trunk/drivers/uwb/i1480/i1480u-wlp/lc.c +++ b/trunk/drivers/uwb/i1480/i1480u-wlp/lc.c @@ -55,7 +55,6 @@ * is being removed. * i1480u_rm() */ -#include #include #include diff --git a/trunk/drivers/uwb/i1480/i1480u-wlp/netdev.c b/trunk/drivers/uwb/i1480/i1480u-wlp/netdev.c index f98f6ce8b9e7..b236e6969942 100644 --- a/trunk/drivers/uwb/i1480/i1480u-wlp/netdev.c +++ b/trunk/drivers/uwb/i1480/i1480u-wlp/netdev.c @@ -39,7 +39,6 @@ * i1480u_set_config(): */ -#include #include #include diff --git a/trunk/drivers/uwb/i1480/i1480u-wlp/rx.c b/trunk/drivers/uwb/i1480/i1480u-wlp/rx.c index d4e51e108aa4..25a2758beb61 100644 --- a/trunk/drivers/uwb/i1480/i1480u-wlp/rx.c +++ b/trunk/drivers/uwb/i1480/i1480u-wlp/rx.c @@ -64,7 +64,6 @@ * */ -#include #include #include #include "i1480u-wlp.h" diff --git a/trunk/drivers/uwb/i1480/i1480u-wlp/tx.c b/trunk/drivers/uwb/i1480/i1480u-wlp/tx.c index 3c117a364564..3db3449dbda4 100644 --- a/trunk/drivers/uwb/i1480/i1480u-wlp/tx.c +++ b/trunk/drivers/uwb/i1480/i1480u-wlp/tx.c @@ -54,7 +54,6 @@ * the times the MTU will be smaller than one page... */ -#include #include "i1480u-wlp.h" enum { diff --git a/trunk/drivers/uwb/ie.c b/trunk/drivers/uwb/ie.c index 30acec740425..ab976686175b 100644 --- a/trunk/drivers/uwb/ie.c +++ b/trunk/drivers/uwb/ie.c @@ -24,7 +24,6 @@ * FIXME: docs */ -#include #include "uwb-internal.h" /** diff --git a/trunk/drivers/uwb/lc-dev.c b/trunk/drivers/uwb/lc-dev.c index 90113bafefca..1097e81b56d0 100644 --- a/trunk/drivers/uwb/lc-dev.c +++ b/trunk/drivers/uwb/lc-dev.c @@ -23,7 +23,6 @@ * FIXME: docs */ #include -#include #include #include #include diff --git a/trunk/drivers/uwb/lc-rc.c b/trunk/drivers/uwb/lc-rc.c index b0091c771b9a..9611ef3b787a 100644 --- a/trunk/drivers/uwb/lc-rc.c +++ b/trunk/drivers/uwb/lc-rc.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/neh.c b/trunk/drivers/uwb/neh.c index 697e56a5bcdd..78510a1f410d 100644 --- a/trunk/drivers/uwb/neh.c +++ b/trunk/drivers/uwb/neh.c @@ -83,7 +83,6 @@ */ #include #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/reset.c b/trunk/drivers/uwb/reset.c index 27849292b552..7f0512e43d9d 100644 --- a/trunk/drivers/uwb/reset.c +++ b/trunk/drivers/uwb/reset.c @@ -30,7 +30,6 @@ */ #include #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/rsv.c b/trunk/drivers/uwb/rsv.c index 78c892233cf1..6b76f4bb4cc7 100644 --- a/trunk/drivers/uwb/rsv.c +++ b/trunk/drivers/uwb/rsv.c @@ -17,7 +17,6 @@ */ #include #include -#include #include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/scan.c b/trunk/drivers/uwb/scan.c index 76a1a1ed7d3e..2d270748f32b 100644 --- a/trunk/drivers/uwb/scan.c +++ b/trunk/drivers/uwb/scan.c @@ -35,7 +35,6 @@ #include #include -#include #include "uwb-internal.h" diff --git a/trunk/drivers/uwb/umc-dev.c b/trunk/drivers/uwb/umc-dev.c index 43ea9982e687..1fc7d8270bb8 100644 --- a/trunk/drivers/uwb/umc-dev.c +++ b/trunk/drivers/uwb/umc-dev.c @@ -6,7 +6,6 @@ * This file is released under the GNU GPL v2. */ #include -#include #include static void umc_device_release(struct device *dev) diff --git a/trunk/drivers/uwb/uwbd.c b/trunk/drivers/uwb/uwbd.c index 001c8b4020a8..6210fe1fd1bb 100644 --- a/trunk/drivers/uwb/uwbd.c +++ b/trunk/drivers/uwb/uwbd.c @@ -69,7 +69,6 @@ * Handler functions are called normally uwbd_evt_handle_*(). */ #include -#include #include #include diff --git a/trunk/drivers/uwb/whc-rc.c b/trunk/drivers/uwb/whc-rc.c index 73495583c444..01950c62dc8d 100644 --- a/trunk/drivers/uwb/whc-rc.c +++ b/trunk/drivers/uwb/whc-rc.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/drivers/uwb/whci.c b/trunk/drivers/uwb/whci.c index b221142446a2..2e2784627ad6 100644 --- a/trunk/drivers/uwb/whci.c +++ b/trunk/drivers/uwb/whci.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/uwb/wlp/eda.c b/trunk/drivers/uwb/wlp/eda.c index 086fc0cf9401..69e020039718 100644 --- a/trunk/drivers/uwb/wlp/eda.c +++ b/trunk/drivers/uwb/wlp/eda.c @@ -53,7 +53,6 @@ #include #include -#include #include #include "wlp-internal.h" diff --git a/trunk/drivers/uwb/wlp/messages.c b/trunk/drivers/uwb/wlp/messages.c index 3a8e033dce21..75164866c2d8 100644 --- a/trunk/drivers/uwb/wlp/messages.c +++ b/trunk/drivers/uwb/wlp/messages.c @@ -24,7 +24,6 @@ */ #include -#include #include "wlp-internal.h" diff --git a/trunk/drivers/uwb/wlp/txrx.c b/trunk/drivers/uwb/wlp/txrx.c index 05dde44b3592..7350ed6909f8 100644 --- a/trunk/drivers/uwb/wlp/txrx.c +++ b/trunk/drivers/uwb/wlp/txrx.c @@ -25,7 +25,6 @@ */ #include -#include #include #include "wlp-internal.h" diff --git a/trunk/drivers/uwb/wlp/wlp-lc.c b/trunk/drivers/uwb/wlp/wlp-lc.c index 7f6a630bf26c..13db739c4e39 100644 --- a/trunk/drivers/uwb/wlp/wlp-lc.c +++ b/trunk/drivers/uwb/wlp/wlp-lc.c @@ -22,7 +22,6 @@ * FIXME: docs */ #include -#include #include "wlp-internal.h" diff --git a/trunk/drivers/uwb/wlp/wss-lc.c b/trunk/drivers/uwb/wlp/wss-lc.c index 90accdd54c07..5913c7a5d922 100644 --- a/trunk/drivers/uwb/wlp/wss-lc.c +++ b/trunk/drivers/uwb/wlp/wss-lc.c @@ -45,7 +45,6 @@ */ #include /* for is_valid_ether_addr */ #include -#include #include #include "wlp-internal.h" diff --git a/trunk/drivers/vhost/net.c b/trunk/drivers/vhost/net.c index 9777583218ff..a6a88dfd5029 100644 --- a/trunk/drivers/vhost/net.c +++ b/trunk/drivers/vhost/net.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/vhost/vhost.c b/trunk/drivers/vhost/vhost.c index 5be11c99e18f..7bd7a1e4409d 100644 --- a/trunk/drivers/vhost/vhost.c +++ b/trunk/drivers/vhost/vhost.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/video/68328fb.c b/trunk/drivers/video/68328fb.c index 75a39eab70c3..2110556f76b3 100644 --- a/trunk/drivers/video/68328fb.c +++ b/trunk/drivers/video/68328fb.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/acornfb.c b/trunk/drivers/video/acornfb.c index 82acb8dc4aa1..43d7d5067361 100644 --- a/trunk/drivers/video/acornfb.c +++ b/trunk/drivers/video/acornfb.c @@ -22,13 +22,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include diff --git a/trunk/drivers/video/amifb.c b/trunk/drivers/video/amifb.c index dca48df98444..82bedd7f7789 100644 --- a/trunk/drivers/video/amifb.c +++ b/trunk/drivers/video/amifb.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/arcfb.c b/trunk/drivers/video/arcfb.c index 8d406fb689c1..01554d696528 100644 --- a/trunk/drivers/video/arcfb.c +++ b/trunk/drivers/video/arcfb.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/asiliantfb.c b/trunk/drivers/video/asiliantfb.c index 8cdf88e20b4b..e70bc225fe31 100644 --- a/trunk/drivers/video/asiliantfb.c +++ b/trunk/drivers/video/asiliantfb.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/atafb.c b/trunk/drivers/video/atafb.c index f3aada20fa02..b7687c55fe16 100644 --- a/trunk/drivers/video/atafb.c +++ b/trunk/drivers/video/atafb.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 8dce25126330..11de3bfd4e54 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/video/aty/aty128fb.c b/trunk/drivers/video/aty/aty128fb.c index 34a0851bcbfa..a489be0c4614 100644 --- a/trunk/drivers/video/aty/aty128fb.c +++ b/trunk/drivers/video/aty/aty128fb.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/video/aty/mach64_cursor.c b/trunk/drivers/video/aty/mach64_cursor.c index 2ba8b3c421a1..04c710804bb0 100644 --- a/trunk/drivers/video/aty/mach64_cursor.c +++ b/trunk/drivers/video/aty/mach64_cursor.c @@ -2,6 +2,7 @@ * ATI Mach64 CT/VT/GT/LT Cursor Support */ +#include #include #include #include diff --git a/trunk/drivers/video/aty/radeon_backlight.c b/trunk/drivers/video/aty/radeon_backlight.c index 256966e9667d..9fc8c66be3ce 100644 --- a/trunk/drivers/video/aty/radeon_backlight.c +++ b/trunk/drivers/video/aty/radeon_backlight.c @@ -12,7 +12,6 @@ #include "radeonfb.h" #include -#include #ifdef CONFIG_PMAC_BACKLIGHT #include diff --git a/trunk/drivers/video/aty/radeon_monitor.c b/trunk/drivers/video/aty/radeon_monitor.c index 9261c918fde8..b4d4b88afc09 100644 --- a/trunk/drivers/video/aty/radeon_monitor.c +++ b/trunk/drivers/video/aty/radeon_monitor.c @@ -1,7 +1,4 @@ #include "radeonfb.h" - -#include - #include "../edid.h" static struct fb_var_screeninfo radeonfb_default_var = { diff --git a/trunk/drivers/video/au1100fb.c b/trunk/drivers/video/au1100fb.c index 40f61320ce16..a699aab63820 100644 --- a/trunk/drivers/video/au1100fb.c +++ b/trunk/drivers/video/au1100fb.c @@ -52,7 +52,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/video/au1200fb.c b/trunk/drivers/video/au1200fb.c index e77e8e4280fb..0d96f1d2d4c5 100644 --- a/trunk/drivers/video/au1200fb.c +++ b/trunk/drivers/video/au1200fb.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include "au1200fb.h" diff --git a/trunk/drivers/video/backlight/88pm860x_bl.c b/trunk/drivers/video/backlight/88pm860x_bl.c index 68d2518fadaa..93e25c77aeb2 100644 --- a/trunk/drivers/video/backlight/88pm860x_bl.c +++ b/trunk/drivers/video/backlight/88pm860x_bl.c @@ -16,7 +16,6 @@ #include #include #include -#include #define MAX_BRIGHTNESS (0xFF) #define MIN_BRIGHTNESS (0) diff --git a/trunk/drivers/video/backlight/adp5520_bl.c b/trunk/drivers/video/backlight/adp5520_bl.c index 9f436e014f85..5183f0e4d314 100644 --- a/trunk/drivers/video/backlight/adp5520_bl.c +++ b/trunk/drivers/video/backlight/adp5520_bl.c @@ -12,7 +12,6 @@ #include #include #include -#include struct adp5520_bl { struct device *master; diff --git a/trunk/drivers/video/backlight/adx_bl.c b/trunk/drivers/video/backlight/adx_bl.c index 7f4a7c30a98b..b0624b983889 100644 --- a/trunk/drivers/video/backlight/adx_bl.c +++ b/trunk/drivers/video/backlight/adx_bl.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/trunk/drivers/video/backlight/atmel-pwm-bl.c b/trunk/drivers/video/backlight/atmel-pwm-bl.c index e6a66dab088c..2d9760551a4b 100644 --- a/trunk/drivers/video/backlight/atmel-pwm-bl.c +++ b/trunk/drivers/video/backlight/atmel-pwm-bl.c @@ -17,7 +17,6 @@ #include #include #include -#include struct atmel_pwm_bl { const struct atmel_pwm_bl_platform_data *pdata; diff --git a/trunk/drivers/video/backlight/backlight.c b/trunk/drivers/video/backlight/backlight.c index e207810bba3c..68bb838b9f11 100644 --- a/trunk/drivers/video/backlight/backlight.c +++ b/trunk/drivers/video/backlight/backlight.c @@ -13,7 +13,6 @@ #include #include #include -#include #ifdef CONFIG_PMAC_BACKLIGHT #include diff --git a/trunk/drivers/video/backlight/corgi_lcd.c b/trunk/drivers/video/backlight/corgi_lcd.c index 1e71c35083bb..73bdd8454c94 100644 --- a/trunk/drivers/video/backlight/corgi_lcd.c +++ b/trunk/drivers/video/backlight/corgi_lcd.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) diff --git a/trunk/drivers/video/backlight/cr_bllcd.c b/trunk/drivers/video/backlight/cr_bllcd.c index a4f4546f0be0..1cce6031bff2 100644 --- a/trunk/drivers/video/backlight/cr_bllcd.c +++ b/trunk/drivers/video/backlight/cr_bllcd.c @@ -36,7 +36,6 @@ #include #include #include -#include /* The LVDS- and panel power controls sits on the * GPIO port of the ISA bridge. diff --git a/trunk/drivers/video/backlight/da903x_bl.c b/trunk/drivers/video/backlight/da903x_bl.c index 87659ed79bd7..686e4a789238 100644 --- a/trunk/drivers/video/backlight/da903x_bl.c +++ b/trunk/drivers/video/backlight/da903x_bl.c @@ -18,7 +18,6 @@ #include #include #include -#include #define DA9030_WLED_CONTROL 0x25 #define DA9030_WLED_CP_EN (1 << 6) diff --git a/trunk/drivers/video/backlight/ili9320.c b/trunk/drivers/video/backlight/ili9320.c index 5118a9f029ab..ba89b41b639c 100644 --- a/trunk/drivers/video/backlight/ili9320.c +++ b/trunk/drivers/video/backlight/ili9320.c @@ -17,7 +17,6 @@ #include #include #include -#include #include diff --git a/trunk/drivers/video/backlight/l4f00242t03.c b/trunk/drivers/video/backlight/l4f00242t03.c index bcdb12c93efd..74abd6994b09 100644 --- a/trunk/drivers/video/backlight/l4f00242t03.c +++ b/trunk/drivers/video/backlight/l4f00242t03.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/video/backlight/lcd.c b/trunk/drivers/video/backlight/lcd.c index 71a11cadffc4..9b3be74cee5a 100644 --- a/trunk/drivers/video/backlight/lcd.c +++ b/trunk/drivers/video/backlight/lcd.c @@ -13,7 +13,6 @@ #include #include #include -#include #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) diff --git a/trunk/drivers/video/backlight/lms283gf05.c b/trunk/drivers/video/backlight/lms283gf05.c index abc43a0eb97d..447b542a20ca 100644 --- a/trunk/drivers/video/backlight/lms283gf05.c +++ b/trunk/drivers/video/backlight/lms283gf05.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/video/backlight/ltv350qv.c b/trunk/drivers/video/backlight/ltv350qv.c index 8010aaeb5adb..4631ca8fa4a4 100644 --- a/trunk/drivers/video/backlight/ltv350qv.c +++ b/trunk/drivers/video/backlight/ltv350qv.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "ltv350qv.h" diff --git a/trunk/drivers/video/backlight/max8925_bl.c b/trunk/drivers/video/backlight/max8925_bl.c index b5accc957ad3..c91adaf492cf 100644 --- a/trunk/drivers/video/backlight/max8925_bl.c +++ b/trunk/drivers/video/backlight/max8925_bl.c @@ -16,7 +16,6 @@ #include #include #include -#include #define MAX_BRIGHTNESS (0xff) #define MIN_BRIGHTNESS (0) diff --git a/trunk/drivers/video/backlight/omap1_bl.c b/trunk/drivers/video/backlight/omap1_bl.c index d3bc56296c8d..333d28e6b062 100644 --- a/trunk/drivers/video/backlight/omap1_bl.c +++ b/trunk/drivers/video/backlight/omap1_bl.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/video/backlight/platform_lcd.c b/trunk/drivers/video/backlight/platform_lcd.c index 302330acf628..738694d23889 100644 --- a/trunk/drivers/video/backlight/platform_lcd.c +++ b/trunk/drivers/video/backlight/platform_lcd.c @@ -16,7 +16,6 @@ #include #include #include -#include #include