Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6

+4631 -2260
+3 -3
Documentation/block/biodoc.txt
··· 954 954 results in some sort of conflict internally, 955 955 this hook allows it to do that. 956 956 957 - elevator_dispatch_fn fills the dispatch queue with ready requests. 957 + elevator_dispatch_fn* fills the dispatch queue with ready requests. 958 958 I/O schedulers are free to postpone requests by 959 959 not filling the dispatch queue unless @force 960 960 is non-zero. Once dispatched, I/O schedulers 961 961 are not allowed to manipulate the requests - 962 962 they belong to generic dispatch queue. 963 963 964 - elevator_add_req_fn called to add a new request into the scheduler 964 + elevator_add_req_fn* called to add a new request into the scheduler 965 965 966 966 elevator_queue_empty_fn returns true if the merge queue is empty. 967 967 Drivers shouldn't use this, but rather check ··· 991 991 elevator_deactivate_req_fn Called when device driver decides to delay 992 992 a request by requeueing it. 993 993 994 - elevator_init_fn 994 + elevator_init_fn* 995 995 elevator_exit_fn Allocate and free any elevator specific storage 996 996 for a queue. 997 997
+63
Documentation/block/queue-sysfs.txt
··· 1 + Queue sysfs files 2 + ================= 3 + 4 + This text file will detail the queue files that are located in the sysfs tree 5 + for each block device. Note that stacked devices typically do not export 6 + any settings, since their queue merely functions are a remapping target. 7 + These files are the ones found in the /sys/block/xxx/queue/ directory. 8 + 9 + Files denoted with a RO postfix are readonly and the RW postfix means 10 + read-write. 11 + 12 + hw_sector_size (RO) 13 + ------------------- 14 + This is the hardware sector size of the device, in bytes. 15 + 16 + max_hw_sectors_kb (RO) 17 + ---------------------- 18 + This is the maximum number of kilobytes supported in a single data transfer. 19 + 20 + max_sectors_kb (RW) 21 + ------------------- 22 + This is the maximum number of kilobytes that the block layer will allow 23 + for a filesystem request. Must be smaller than or equal to the maximum 24 + size allowed by the hardware. 25 + 26 + nomerges (RW) 27 + ------------- 28 + This enables the user to disable the lookup logic involved with IO merging 29 + requests in the block layer. Merging may still occur through a direct 30 + 1-hit cache, since that comes for (almost) free. The IO scheduler will not 31 + waste cycles doing tree/hash lookups for merges if nomerges is 1. Defaults 32 + to 0, enabling all merges. 33 + 34 + nr_requests (RW) 35 + ---------------- 36 + This controls how many requests may be allocated in the block layer for 37 + read or write requests. Note that the total allocated number may be twice 38 + this amount, since it applies only to reads or writes (not the accumulated 39 + sum). 40 + 41 + read_ahead_kb (RW) 42 + ------------------ 43 + Maximum number of kilobytes to read-ahead for filesystems on this block 44 + device. 45 + 46 + rq_affinity (RW) 47 + ---------------- 48 + If this option is enabled, the block layer will migrate request completions 49 + to the CPU that originally submitted the request. For some workloads 50 + this provides a significant reduction in CPU cycles due to caching effects. 51 + 52 + scheduler (RW) 53 + -------------- 54 + When read, this file will display the current and available IO schedulers 55 + for this block device. The currently active IO scheduler will be enclosed 56 + in [] brackets. Writing an IO scheduler name to this file will switch 57 + control of this block device to that new IO scheduler. Note that writing 58 + an IO scheduler name to this file will attempt to load that IO scheduler 59 + module, if it isn't already present in the system. 60 + 61 + 62 + 63 + Jens Axboe <jens.axboe@oracle.com>, February 2009
+6 -19
Documentation/networking/alias.txt
··· 2 2 IP-Aliasing: 3 3 ============ 4 4 5 - IP-aliases are additional IP-addresses/masks hooked up to a base 6 - interface by adding a colon and a string when running ifconfig. 5 + IP-aliases are an obsolete way to manage multiple IP-addresses/masks 6 + per interface. Newer tools such as iproute2 support multiple 7 + address/prefixes per interface, but aliases are still supported 8 + for backwards compatibility. 9 + 10 + An alias is formed by adding a colon and a string when running ifconfig. 7 11 This string is usually numeric, but this is not a must. 8 - 9 - IP-Aliases are avail if CONFIG_INET (`standard' IPv4 networking) 10 - is configured in the kernel. 11 - 12 12 13 13 o Alias creation. 14 14 Alias creation is done by 'magic' interface naming: eg. to create a ··· 38 38 39 39 If the base device is shut down the added aliases will be deleted 40 40 too. 41 - 42 - 43 - Contact 44 - ------- 45 - Please finger or e-mail me: 46 - Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar> 47 - 48 - Updated by Erik Schoenfelder <schoenfr@gaertner.DE> 49 - 50 - ; local variables: 51 - ; mode: indented-text 52 - ; mode: auto-fill 53 - ; end:
+180
Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
··· 1 + MPC5200 Device Tree Bindings 2 + ---------------------------- 3 + 4 + (c) 2006-2009 Secret Lab Technologies Ltd 5 + Grant Likely <grant.likely@secretlab.ca> 6 + 7 + Naming conventions 8 + ------------------ 9 + For mpc5200 on-chip devices, the format for each compatible value is 10 + <chip>-<device>[-<mode>]. The OS should be able to match a device driver 11 + to the device based solely on the compatible value. If two drivers 12 + match on the compatible list; the 'most compatible' driver should be 13 + selected. 14 + 15 + The split between the MPC5200 and the MPC5200B leaves a bit of a 16 + conundrum. How should the compatible property be set up to provide 17 + maximum compatibility information; but still accurately describe the 18 + chip? For the MPC5200; the answer is easy. Most of the SoC devices 19 + originally appeared on the MPC5200. Since they didn't exist anywhere 20 + else; the 5200 compatible properties will contain only one item; 21 + "fsl,mpc5200-<device>". 22 + 23 + The 5200B is almost the same as the 5200, but not quite. It fixes 24 + silicon bugs and it adds a small number of enhancements. Most of the 25 + devices either provide exactly the same interface as on the 5200. A few 26 + devices have extra functions but still have a backwards compatible mode. 27 + To express this information as completely as possible, 5200B device trees 28 + should have two items in the compatible list: 29 + compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>"; 30 + 31 + It is *strongly* recommended that 5200B device trees follow this convention 32 + (instead of only listing the base mpc5200 item). 33 + 34 + ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec"; 35 + ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec"; 36 + 37 + Modal devices, like PSCs, also append the configured function to the 38 + end of the compatible field. ie. A PSC in i2s mode would specify 39 + "fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s". This convention is chosen to 40 + avoid naming conflicts with non-psc devices providing the same 41 + function. For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe 42 + the mpc5200 simple spi device and a PSC spi mode respectively. 43 + 44 + At the time of writing, exact chip may be either 'fsl,mpc5200' or 45 + 'fsl,mpc5200b'. 46 + 47 + The soc node 48 + ------------ 49 + This node describes the on chip SOC peripherals. Every mpc5200 based 50 + board will have this node, and as such there is a common naming 51 + convention for SOC devices. 52 + 53 + Required properties: 54 + name description 55 + ---- ----------- 56 + ranges Memory range of the internal memory mapped registers. 57 + Should be <0 [baseaddr] 0xc000> 58 + reg Should be <[baseaddr] 0x100> 59 + compatible mpc5200: "fsl,mpc5200-immr" 60 + mpc5200b: "fsl,mpc5200b-immr" 61 + system-frequency 'fsystem' frequency in Hz; XLB, IPB, USB and PCI 62 + clocks are derived from the fsystem clock. 63 + bus-frequency IPB bus frequency in Hz. Clock rate 64 + used by most of the soc devices. 65 + 66 + soc child nodes 67 + --------------- 68 + Any on chip SOC devices available to Linux must appear as soc5200 child nodes. 69 + 70 + Note: The tables below show the value for the mpc5200. A mpc5200b device 71 + tree should use the "fsl,mpc5200b-<device>","fsl,mpc5200-<device>" form. 72 + 73 + Required soc5200 child nodes: 74 + name compatible Description 75 + ---- ---------- ----------- 76 + cdm@<addr> fsl,mpc5200-cdm Clock Distribution 77 + interrupt-controller@<addr> fsl,mpc5200-pic need an interrupt 78 + controller to boot 79 + bestcomm@<addr> fsl,mpc5200-bestcomm Bestcomm DMA controller 80 + 81 + Recommended soc5200 child nodes; populate as needed for your board 82 + name compatible Description 83 + ---- ---------- ----------- 84 + timer@<addr> fsl,mpc5200-gpt General purpose timers 85 + gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio controller 86 + gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio controller 87 + rtc@<addr> fsl,mpc5200-rtc Real time clock 88 + mscan@<addr> fsl,mpc5200-mscan CAN bus controller 89 + pci@<addr> fsl,mpc5200-pci PCI bridge 90 + serial@<addr> fsl,mpc5200-psc-uart PSC in serial mode 91 + i2s@<addr> fsl,mpc5200-psc-i2s PSC in i2s mode 92 + ac97@<addr> fsl,mpc5200-psc-ac97 PSC in ac97 mode 93 + spi@<addr> fsl,mpc5200-psc-spi PSC in spi mode 94 + irda@<addr> fsl,mpc5200-psc-irda PSC in IrDA mode 95 + spi@<addr> fsl,mpc5200-spi MPC5200 spi device 96 + ethernet@<addr> fsl,mpc5200-fec MPC5200 ethernet device 97 + ata@<addr> fsl,mpc5200-ata IDE ATA interface 98 + i2c@<addr> fsl,mpc5200-i2c I2C controller 99 + usb@<addr> fsl,mpc5200-ohci,ohci-be USB controller 100 + xlb@<addr> fsl,mpc5200-xlb XLB arbitrator 101 + 102 + fsl,mpc5200-gpt nodes 103 + --------------------- 104 + On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board 105 + design supports the internal wdt, then the device node for GPT0 should 106 + include the empty property 'fsl,has-wdt'. 107 + 108 + An mpc5200-gpt can be used as a single line GPIO controller. To do so, 109 + add the following properties to the gpt node: 110 + gpio-controller; 111 + #gpio-cells = <2>; 112 + When referencing the GPIO line from another node, the first cell must always 113 + be zero and the second cell represents the gpio flags and described in the 114 + gpio device tree binding. 115 + 116 + An mpc5200-gpt can be used as a single line edge sensitive interrupt 117 + controller. To do so, add the following properties to the gpt node: 118 + interrupt-controller; 119 + #interrupt-cells = <1>; 120 + When referencing the IRQ line from another node, the cell represents the 121 + sense mode; 1 for edge rising, 2 for edge falling. 122 + 123 + fsl,mpc5200-psc nodes 124 + --------------------- 125 + The PSCs should include a cell-index which is the index of the PSC in 126 + hardware. cell-index is used to determine which shared SoC registers to 127 + use when setting up PSC clocking. cell-index number starts at '0'. ie: 128 + PSC1 has 'cell-index = <0>' 129 + PSC4 has 'cell-index = <3>' 130 + 131 + PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in 132 + i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the 133 + compatible field. 134 + 135 + 136 + fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes 137 + ------------------------------------------------ 138 + Each GPIO controller node should have the empty property gpio-controller and 139 + #gpio-cells set to 2. First cell is the GPIO number which is interpreted 140 + according to the bit numbers in the GPIO control registers. The second cell 141 + is for flags which is currently unused. 142 + 143 + fsl,mpc5200-fec nodes 144 + --------------------- 145 + The FEC node can specify one of the following properties to configure 146 + the MII link: 147 + - fsl,7-wire-mode - An empty property that specifies the link uses 7-wire 148 + mode instead of MII 149 + - current-speed - Specifies that the MII should be configured for a fixed 150 + speed. This property should contain two cells. The 151 + first cell specifies the speed in Mbps and the second 152 + should be '0' for half duplex and '1' for full duplex 153 + - phy-handle - Contains a phandle to an Ethernet PHY. 154 + 155 + Interrupt controller (fsl,mpc5200-pic) node 156 + ------------------------------------------- 157 + The mpc5200 pic binding splits hardware IRQ numbers into two levels. The 158 + split reflects the layout of the PIC hardware itself, which groups 159 + interrupts into one of three groups; CRIT, MAIN or PERP. Also, the 160 + Bestcomm dma engine has it's own set of interrupt sources which are 161 + cascaded off of peripheral interrupt 0, which the driver interprets as a 162 + fourth group, SDMA. 163 + 164 + The interrupts property for device nodes using the mpc5200 pic consists 165 + of three cells; <L1 L2 level> 166 + 167 + L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3] 168 + L2 := interrupt number; directly mapped from the value in the 169 + "ICTL PerStat, MainStat, CritStat Encoded Register" 170 + level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3] 171 + 172 + For external IRQs, use the following interrupt property values (how to 173 + specify external interrupts is a frequently asked question): 174 + External interrupts: 175 + external irq0: interrupts = <0 0 n>; 176 + external irq1: interrupts = <1 1 n>; 177 + external irq2: interrupts = <1 2 n>; 178 + external irq3: interrupts = <1 3 n>; 179 + 'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low) 180 +
-277
Documentation/powerpc/mpc52xx-device-tree-bindings.txt
··· 1 - MPC5200 Device Tree Bindings 2 - ---------------------------- 3 - 4 - (c) 2006-2007 Secret Lab Technologies Ltd 5 - Grant Likely <grant.likely at secretlab.ca> 6 - 7 - ********** DRAFT *********** 8 - * WARNING: Do not depend on the stability of these bindings just yet. 9 - * The MPC5200 device tree conventions are still in flux 10 - * Keep an eye on the linuxppc-dev mailing list for more details 11 - ********** DRAFT *********** 12 - 13 - I - Introduction 14 - ================ 15 - Boards supported by the arch/powerpc architecture require device tree be 16 - passed by the boot loader to the kernel at boot time. The device tree 17 - describes what devices are present on the board and how they are 18 - connected. The device tree can either be passed as a binary blob (as 19 - described in Documentation/powerpc/booting-without-of.txt), or passed 20 - by Open Firmware (IEEE 1275) compatible firmware using an OF compatible 21 - client interface API. 22 - 23 - This document specifies the requirements on the device-tree for mpc5200 24 - based boards. These requirements are above and beyond the details 25 - specified in either the Open Firmware spec or booting-without-of.txt 26 - 27 - All new mpc5200-based boards are expected to match this document. In 28 - cases where this document is not sufficient to support a new board port, 29 - this document should be updated as part of adding the new board support. 30 - 31 - II - Philosophy 32 - =============== 33 - The core of this document is naming convention. The whole point of 34 - defining this convention is to reduce or eliminate the number of 35 - special cases required to support a 5200 board. If all 5200 boards 36 - follow the same convention, then generic 5200 support code will work 37 - rather than coding special cases for each new board. 38 - 39 - This section tries to capture the thought process behind why the naming 40 - convention is what it is. 41 - 42 - 1. names 43 - --------- 44 - There is strong convention/requirements already established for children 45 - of the root node. 'cpus' describes the processor cores, 'memory' 46 - describes memory, and 'chosen' provides boot configuration. Other nodes 47 - are added to describe devices attached to the processor local bus. 48 - 49 - Following convention already established with other system-on-chip 50 - processors, 5200 device trees should use the name 'soc5200' for the 51 - parent node of on chip devices, and the root node should be its parent. 52 - 53 - Child nodes are typically named after the configured function. ie. 54 - the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'. 55 - 56 - 2. device_type property 57 - ----------------------- 58 - similar to the node name convention above; the device_type reflects the 59 - configured function of a device. ie. 'serial' for a uart and 'spi' for 60 - an spi controller. However, while node names *should* reflect the 61 - configured function, device_type *must* match the configured function 62 - exactly. 63 - 64 - 3. compatible property 65 - ---------------------- 66 - Since device_type isn't enough to match devices to drivers, there also 67 - needs to be a naming convention for the compatible property. Compatible 68 - is an list of device descriptions sorted from specific to generic. For 69 - the mpc5200, the required format for each compatible value is 70 - <chip>-<device>[-<mode>]. The OS should be able to match a device driver 71 - to the device based solely on the compatible value. If two drivers 72 - match on the compatible list; the 'most compatible' driver should be 73 - selected. 74 - 75 - The split between the MPC5200 and the MPC5200B leaves a bit of a 76 - conundrum. How should the compatible property be set up to provide 77 - maximum compatibility information; but still accurately describe the 78 - chip? For the MPC5200; the answer is easy. Most of the SoC devices 79 - originally appeared on the MPC5200. Since they didn't exist anywhere 80 - else; the 5200 compatible properties will contain only one item; 81 - "mpc5200-<device>". 82 - 83 - The 5200B is almost the same as the 5200, but not quite. It fixes 84 - silicon bugs and it adds a small number of enhancements. Most of the 85 - devices either provide exactly the same interface as on the 5200. A few 86 - devices have extra functions but still have a backwards compatible mode. 87 - To express this information as completely as possible, 5200B device trees 88 - should have two items in the compatible list; 89 - "mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended 90 - that 5200B device trees follow this convention (instead of only listing 91 - the base mpc5200 item). 92 - 93 - If another chip appear on the market with one of the mpc5200 SoC 94 - devices, then the compatible list should include mpc5200-<device>. 95 - 96 - ie. ethernet on mpc5200: compatible = "mpc5200-ethernet" 97 - ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet" 98 - 99 - Modal devices, like PSCs, also append the configured function to the 100 - end of the compatible field. ie. A PSC in i2s mode would specify 101 - "mpc5200-psc-i2s", not "mpc5200-i2s". This convention is chosen to 102 - avoid naming conflicts with non-psc devices providing the same 103 - function. For example, "mpc5200-spi" and "mpc5200-psc-spi" describe 104 - the mpc5200 simple spi device and a PSC spi mode respectively. 105 - 106 - If the soc device is more generic and present on other SOCs, the 107 - compatible property can specify the more generic device type also. 108 - 109 - ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan"; 110 - 111 - At the time of writing, exact chip may be either 'mpc5200' or 112 - 'mpc5200b'. 113 - 114 - Device drivers should always try to match as generically as possible. 115 - 116 - III - Structure 117 - =============== 118 - The device tree for an mpc5200 board follows the structure defined in 119 - booting-without-of.txt with the following additional notes: 120 - 121 - 0) the root node 122 - ---------------- 123 - Typical root description node; see booting-without-of 124 - 125 - 1) The cpus node 126 - ---------------- 127 - The cpus node follows the basic layout described in booting-without-of. 128 - The bus-frequency property holds the XLB bus frequency 129 - The clock-frequency property holds the core frequency 130 - 131 - 2) The memory node 132 - ------------------ 133 - Typical memory description node; see booting-without-of. 134 - 135 - 3) The soc5200 node 136 - ------------------- 137 - This node describes the on chip SOC peripherals. Every mpc5200 based 138 - board will have this node, and as such there is a common naming 139 - convention for SOC devices. 140 - 141 - Required properties: 142 - name type description 143 - ---- ---- ----------- 144 - device_type string must be "soc" 145 - ranges int should be <0 baseaddr baseaddr+10000> 146 - reg int must be <baseaddr 10000> 147 - compatible string mpc5200: "mpc5200-soc" 148 - mpc5200b: "mpc5200b-soc\0mpc5200-soc" 149 - system-frequency int Fsystem frequency; source of all 150 - other clocks. 151 - bus-frequency int IPB bus frequency in HZ. Clock rate 152 - used by most of the soc devices. 153 - #interrupt-cells int must be <3>. 154 - 155 - Recommended properties: 156 - name type description 157 - ---- ---- ----------- 158 - model string Exact model of the chip; 159 - ie: model="fsl,mpc5200" 160 - revision string Silicon revision of chip 161 - ie: revision="M08A" 162 - 163 - The 'model' and 'revision' properties are *strongly* recommended. Having 164 - them presence acts as a bit of a safety net for working around as yet 165 - undiscovered bugs on one version of silicon. For example, device drivers 166 - can use the model and revision properties to decide if a bug fix should 167 - be turned on. 168 - 169 - 4) soc5200 child nodes 170 - ---------------------- 171 - Any on chip SOC devices available to Linux must appear as soc5200 child nodes. 172 - 173 - Note: The tables below show the value for the mpc5200. A mpc5200b device 174 - tree should use the "mpc5200b-<device>\0mpc5200-<device> form. 175 - 176 - Required soc5200 child nodes: 177 - name device_type compatible Description 178 - ---- ----------- ---------- ----------- 179 - cdm@<addr> cdm mpc5200-cmd Clock Distribution 180 - pic@<addr> interrupt-controller mpc5200-pic need an interrupt 181 - controller to boot 182 - bestcomm@<addr> dma-controller mpc5200-bestcomm 5200 pic also requires 183 - the bestcomm device 184 - 185 - Recommended soc5200 child nodes; populate as needed for your board 186 - name device_type compatible Description 187 - ---- ----------- ---------- ----------- 188 - gpt@<addr> gpt fsl,mpc5200-gpt General purpose timers 189 - gpt@<addr> gpt fsl,mpc5200-gpt-gpio General purpose 190 - timers in GPIO mode 191 - gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio 192 - controller 193 - gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio 194 - controller 195 - rtc@<addr> rtc mpc5200-rtc Real time clock 196 - mscan@<addr> mscan mpc5200-mscan CAN bus controller 197 - pci@<addr> pci mpc5200-pci PCI bridge 198 - serial@<addr> serial mpc5200-psc-uart PSC in serial mode 199 - i2s@<addr> sound mpc5200-psc-i2s PSC in i2s mode 200 - ac97@<addr> sound mpc5200-psc-ac97 PSC in ac97 mode 201 - spi@<addr> spi mpc5200-psc-spi PSC in spi mode 202 - irda@<addr> irda mpc5200-psc-irda PSC in IrDA mode 203 - spi@<addr> spi mpc5200-spi MPC5200 spi device 204 - ethernet@<addr> network mpc5200-fec MPC5200 ethernet device 205 - ata@<addr> ata mpc5200-ata IDE ATA interface 206 - i2c@<addr> i2c mpc5200-i2c I2C controller 207 - usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller 208 - xlb@<addr> xlb mpc5200-xlb XLB arbitrator 209 - 210 - Important child node properties 211 - name type description 212 - ---- ---- ----------- 213 - cell-index int When multiple devices are present, is the 214 - index of the device in the hardware (ie. There 215 - are 6 PSC on the 5200 numbered PSC1 to PSC6) 216 - PSC1 has 'cell-index = <0>' 217 - PSC4 has 'cell-index = <3>' 218 - 219 - 5) General Purpose Timer nodes (child of soc5200 node) 220 - On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board 221 - design supports the internal wdt, then the device node for GPT0 should 222 - include the empty property 'fsl,has-wdt'. 223 - 224 - 6) PSC nodes (child of soc5200 node) 225 - PSC nodes can define the optional 'port-number' property to force assignment 226 - order of serial ports. For example, PSC5 might be physically connected to 227 - the port labeled 'COM1' and PSC1 wired to 'COM1'. In this case, PSC5 would 228 - have a "port-number = <0>" property, and PSC1 would have "port-number = <1>". 229 - 230 - PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in 231 - i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the 232 - compatible field. 233 - 234 - 7) GPIO controller nodes 235 - Each GPIO controller node should have the empty property gpio-controller and 236 - #gpio-cells set to 2. First cell is the GPIO number which is interpreted 237 - according to the bit numbers in the GPIO control registers. The second cell 238 - is for flags which is currently unsused. 239 - 240 - 8) FEC nodes 241 - The FEC node can specify one of the following properties to configure 242 - the MII link: 243 - "fsl,7-wire-mode" - An empty property that specifies the link uses 7-wire 244 - mode instead of MII 245 - "current-speed" - Specifies that the MII should be configured for a fixed 246 - speed. This property should contain two cells. The 247 - first cell specifies the speed in Mbps and the second 248 - should be '0' for half duplex and '1' for full duplex 249 - "phy-handle" - Contains a phandle to an Ethernet PHY. 250 - 251 - IV - Extra Notes 252 - ================ 253 - 254 - 1. Interrupt mapping 255 - -------------------- 256 - The mpc5200 pic driver splits hardware IRQ numbers into two levels. The 257 - split reflects the layout of the PIC hardware itself, which groups 258 - interrupts into one of three groups; CRIT, MAIN or PERP. Also, the 259 - Bestcomm dma engine has it's own set of interrupt sources which are 260 - cascaded off of peripheral interrupt 0, which the driver interprets as a 261 - fourth group, SDMA. 262 - 263 - The interrupts property for device nodes using the mpc5200 pic consists 264 - of three cells; <L1 L2 level> 265 - 266 - L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3] 267 - L2 := interrupt number; directly mapped from the value in the 268 - "ICTL PerStat, MainStat, CritStat Encoded Register" 269 - level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3] 270 - 271 - 2. Shared registers 272 - ------------------- 273 - Some SoC devices share registers between them. ie. the i2c devices use 274 - a single clock control register, and almost all device are affected by 275 - the port_config register. Devices which need to manipulate shared regs 276 - should look to the parent SoC node. The soc node is responsible 277 - for arbitrating all shared register access.
+17 -8
Documentation/video4linux/v4lgrab.c
··· 4 4 * 5 5 * Compile with: 6 6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab 7 - * Use as: 8 - * v4lgrab >image.ppm 7 + * Use as: 8 + * v4lgrab >image.ppm 9 9 * 10 10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> 11 - * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c 12 - * with minor modifications (Dave Forrest, drf5n@virginia.edu). 11 + * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c 12 + * with minor modifications (Dave Forrest, drf5n@virginia.edu). 13 + * 14 + * 15 + * For some cameras you may need to pre-load libv4l to perform 16 + * the necessary decompression, e.g.: 17 + * 18 + * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so 19 + * ./v4lgrab >image.ppm 20 + * 21 + * see http://hansdegoede.livejournal.com/3636.html for details. 13 22 * 14 23 */ 15 24 ··· 33 24 #include <linux/types.h> 34 25 #include <linux/videodev.h> 35 26 36 - #define FILE "/dev/video0" 27 + #define VIDEO_DEV "/dev/video0" 37 28 38 29 /* Stole this from tvset.c */ 39 30 ··· 99 90 100 91 int main(int argc, char ** argv) 101 92 { 102 - int fd = open(FILE, O_RDONLY), f; 93 + int fd = open(VIDEO_DEV, O_RDONLY), f; 103 94 struct video_capability cap; 104 95 struct video_window win; 105 96 struct video_picture vpic; ··· 109 100 unsigned int i, src_depth; 110 101 111 102 if (fd < 0) { 112 - perror(FILE); 103 + perror(VIDEO_DEV); 113 104 exit(1); 114 105 } 115 106 116 107 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { 117 108 perror("VIDIOGCAP"); 118 - fprintf(stderr, "(" FILE " not a video4linux device?)\n"); 109 + fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n"); 119 110 close(fd); 120 111 exit(1); 121 112 }
-2
MAINTAINERS
··· 2836 2836 MAC80211 2837 2837 P: Johannes Berg 2838 2838 M: johannes@sipsolutions.net 2839 - P: Michael Wu 2840 - M: flamingice@sourmilk.net 2841 2839 L: linux-wireless@vger.kernel.org 2842 2840 W: http://linuxwireless.org/ 2843 2841 T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
+36
arch/arm/plat-mxc/include/mach/mmc.h
··· 1 + #ifndef ASMARM_ARCH_MMC_H 2 + #define ASMARM_ARCH_MMC_H 3 + 4 + #include <linux/mmc/host.h> 5 + 6 + struct device; 7 + 8 + /* board specific SDHC data, optional. 9 + * If not present, a writable card with 3,3V is assumed. 10 + */ 11 + struct imxmmc_platform_data { 12 + /* Return values for the get_ro callback should be: 13 + * 0 for a read/write card 14 + * 1 for a read-only card 15 + * -ENOSYS when not supported (equal to NULL callback) 16 + * or a negative errno value when something bad happened 17 + */ 18 + int (*get_ro)(struct device *); 19 + 20 + /* board specific hook to (de)initialize the SD slot. 21 + * The board code can call 'handler' on a card detection 22 + * change giving data as argument. 23 + */ 24 + int (*init)(struct device *dev, irq_handler_t handler, void *data); 25 + void (*exit)(struct device *dev, void *data); 26 + 27 + /* available voltages. If not given, assume 28 + * MMC_VDD_32_33 | MMC_VDD_33_34 29 + */ 30 + unsigned int ocr_avail; 31 + 32 + /* adjust slot voltage */ 33 + void (*setpower)(struct device *, unsigned int vdd); 34 + }; 35 + 36 + #endif
+2 -5
arch/mips/Kconfig
··· 351 351 select ARC64 352 352 select BOOT_ELF64 353 353 select DEFAULT_SGI_PARTITION 354 - select DMA_IP27 354 + select DMA_COHERENT 355 355 select SYS_HAS_EARLY_PRINTK 356 356 select HW_HAS_PCI 357 357 select NR_CPUS_DEFAULT_64 ··· 759 759 bool 760 760 761 761 config DMA_COHERENT 762 - bool 763 - 764 - config DMA_IP27 765 762 bool 766 763 767 764 config DMA_NONCOHERENT ··· 1365 1368 # 1366 1369 config HARDWARE_WATCHPOINTS 1367 1370 bool 1368 - default y if CPU_MIPS32 || CPU_MIPS64 1371 + default y if CPU_MIPSR1 || CPU_MIPSR2 1369 1372 1370 1373 menu "Kernel type" 1371 1374
+1 -1
arch/mips/alchemy/common/time.c
··· 89 89 .irq = AU1000_RTC_MATCH2_INT, 90 90 .set_next_event = au1x_rtcmatch2_set_next_event, 91 91 .set_mode = au1x_rtcmatch2_set_mode, 92 - .cpumask = CPU_MASK_ALL, 92 + .cpumask = CPU_MASK_ALL_PTR, 93 93 }; 94 94 95 95 static struct irqaction au1x_rtcmatch2_irqaction = {
-2
arch/mips/cavium-octeon/setup.c
··· 15 15 #include <linux/serial.h> 16 16 #include <linux/types.h> 17 17 #include <linux/string.h> /* for memset */ 18 - #include <linux/serial.h> 19 18 #include <linux/tty.h> 20 19 #include <linux/time.h> 21 20 #include <linux/platform_device.h> 22 21 #include <linux/serial_core.h> 23 22 #include <linux/serial_8250.h> 24 - #include <linux/string.h> 25 23 26 24 #include <asm/processor.h> 27 25 #include <asm/reboot.h>
+1 -1
arch/mips/configs/ip27_defconfig
··· 53 53 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 54 54 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 55 55 CONFIG_ARC=y 56 - CONFIG_DMA_IP27=y 56 + CONFIG_DMA_COHERENT=y 57 57 CONFIG_EARLY_PRINTK=y 58 58 CONFIG_SYS_HAS_EARLY_PRINTK=y 59 59 # CONFIG_NO_IOPORT is not set
+26 -26
arch/mips/include/asm/atomic.h
··· 50 50 static __inline__ void atomic_add(int i, atomic_t * v) 51 51 { 52 52 if (cpu_has_llsc && R10000_LLSC_WAR) { 53 - unsigned long temp; 53 + int temp; 54 54 55 55 __asm__ __volatile__( 56 56 " .set mips3 \n" ··· 62 62 : "=&r" (temp), "=m" (v->counter) 63 63 : "Ir" (i), "m" (v->counter)); 64 64 } else if (cpu_has_llsc) { 65 - unsigned long temp; 65 + int temp; 66 66 67 67 __asm__ __volatile__( 68 68 " .set mips3 \n" ··· 95 95 static __inline__ void atomic_sub(int i, atomic_t * v) 96 96 { 97 97 if (cpu_has_llsc && R10000_LLSC_WAR) { 98 - unsigned long temp; 98 + int temp; 99 99 100 100 __asm__ __volatile__( 101 101 " .set mips3 \n" ··· 107 107 : "=&r" (temp), "=m" (v->counter) 108 108 : "Ir" (i), "m" (v->counter)); 109 109 } else if (cpu_has_llsc) { 110 - unsigned long temp; 110 + int temp; 111 111 112 112 __asm__ __volatile__( 113 113 " .set mips3 \n" ··· 135 135 */ 136 136 static __inline__ int atomic_add_return(int i, atomic_t * v) 137 137 { 138 - unsigned long result; 138 + int result; 139 139 140 140 smp_llsc_mb(); 141 141 142 142 if (cpu_has_llsc && R10000_LLSC_WAR) { 143 - unsigned long temp; 143 + int temp; 144 144 145 145 __asm__ __volatile__( 146 146 " .set mips3 \n" ··· 154 154 : "Ir" (i), "m" (v->counter) 155 155 : "memory"); 156 156 } else if (cpu_has_llsc) { 157 - unsigned long temp; 157 + int temp; 158 158 159 159 __asm__ __volatile__( 160 160 " .set mips3 \n" ··· 187 187 188 188 static __inline__ int atomic_sub_return(int i, atomic_t * v) 189 189 { 190 - unsigned long result; 190 + int result; 191 191 192 192 smp_llsc_mb(); 193 193 194 194 if (cpu_has_llsc && R10000_LLSC_WAR) { 195 - unsigned long temp; 195 + int temp; 196 196 197 197 __asm__ __volatile__( 198 198 " .set mips3 \n" ··· 206 206 : "Ir" (i), "m" (v->counter) 207 207 : "memory"); 208 208 } else if (cpu_has_llsc) { 209 - unsigned long temp; 209 + int temp; 210 210 211 211 __asm__ __volatile__( 212 212 " .set mips3 \n" ··· 247 247 */ 248 248 static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) 249 249 { 250 - unsigned long result; 250 + int result; 251 251 252 252 smp_llsc_mb(); 253 253 254 254 if (cpu_has_llsc && R10000_LLSC_WAR) { 255 - unsigned long temp; 255 + int temp; 256 256 257 257 __asm__ __volatile__( 258 258 " .set mips3 \n" ··· 270 270 : "Ir" (i), "m" (v->counter) 271 271 : "memory"); 272 272 } else if (cpu_has_llsc) { 273 - unsigned long temp; 273 + int temp; 274 274 275 275 __asm__ __volatile__( 276 276 " .set mips3 \n" ··· 429 429 static __inline__ void atomic64_add(long i, atomic64_t * v) 430 430 { 431 431 if (cpu_has_llsc && R10000_LLSC_WAR) { 432 - unsigned long temp; 432 + long temp; 433 433 434 434 __asm__ __volatile__( 435 435 " .set mips3 \n" ··· 441 441 : "=&r" (temp), "=m" (v->counter) 442 442 : "Ir" (i), "m" (v->counter)); 443 443 } else if (cpu_has_llsc) { 444 - unsigned long temp; 444 + long temp; 445 445 446 446 __asm__ __volatile__( 447 447 " .set mips3 \n" ··· 474 474 static __inline__ void atomic64_sub(long i, atomic64_t * v) 475 475 { 476 476 if (cpu_has_llsc && R10000_LLSC_WAR) { 477 - unsigned long temp; 477 + long temp; 478 478 479 479 __asm__ __volatile__( 480 480 " .set mips3 \n" ··· 486 486 : "=&r" (temp), "=m" (v->counter) 487 487 : "Ir" (i), "m" (v->counter)); 488 488 } else if (cpu_has_llsc) { 489 - unsigned long temp; 489 + long temp; 490 490 491 491 __asm__ __volatile__( 492 492 " .set mips3 \n" ··· 514 514 */ 515 515 static __inline__ long atomic64_add_return(long i, atomic64_t * v) 516 516 { 517 - unsigned long result; 517 + long result; 518 518 519 519 smp_llsc_mb(); 520 520 521 521 if (cpu_has_llsc && R10000_LLSC_WAR) { 522 - unsigned long temp; 522 + long temp; 523 523 524 524 __asm__ __volatile__( 525 525 " .set mips3 \n" ··· 533 533 : "Ir" (i), "m" (v->counter) 534 534 : "memory"); 535 535 } else if (cpu_has_llsc) { 536 - unsigned long temp; 536 + long temp; 537 537 538 538 __asm__ __volatile__( 539 539 " .set mips3 \n" ··· 566 566 567 567 static __inline__ long atomic64_sub_return(long i, atomic64_t * v) 568 568 { 569 - unsigned long result; 569 + long result; 570 570 571 571 smp_llsc_mb(); 572 572 573 573 if (cpu_has_llsc && R10000_LLSC_WAR) { 574 - unsigned long temp; 574 + long temp; 575 575 576 576 __asm__ __volatile__( 577 577 " .set mips3 \n" ··· 585 585 : "Ir" (i), "m" (v->counter) 586 586 : "memory"); 587 587 } else if (cpu_has_llsc) { 588 - unsigned long temp; 588 + long temp; 589 589 590 590 __asm__ __volatile__( 591 591 " .set mips3 \n" ··· 626 626 */ 627 627 static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) 628 628 { 629 - unsigned long result; 629 + long result; 630 630 631 631 smp_llsc_mb(); 632 632 633 633 if (cpu_has_llsc && R10000_LLSC_WAR) { 634 - unsigned long temp; 634 + long temp; 635 635 636 636 __asm__ __volatile__( 637 637 " .set mips3 \n" ··· 649 649 : "Ir" (i), "m" (v->counter) 650 650 : "memory"); 651 651 } else if (cpu_has_llsc) { 652 - unsigned long temp; 652 + long temp; 653 653 654 654 __asm__ __volatile__( 655 655 " .set mips3 \n"
+1 -4
arch/mips/include/asm/mach-rc32434/gpio.h
··· 80 80 /* Compact Flash GPIO pin */ 81 81 #define CF_GPIO_NUM 13 82 82 83 - extern void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned val); 84 - extern unsigned get_434_reg(unsigned reg_offs); 85 - extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); 86 - extern unsigned char get_latch_u5(void); 87 83 extern void rb532_gpio_set_ilevel(int bit, unsigned gpio); 88 84 extern void rb532_gpio_set_istat(int bit, unsigned gpio); 85 + extern void rb532_gpio_set_func(unsigned gpio); 89 86 90 87 #endif /* _RC32434_GPIO_H_ */
+3
arch/mips/include/asm/mach-rc32434/irq.h
··· 30 30 #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) 31 31 #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) 32 32 33 + #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE 34 + #define GPIO_MAPPED_IRQ_GROUP 4 35 + 33 36 #endif /* __ASM_RC32434_IRQ_H */
+3
arch/mips/include/asm/mach-rc32434/rb.h
··· 83 83 void __iomem *base; 84 84 }; 85 85 86 + extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); 87 + extern unsigned char get_latch_u5(void); 88 + 86 89 #endif /* __ASM_RC32434_RB_H */
+1 -1
arch/mips/include/asm/ptrace.h
··· 105 105 enum pt_watch_style style; 106 106 union { 107 107 struct mips32_watch_regs mips32; 108 - struct mips32_watch_regs mips64; 108 + struct mips64_watch_regs mips64; 109 109 }; 110 110 }; 111 111
+71 -27
arch/mips/include/asm/termios.h
··· 9 9 #ifndef _ASM_TERMIOS_H 10 10 #define _ASM_TERMIOS_H 11 11 12 + #include <linux/errno.h> 12 13 #include <asm/termbits.h> 13 14 #include <asm/ioctls.h> 14 15 ··· 95 94 /* 96 95 * Translate a "termio" structure into a "termios". Ugh. 97 96 */ 98 - #define user_termio_to_kernel_termios(termios, termio) \ 99 - ({ \ 100 - unsigned short tmp; \ 101 - get_user(tmp, &(termio)->c_iflag); \ 102 - (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \ 103 - get_user(tmp, &(termio)->c_oflag); \ 104 - (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \ 105 - get_user(tmp, &(termio)->c_cflag); \ 106 - (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \ 107 - get_user(tmp, &(termio)->c_lflag); \ 108 - (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \ 109 - get_user((termios)->c_line, &(termio)->c_line); \ 110 - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ 111 - }) 97 + static inline int user_termio_to_kernel_termios(struct ktermios *termios, 98 + struct termio __user *termio) 99 + { 100 + unsigned short iflag, oflag, cflag, lflag; 101 + unsigned int err; 102 + 103 + if (!access_ok(VERIFY_READ, termio, sizeof(struct termio))) 104 + return -EFAULT; 105 + 106 + err = __get_user(iflag, &termio->c_iflag); 107 + termios->c_iflag = (termios->c_iflag & 0xffff0000) | iflag; 108 + err |=__get_user(oflag, &termio->c_oflag); 109 + termios->c_oflag = (termios->c_oflag & 0xffff0000) | oflag; 110 + err |=__get_user(cflag, &termio->c_cflag); 111 + termios->c_cflag = (termios->c_cflag & 0xffff0000) | cflag; 112 + err |=__get_user(lflag, &termio->c_lflag); 113 + termios->c_lflag = (termios->c_lflag & 0xffff0000) | lflag; 114 + err |=__get_user(termios->c_line, &termio->c_line); 115 + if (err) 116 + return -EFAULT; 117 + 118 + if (__copy_from_user(termios->c_cc, termio->c_cc, NCC)) 119 + return -EFAULT; 120 + 121 + return 0; 122 + } 112 123 113 124 /* 114 125 * Translate a "termios" structure into a "termio". Ugh. 115 126 */ 116 - #define kernel_termios_to_user_termio(termio, termios) \ 117 - ({ \ 118 - put_user((termios)->c_iflag, &(termio)->c_iflag); \ 119 - put_user((termios)->c_oflag, &(termio)->c_oflag); \ 120 - put_user((termios)->c_cflag, &(termio)->c_cflag); \ 121 - put_user((termios)->c_lflag, &(termio)->c_lflag); \ 122 - put_user((termios)->c_line, &(termio)->c_line); \ 123 - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 124 - }) 127 + static inline int kernel_termios_to_user_termio(struct termio __user *termio, 128 + struct ktermios *termios) 129 + { 130 + int err; 125 131 126 - #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) 127 - #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) 128 - #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) 129 - #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) 132 + if (!access_ok(VERIFY_WRITE, termio, sizeof(struct termio))) 133 + return -EFAULT; 134 + 135 + err = __put_user(termios->c_iflag, &termio->c_iflag); 136 + err |= __put_user(termios->c_oflag, &termio->c_oflag); 137 + err |= __put_user(termios->c_cflag, &termio->c_cflag); 138 + err |= __put_user(termios->c_lflag, &termio->c_lflag); 139 + err |= __put_user(termios->c_line, &termio->c_line); 140 + if (err) 141 + return -EFAULT; 142 + 143 + if (__copy_to_user(termio->c_cc, termios->c_cc, NCC)) 144 + return -EFAULT; 145 + 146 + return 0; 147 + } 148 + 149 + static inline int user_termios_to_kernel_termios(struct ktermios __user *k, 150 + struct termios2 *u) 151 + { 152 + return copy_from_user(k, u, sizeof(struct termios2)) ? -EFAULT : 0; 153 + } 154 + 155 + static inline int kernel_termios_to_user_termios(struct termios2 __user *u, 156 + struct ktermios *k) 157 + { 158 + return copy_to_user(u, k, sizeof(struct termios2)) ? -EFAULT : 0; 159 + } 160 + 161 + static inline int user_termios_to_kernel_termios_1(struct ktermios *k, 162 + struct termios __user *u) 163 + { 164 + return copy_from_user(k, u, sizeof(struct termios)) ? -EFAULT : 0; 165 + } 166 + 167 + static inline int kernel_termios_to_user_termios_1(struct termios __user *u, 168 + struct ktermios *k) 169 + { 170 + return copy_to_user(u, k, sizeof(struct termios)) ? -EFAULT : 0; 171 + } 130 172 131 173 #endif /* defined(__KERNEL__) */ 132 174
+1
arch/mips/include/asm/txx9/tx4939.h
··· 541 541 int tx4939_irq(void); 542 542 void tx4939_mtd_init(int ch); 543 543 void tx4939_ata_init(void); 544 + void tx4939_rtc_init(void); 544 545 545 546 #endif /* __ASM_TXX9_TX4939_H */
+5 -1
arch/mips/kernel/genex.S
··· 458 458 BUILD_HANDLER fpe fpe fpe silent /* #15 */ 459 459 BUILD_HANDLER mdmx mdmx sti silent /* #22 */ 460 460 #ifdef CONFIG_HARDWARE_WATCHPOINTS 461 - BUILD_HANDLER watch watch sti silent /* #23 */ 461 + /* 462 + * For watch, interrupts will be enabled after the watch 463 + * registers are read. 464 + */ 465 + BUILD_HANDLER watch watch cli silent /* #23 */ 462 466 #else 463 467 BUILD_HANDLER watch watch sti verbose /* #23 */ 464 468 #endif
+2 -1
arch/mips/kernel/mips-mt-fpaff.c
··· 79 79 80 80 euid = current_euid(); 81 81 retval = -EPERM; 82 - if (euid != p->euid && euid != p->uid && !capable(CAP_SYS_NICE)) { 82 + if (euid != p->cred->euid && euid != p->cred->uid && 83 + !capable(CAP_SYS_NICE)) { 83 84 read_unlock(&tasklist_lock); 84 85 goto out_unlock; 85 86 }
+13 -3
arch/mips/kernel/traps.c
··· 944 944 force_sig(SIGILL, current); 945 945 } 946 946 947 + /* 948 + * Called with interrupts disabled. 949 + */ 947 950 asmlinkage void do_watch(struct pt_regs *regs) 948 951 { 949 952 u32 cause; ··· 966 963 */ 967 964 if (test_tsk_thread_flag(current, TIF_LOAD_WATCH)) { 968 965 mips_read_watch_registers(); 966 + local_irq_enable(); 969 967 force_sig(SIGTRAP, current); 970 - } else 968 + } else { 971 969 mips_clear_watch_registers(); 970 + local_irq_enable(); 971 + } 972 972 } 973 973 974 974 asmlinkage void do_mcheck(struct pt_regs *regs) ··· 1588 1582 static char panic_null_cerr[] __cpuinitdata = 1589 1583 "Trying to set NULL cache error exception handler"; 1590 1584 1591 - /* Install uncached CPU exception handler */ 1585 + /* 1586 + * Install uncached CPU exception handler. 1587 + * This is suitable only for the cache error exception which is the only 1588 + * exception handler that is being run uncached. 1589 + */ 1592 1590 void __cpuinit set_uncached_handler(unsigned long offset, void *addr, 1593 1591 unsigned long size) 1594 1592 { ··· 1603 1593 unsigned long uncached_ebase = TO_UNCAC(ebase); 1604 1594 #endif 1605 1595 if (cpu_has_mips_r2) 1606 - ebase += (read_c0_ebase() & 0x3ffff000); 1596 + uncached_ebase += (read_c0_ebase() & 0x3ffff000); 1607 1597 1608 1598 if (!addr) 1609 1599 panic(panic_null_cerr);
+1 -1
arch/mips/lib/memcpy-inatomic.S
··· 21 21 * end of memory on some systems. It's also a seriously bad idea on non 22 22 * dma-coherent systems. 23 23 */ 24 - #if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27) 24 + #ifdef CONFIG_DMA_NONCOHERENT 25 25 #undef CONFIG_CPU_HAS_PREFETCH 26 26 #endif 27 27 #ifdef CONFIG_MIPS_MALTA
+1 -1
arch/mips/lib/memcpy.S
··· 21 21 * end of memory on some systems. It's also a seriously bad idea on non 22 22 * dma-coherent systems. 23 23 */ 24 - #if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27) 24 + #ifdef CONFIG_DMA_NONCOHERENT 25 25 #undef CONFIG_CPU_HAS_PREFETCH 26 26 #endif 27 27 #ifdef CONFIG_MIPS_MALTA
+21 -1
arch/mips/mm/c-r4k.c
··· 618 618 if (cpu_has_inclusive_pcaches) { 619 619 if (size >= scache_size) 620 620 r4k_blast_scache(); 621 - else 621 + else { 622 + unsigned long lsize = cpu_scache_line_size(); 623 + unsigned long almask = ~(lsize - 1); 624 + 625 + /* 626 + * There is no clearly documented alignment requirement 627 + * for the cache instruction on MIPS processors and 628 + * some processors, among them the RM5200 and RM7000 629 + * QED processors will throw an address error for cache 630 + * hit ops with insufficient alignment. Solved by 631 + * aligning the address to cache line size. 632 + */ 633 + cache_op(Hit_Writeback_Inv_SD, addr & almask); 634 + cache_op(Hit_Writeback_Inv_SD, 635 + (addr + size - 1) & almask); 622 636 blast_inv_scache_range(addr, addr + size); 637 + } 623 638 return; 624 639 } 625 640 626 641 if (cpu_has_safe_index_cacheops && size >= dcache_size) { 627 642 r4k_blast_dcache(); 628 643 } else { 644 + unsigned long lsize = cpu_dcache_line_size(); 645 + unsigned long almask = ~(lsize - 1); 646 + 629 647 R4600_HIT_CACHEOP_WAR_IMPL; 648 + cache_op(Hit_Writeback_Inv_D, addr & almask); 649 + cache_op(Hit_Writeback_Inv_D, (addr + size - 1) & almask); 630 650 blast_inv_dcache_range(addr, addr + size); 631 651 } 632 652
+6 -15
arch/mips/mm/fault.c
··· 97 97 goto bad_area; 98 98 } 99 99 100 - survive: 101 100 /* 102 101 * If for any reason at all we couldn't handle the fault, 103 102 * make sure we exit gracefully rather than endlessly redo ··· 166 167 field, regs->regs[31]); 167 168 die("Oops", regs); 168 169 169 - /* 170 - * We ran out of memory, or some other thing happened to us that made 171 - * us unable to handle the page fault gracefully. 172 - */ 173 170 out_of_memory: 174 - up_read(&mm->mmap_sem); 175 - if (is_global_init(tsk)) { 176 - yield(); 177 - down_read(&mm->mmap_sem); 178 - goto survive; 179 - } 180 - printk("VM: killing process %s\n", tsk->comm); 181 - if (user_mode(regs)) 182 - do_group_exit(SIGKILL); 183 - goto no_context; 171 + /* 172 + * We ran out of memory, call the OOM killer, and return the userspace 173 + * (which will retry the fault, or kill us if we got oom-killed). 174 + */ 175 + pagefault_out_of_memory(); 176 + return; 184 177 185 178 do_sigbus: 186 179 up_read(&mm->mmap_sem);
+11
arch/mips/pci/pci-rc32434.c
··· 205 205 206 206 static int __init rc32434_pci_init(void) 207 207 { 208 + void __iomem *io_map_base; 209 + 208 210 pr_info("PCI: Initializing PCI\n"); 209 211 210 212 ioport_resource.start = rc32434_res_pci_io1.start; 211 213 ioport_resource.end = rc32434_res_pci_io1.end; 212 214 213 215 rc32434_pcibridge_init(); 216 + 217 + io_map_base = ioremap(rc32434_res_pci_io1.start, 218 + rc32434_res_pci_io1.end - rc32434_res_pci_io1.start + 1); 219 + 220 + if (!io_map_base) 221 + return -ENOMEM; 222 + 223 + rc32434_controller.io_map_base = 224 + (unsigned long)io_map_base - rc32434_res_pci_io1.start; 214 225 215 226 register_pci_controller(&rc32434_controller); 216 227 rc32434_sync();
+56 -1
arch/mips/rb532/devices.c
··· 24 24 #include <linux/mtd/partitions.h> 25 25 #include <linux/gpio_keys.h> 26 26 #include <linux/input.h> 27 + #include <linux/serial_8250.h> 27 28 28 29 #include <asm/bootinfo.h> 29 30 ··· 39 38 40 39 #define ETH0_RX_DMA_ADDR (DMA0_BASE_ADDR + 0 * DMA_CHAN_OFFSET) 41 40 #define ETH0_TX_DMA_ADDR (DMA0_BASE_ADDR + 1 * DMA_CHAN_OFFSET) 41 + 42 + extern unsigned int idt_cpu_freq; 43 + 44 + static struct mpmc_device dev3; 45 + 46 + void set_latch_u5(unsigned char or_mask, unsigned char nand_mask) 47 + { 48 + unsigned long flags; 49 + 50 + spin_lock_irqsave(&dev3.lock, flags); 51 + 52 + dev3.state = (dev3.state | or_mask) & ~nand_mask; 53 + writeb(dev3.state, dev3.base); 54 + 55 + spin_unlock_irqrestore(&dev3.lock, flags); 56 + } 57 + EXPORT_SYMBOL(set_latch_u5); 58 + 59 + unsigned char get_latch_u5(void) 60 + { 61 + return dev3.state; 62 + } 63 + EXPORT_SYMBOL(get_latch_u5); 42 64 43 65 static struct resource korina_dev0_res[] = { 44 66 { ··· 110 86 static struct platform_device korina_dev0 = { 111 87 .id = -1, 112 88 .name = "korina", 113 - .dev.platform_data = &korina_dev0_data, 89 + .dev.driver_data = &korina_dev0_data, 114 90 .resource = korina_dev0_res, 115 91 .num_resources = ARRAY_SIZE(korina_dev0_res), 116 92 }; ··· 238 214 .num_resources = ARRAY_SIZE(rb532_wdt_res), 239 215 }; 240 216 217 + static struct plat_serial8250_port rb532_uart_res[] = { 218 + { 219 + .membase = (char *)KSEG1ADDR(REGBASE + UART0BASE), 220 + .irq = UART0_IRQ, 221 + .regshift = 2, 222 + .iotype = UPIO_MEM, 223 + .flags = UPF_BOOT_AUTOCONF, 224 + }, 225 + { 226 + .flags = 0, 227 + } 228 + }; 229 + 230 + static struct platform_device rb532_uart = { 231 + .name = "serial8250", 232 + .id = PLAT8250_DEV_PLATFORM, 233 + .dev.platform_data = &rb532_uart_res, 234 + }; 235 + 241 236 static struct platform_device *rb532_devs[] = { 242 237 &korina_dev0, 243 238 &nand_slot0, 244 239 &cf_slot0, 245 240 &rb532_led, 246 241 &rb532_button, 242 + &rb532_uart, 247 243 &rb532_wdt 248 244 }; 249 245 ··· 335 291 nand_slot0_res[0].start = readl(IDT434_REG_BASE + DEV2BASE); 336 292 nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; 337 293 294 + /* Read and map device controller 3 */ 295 + dev3.base = ioremap_nocache(readl(IDT434_REG_BASE + DEV3BASE), 1); 296 + 297 + if (!dev3.base) { 298 + printk(KERN_ERR "rb532: cannot remap device controller 3\n"); 299 + return -ENXIO; 300 + } 301 + 338 302 /* Initialise the NAND device */ 339 303 rb532_nand_setup(); 304 + 305 + /* set the uart clock to the current cpu frequency */ 306 + rb532_uart_res[0].uartclk = idt_cpu_freq; 340 307 341 308 return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); 342 309 }
+9 -81
arch/mips/rb532/gpio.c
··· 41 41 void __iomem *regbase; 42 42 }; 43 43 44 - struct mpmc_device dev3; 45 - 46 44 static struct resource rb532_gpio_reg0_res[] = { 47 45 { 48 46 .name = "gpio_reg0", ··· 49 51 .flags = IORESOURCE_MEM, 50 52 } 51 53 }; 52 - 53 - static struct resource rb532_dev3_ctl_res[] = { 54 - { 55 - .name = "dev3_ctl", 56 - .start = REGBASE + DEV3BASE, 57 - .end = REGBASE + DEV3BASE + sizeof(struct dev_reg) - 1, 58 - .flags = IORESOURCE_MEM, 59 - } 60 - }; 61 - 62 - void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned val) 63 - { 64 - unsigned long flags; 65 - unsigned data; 66 - unsigned i = 0; 67 - 68 - spin_lock_irqsave(&dev3.lock, flags); 69 - 70 - data = readl(IDT434_REG_BASE + reg_offs); 71 - for (i = 0; i != len; ++i) { 72 - if (val & (1 << i)) 73 - data |= (1 << (i + bit)); 74 - else 75 - data &= ~(1 << (i + bit)); 76 - } 77 - writel(data, (IDT434_REG_BASE + reg_offs)); 78 - 79 - spin_unlock_irqrestore(&dev3.lock, flags); 80 - } 81 - EXPORT_SYMBOL(set_434_reg); 82 - 83 - unsigned get_434_reg(unsigned reg_offs) 84 - { 85 - return readl(IDT434_REG_BASE + reg_offs); 86 - } 87 - EXPORT_SYMBOL(get_434_reg); 88 - 89 - void set_latch_u5(unsigned char or_mask, unsigned char nand_mask) 90 - { 91 - unsigned long flags; 92 - 93 - spin_lock_irqsave(&dev3.lock, flags); 94 - 95 - dev3.state = (dev3.state | or_mask) & ~nand_mask; 96 - writel(dev3.state, &dev3.base); 97 - 98 - spin_unlock_irqrestore(&dev3.lock, flags); 99 - } 100 - EXPORT_SYMBOL(set_latch_u5); 101 - 102 - unsigned char get_latch_u5(void) 103 - { 104 - return dev3.state; 105 - } 106 - EXPORT_SYMBOL(get_latch_u5); 107 54 108 55 /* rb532_set_bit - sanely set a bit 109 56 * ··· 62 119 unsigned long flags; 63 120 u32 val; 64 121 65 - bitval = !!bitval; /* map parameter to {0,1} */ 66 - 67 122 local_irq_save(flags); 68 123 69 124 val = readl(ioaddr); 70 - val &= ~( ~bitval << offset ); /* unset bit if bitval == 0 */ 71 - val |= ( bitval << offset ); /* set bit if bitval == 1 */ 125 + val &= ~(!bitval << offset); /* unset bit if bitval == 0 */ 126 + val |= (!!bitval << offset); /* set bit if bitval == 1 */ 72 127 writel(val, ioaddr); 73 128 74 129 local_irq_restore(flags); ··· 112 171 113 172 gpch = container_of(chip, struct rb532_gpio_chip, chip); 114 173 115 - if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) 116 - return 1; /* alternate function, GPIOCFG is ignored */ 174 + /* disable alternate function in case it's set */ 175 + rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); 117 176 118 177 rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); 119 178 return 0; ··· 129 188 130 189 gpch = container_of(chip, struct rb532_gpio_chip, chip); 131 190 132 - if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) 133 - return 1; /* alternate function, GPIOCFG is ignored */ 191 + /* disable alternate function in case it's set */ 192 + rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); 134 193 135 194 /* set the initial output value */ 136 195 rb532_set_bit(value, offset, gpch->regbase + GPIOD); ··· 174 233 /* 175 234 * Configure GPIO alternate function 176 235 */ 177 - static void rb532_gpio_set_func(int bit, unsigned gpio) 236 + void rb532_gpio_set_func(unsigned gpio) 178 237 { 179 - rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC); 238 + rb532_set_bit(1, gpio, rb532_gpio_chip->regbase + GPIOFUNC); 180 239 } 240 + EXPORT_SYMBOL(rb532_gpio_set_func); 181 241 182 242 int __init rb532_gpio_init(void) 183 243 { ··· 194 252 195 253 /* Register our GPIO chip */ 196 254 gpiochip_add(&rb532_gpio_chip->chip); 197 - 198 - r = rb532_dev3_ctl_res; 199 - dev3.base = ioremap_nocache(r->start, r->end - r->start); 200 - 201 - if (!dev3.base) { 202 - printk(KERN_ERR "rb532: cannot remap device controller 3\n"); 203 - return -ENXIO; 204 - } 205 - 206 - /* configure CF_GPIO_NUM as CFRDY IRQ source */ 207 - rb532_gpio_set_func(0, CF_GPIO_NUM); 208 - rb532_gpio_direction_input(&rb532_gpio_chip->chip, CF_GPIO_NUM); 209 - rb532_gpio_set_ilevel(1, CF_GPIO_NUM); 210 - rb532_gpio_set_istat(0, CF_GPIO_NUM); 211 255 212 256 return 0; 213 257 }
+27
arch/mips/rb532/irq.c
··· 46 46 #include <asm/system.h> 47 47 48 48 #include <asm/mach-rc32434/irq.h> 49 + #include <asm/mach-rc32434/gpio.h> 49 50 50 51 struct intr_group { 51 52 u32 mask; /* mask of valid bits in pending/mask registers */ ··· 151 150 mask |= intr_bit; 152 151 WRITE_MASK(addr, mask); 153 152 153 + if (group == GPIO_MAPPED_IRQ_GROUP) 154 + rb532_gpio_set_istat(0, irq_nr - GPIO_MAPPED_IRQ_BASE); 155 + 154 156 /* 155 157 * if there are no more interrupts enabled in this 156 158 * group, disable corresponding IP ··· 169 165 ack_local_irq(group_to_ip(irq_to_group(irq_nr))); 170 166 } 171 167 168 + static int rb532_set_type(unsigned int irq_nr, unsigned type) 169 + { 170 + int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; 171 + int group = irq_to_group(irq_nr); 172 + 173 + if (group != GPIO_MAPPED_IRQ_GROUP) 174 + return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; 175 + 176 + switch (type) { 177 + case IRQ_TYPE_LEVEL_HIGH: 178 + rb532_gpio_set_ilevel(1, gpio); 179 + break; 180 + case IRQ_TYPE_LEVEL_LOW: 181 + rb532_gpio_set_ilevel(0, gpio); 182 + break; 183 + default: 184 + return -EINVAL; 185 + } 186 + 187 + return 0; 188 + } 189 + 172 190 static struct irq_chip rc32434_irq_type = { 173 191 .name = "RB532", 174 192 .ack = rb532_disable_irq, 175 193 .mask = rb532_disable_irq, 176 194 .mask_ack = rb532_mask_and_ack_irq, 177 195 .unmask = rb532_enable_irq, 196 + .set_type = rb532_set_type, 178 197 }; 179 198 180 199 void __init arch_init_irq(void)
+1 -1
arch/mips/rb532/serial.c
··· 36 36 extern unsigned int idt_cpu_freq; 37 37 38 38 static struct uart_port rb532_uart = { 39 - .type = PORT_16550A, 39 + .flags = UPF_BOOT_AUTOCONF, 40 40 .line = 0, 41 41 .irq = UART0_IRQ, 42 42 .iotype = UPIO_MEM,
+22
arch/mips/txx9/generic/setup_tx4939.c
··· 435 435 platform_device_register(&ata1_dev); 436 436 } 437 437 438 + void __init tx4939_rtc_init(void) 439 + { 440 + static struct resource res[] = { 441 + { 442 + .start = TX4939_RTC_REG & 0xfffffffffULL, 443 + .end = (TX4939_RTC_REG & 0xfffffffffULL) + 0x100 - 1, 444 + .flags = IORESOURCE_MEM, 445 + }, { 446 + .start = TXX9_IRQ_BASE + TX4939_IR_RTC, 447 + .flags = IORESOURCE_IRQ, 448 + }, 449 + }; 450 + static struct platform_device rtc_dev = { 451 + .name = "tx4939rtc", 452 + .id = -1, 453 + .num_resources = ARRAY_SIZE(res), 454 + .resource = res, 455 + }; 456 + 457 + platform_device_register(&rtc_dev); 458 + } 459 + 438 460 static void __init tx4939_stop_unused_modules(void) 439 461 { 440 462 __u64 pcfg, rst = 0, ckd = 0;
+1
arch/mips/txx9/rbtx4939/setup.c
··· 336 336 rbtx4939_led_setup(); 337 337 tx4939_wdt_init(); 338 338 tx4939_ata_init(); 339 + tx4939_rtc_init(); 339 340 } 340 341 341 342 static void __init rbtx4939_setup(void)
+60 -23
arch/powerpc/configs/52xx/cm5200_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:12:40 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:41:58 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 71 71 # CONFIG_BSD_PROCESS_ACCT is not set 72 72 # CONFIG_TASKSTATS is not set 73 73 # CONFIG_AUDIT is not set 74 + 75 + # 76 + # RCU Subsystem 77 + # 78 + CONFIG_CLASSIC_RCU=y 79 + # CONFIG_TREE_RCU is not set 80 + # CONFIG_PREEMPT_RCU is not set 81 + # CONFIG_TREE_RCU_TRACE is not set 82 + # CONFIG_PREEMPT_RCU_TRACE is not set 74 83 # CONFIG_IKCONFIG is not set 75 84 CONFIG_LOG_BUF_SHIFT=14 76 - # CONFIG_CGROUPS is not set 77 85 CONFIG_GROUP_SCHED=y 78 86 CONFIG_FAIR_GROUP_SCHED=y 79 87 # CONFIG_RT_GROUP_SCHED is not set 80 88 CONFIG_USER_SCHED=y 81 89 # CONFIG_CGROUP_SCHED is not set 90 + # CONFIG_CGROUPS is not set 82 91 CONFIG_SYSFS_DEPRECATED=y 83 92 CONFIG_SYSFS_DEPRECATED_V2=y 84 93 # CONFIG_RELAY is not set ··· 119 110 CONFIG_SLUB=y 120 111 # CONFIG_SLOB is not set 121 112 # CONFIG_PROFILING is not set 122 - # CONFIG_MARKERS is not set 123 113 CONFIG_HAVE_OPROFILE=y 124 114 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 125 115 CONFIG_HAVE_IOREMAP_PROT=y ··· 129 121 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 130 122 CONFIG_SLABINFO=y 131 123 CONFIG_RT_MUTEXES=y 132 - # CONFIG_TINY_SHMEM is not set 133 124 CONFIG_BASE_SMALL=0 134 125 # CONFIG_MODULES is not set 135 126 CONFIG_BLOCK=y 136 127 # CONFIG_LBD is not set 137 128 # CONFIG_BLK_DEV_IO_TRACE is not set 138 - # CONFIG_LSF is not set 139 129 # CONFIG_BLK_DEV_BSG is not set 140 130 # CONFIG_BLK_DEV_INTEGRITY is not set 141 131 ··· 149 143 # CONFIG_DEFAULT_CFQ is not set 150 144 # CONFIG_DEFAULT_NOOP is not set 151 145 CONFIG_DEFAULT_IOSCHED="anticipatory" 152 - CONFIG_CLASSIC_RCU=y 153 146 # CONFIG_FREEZER is not set 154 147 155 148 # ··· 187 182 # CONFIG_TAU is not set 188 183 # CONFIG_FSL_ULI1575 is not set 189 184 CONFIG_PPC_BESTCOMM=y 190 - # CONFIG_PPC_BESTCOMM_ATA is not set 191 185 CONFIG_PPC_BESTCOMM_FEC=y 192 - # CONFIG_PPC_BESTCOMM_GEN_BD is not set 186 + # CONFIG_SIMPLE_GPIO is not set 193 187 194 188 # 195 189 # Kernel options ··· 215 211 CONFIG_ARCH_HAS_WALK_MEMORY=y 216 212 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 217 213 # CONFIG_KEXEC is not set 214 + # CONFIG_CRASH_DUMP is not set 218 215 CONFIG_ARCH_FLATMEM_ENABLE=y 219 216 CONFIG_ARCH_POPULATES_NODE_MAP=y 220 217 CONFIG_SELECT_MEMORY_MODEL=y ··· 227 222 CONFIG_PAGEFLAGS_EXTENDED=y 228 223 CONFIG_SPLIT_PTLOCK_CPUS=4 229 224 CONFIG_MIGRATION=y 230 - # CONFIG_RESOURCES_64BIT is not set 231 225 # CONFIG_PHYS_ADDR_T_64BIT is not set 232 226 CONFIG_ZONE_DMA_FLAG=1 233 227 CONFIG_BOUNCE=y 234 228 CONFIG_VIRT_TO_BUS=y 235 229 CONFIG_UNEVICTABLE_LRU=y 230 + CONFIG_PPC_4K_PAGES=y 231 + # CONFIG_PPC_16K_PAGES is not set 232 + # CONFIG_PPC_64K_PAGES is not set 236 233 CONFIG_FORCE_MAX_ZONEORDER=11 237 234 CONFIG_PROC_DEVICETREE=y 238 235 # CONFIG_CMDLINE_BOOL is not set ··· 275 268 # 276 269 # Networking options 277 270 # 271 + CONFIG_COMPAT_NET_DEV_OPS=y 278 272 CONFIG_PACKET=y 279 273 # CONFIG_PACKET_MMAP is not set 280 274 CONFIG_UNIX=y ··· 332 324 # CONFIG_ECONET is not set 333 325 # CONFIG_WAN_ROUTER is not set 334 326 # CONFIG_NET_SCHED is not set 327 + # CONFIG_DCB is not set 335 328 336 329 # 337 330 # Network testing ··· 345 336 # CONFIG_AF_RXRPC is not set 346 337 # CONFIG_PHONET is not set 347 338 # CONFIG_WIRELESS is not set 339 + # CONFIG_WIMAX is not set 348 340 # CONFIG_RFKILL is not set 349 341 # CONFIG_NET_9P is not set 350 342 ··· 437 427 # CONFIG_MTD_ONENAND is not set 438 428 439 429 # 430 + # LPDDR flash memory drivers 431 + # 432 + # CONFIG_MTD_LPDDR is not set 433 + # CONFIG_MTD_QINFO_PROBE is not set 434 + 435 + # 440 436 # UBI - Unsorted block images 441 437 # 442 438 # CONFIG_MTD_UBI is not set ··· 530 514 # CONFIG_BROADCOM_PHY is not set 531 515 # CONFIG_ICPLUS_PHY is not set 532 516 # CONFIG_REALTEK_PHY is not set 517 + # CONFIG_NATIONAL_PHY is not set 518 + # CONFIG_STE10XP is not set 519 + # CONFIG_LSI_ET1011C_PHY is not set 533 520 # CONFIG_FIXED_PHY is not set 534 521 # CONFIG_MDIO_BITBANG is not set 535 522 CONFIG_NET_ETHERNET=y ··· 556 537 # CONFIG_WLAN_PRE80211 is not set 557 538 # CONFIG_WLAN_80211 is not set 558 539 # CONFIG_IWLWIFI_LEDS is not set 540 + 541 + # 542 + # Enable WiMAX (Networking options) to see the WiMAX drivers 543 + # 559 544 560 545 # 561 546 # USB Network Adapters ··· 611 588 CONFIG_SERIAL_MPC52xx_CONSOLE=y 612 589 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=57600 613 590 CONFIG_UNIX98_PTYS=y 591 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 614 592 CONFIG_LEGACY_PTYS=y 615 593 CONFIG_LEGACY_PTY_COUNT=256 594 + # CONFIG_HVC_UDBG is not set 616 595 # CONFIG_IPMI_HANDLER is not set 617 596 # CONFIG_HW_RANDOM is not set 618 597 # CONFIG_NVRAM is not set ··· 654 629 # Miscellaneous I2C Chip support 655 630 # 656 631 # CONFIG_DS1682 is not set 657 - # CONFIG_EEPROM_AT24 is not set 658 - # CONFIG_EEPROM_LEGACY is not set 659 632 # CONFIG_SENSORS_PCF8574 is not set 660 633 # CONFIG_PCF8575 is not set 661 634 # CONFIG_SENSORS_PCA9539 is not set ··· 698 675 # CONFIG_MFD_CORE is not set 699 676 # CONFIG_MFD_SM501 is not set 700 677 # CONFIG_HTC_PASIC3 is not set 678 + # CONFIG_TWL4030_CORE is not set 701 679 # CONFIG_MFD_TMIO is not set 702 680 # CONFIG_PMIC_DA903X is not set 703 681 # CONFIG_MFD_WM8400 is not set 704 682 # CONFIG_MFD_WM8350_I2C is not set 683 + # CONFIG_MFD_PCF50633 is not set 705 684 # CONFIG_REGULATOR is not set 706 685 707 686 # ··· 761 736 # USB Host Controller Drivers 762 737 # 763 738 # CONFIG_USB_C67X00_HCD is not set 739 + # CONFIG_USB_OXU210HP_HCD is not set 764 740 # CONFIG_USB_ISP116X_HCD is not set 765 741 # CONFIG_USB_ISP1760_HCD is not set 766 742 CONFIG_USB_OHCI_HCD=y ··· 786 760 # CONFIG_USB_TMC is not set 787 761 788 762 # 789 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 763 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 790 764 # 791 765 792 766 # 793 - # may also be needed; see USB_STORAGE Help for more information 767 + # see USB_STORAGE Help for more information 794 768 # 795 769 CONFIG_USB_STORAGE=y 796 770 # CONFIG_USB_STORAGE_DEBUG is not set 797 771 # CONFIG_USB_STORAGE_DATAFAB is not set 798 772 # CONFIG_USB_STORAGE_FREECOM is not set 799 773 # CONFIG_USB_STORAGE_ISD200 is not set 800 - # CONFIG_USB_STORAGE_DPCM is not set 801 774 # CONFIG_USB_STORAGE_USBAT is not set 802 775 # CONFIG_USB_STORAGE_SDDR09 is not set 803 776 # CONFIG_USB_STORAGE_SDDR55 is not set ··· 842 817 # CONFIG_USB_ISIGHTFW is not set 843 818 # CONFIG_USB_VST is not set 844 819 # CONFIG_USB_GADGET is not set 820 + 821 + # 822 + # OTG and related infrastructure 823 + # 845 824 # CONFIG_MMC is not set 846 825 # CONFIG_MEMSTICK is not set 847 826 # CONFIG_NEW_LEDS is not set ··· 855 826 # CONFIG_DMADEVICES is not set 856 827 # CONFIG_UIO is not set 857 828 # CONFIG_STAGING is not set 858 - CONFIG_STAGING_EXCLUDE_BUILD=y 859 829 860 830 # 861 831 # File systems ··· 875 847 CONFIG_FILE_LOCKING=y 876 848 # CONFIG_XFS_FS is not set 877 849 # CONFIG_OCFS2_FS is not set 850 + # CONFIG_BTRFS_FS is not set 878 851 CONFIG_DNOTIFY=y 879 852 CONFIG_INOTIFY=y 880 853 CONFIG_INOTIFY_USER=y ··· 912 883 # CONFIG_TMPFS_POSIX_ACL is not set 913 884 # CONFIG_HUGETLB_PAGE is not set 914 885 # CONFIG_CONFIGFS_FS is not set 915 - 916 - # 917 - # Miscellaneous filesystems 918 - # 886 + CONFIG_MISC_FILESYSTEMS=y 919 887 # CONFIG_ADFS_FS is not set 920 888 # CONFIG_AFFS_FS is not set 921 889 # CONFIG_HFS_FS is not set ··· 932 906 CONFIG_JFFS2_RTIME=y 933 907 # CONFIG_JFFS2_RUBIN is not set 934 908 CONFIG_CRAMFS=y 909 + # CONFIG_SQUASHFS is not set 935 910 # CONFIG_VXFS_FS is not set 936 911 # CONFIG_MINIX_FS is not set 937 912 # CONFIG_OMFS_FS is not set ··· 1029 1002 # Library routines 1030 1003 # 1031 1004 CONFIG_BITREVERSE=y 1005 + CONFIG_GENERIC_FIND_LAST_BIT=y 1032 1006 # CONFIG_CRC_CCITT is not set 1033 1007 # CONFIG_CRC16 is not set 1034 1008 # CONFIG_CRC_T10DIF is not set ··· 1081 1053 # CONFIG_DEBUG_MEMORY_INIT is not set 1082 1054 # CONFIG_DEBUG_LIST is not set 1083 1055 # CONFIG_DEBUG_SG is not set 1056 + # CONFIG_DEBUG_NOTIFIERS is not set 1084 1057 # CONFIG_BOOT_PRINTK_DELAY is not set 1085 1058 # CONFIG_RCU_TORTURE_TEST is not set 1086 1059 # CONFIG_RCU_CPU_STALL_DETECTOR is not set ··· 1090 1061 # CONFIG_FAULT_INJECTION is not set 1091 1062 # CONFIG_LATENCYTOP is not set 1092 1063 CONFIG_HAVE_FUNCTION_TRACER=y 1064 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1065 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1093 1066 1094 1067 # 1095 1068 # Tracers ··· 1100 1069 # CONFIG_SCHED_TRACER is not set 1101 1070 # CONFIG_CONTEXT_SWITCH_TRACER is not set 1102 1071 # CONFIG_BOOT_TRACER is not set 1072 + # CONFIG_TRACE_BRANCH_PROFILING is not set 1103 1073 # CONFIG_STACK_TRACER is not set 1104 1074 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1105 1075 # CONFIG_SAMPLES is not set 1106 1076 CONFIG_HAVE_ARCH_KGDB=y 1107 1077 # CONFIG_KGDB is not set 1078 + CONFIG_PRINT_STACK_DEPTH=64 1108 1079 # CONFIG_DEBUG_STACKOVERFLOW is not set 1109 1080 # CONFIG_DEBUG_STACK_USAGE is not set 1110 1081 # CONFIG_DEBUG_PAGEALLOC is not set ··· 1133 1100 # 1134 1101 # CONFIG_CRYPTO_FIPS is not set 1135 1102 CONFIG_CRYPTO_ALGAPI=y 1136 - CONFIG_CRYPTO_AEAD=y 1103 + CONFIG_CRYPTO_ALGAPI2=y 1104 + CONFIG_CRYPTO_AEAD2=y 1137 1105 CONFIG_CRYPTO_BLKCIPHER=y 1106 + CONFIG_CRYPTO_BLKCIPHER2=y 1138 1107 CONFIG_CRYPTO_HASH=y 1139 - CONFIG_CRYPTO_RNG=y 1108 + CONFIG_CRYPTO_HASH2=y 1109 + CONFIG_CRYPTO_RNG2=y 1140 1110 CONFIG_CRYPTO_MANAGER=y 1111 + CONFIG_CRYPTO_MANAGER2=y 1141 1112 # CONFIG_CRYPTO_GF128MUL is not set 1142 1113 # CONFIG_CRYPTO_NULL is not set 1143 1114 # CONFIG_CRYPTO_CRYPTD is not set
+64 -22
arch/powerpc/configs/52xx/lite5200b_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:10:16 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:41:14 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 72 72 # CONFIG_BSD_PROCESS_ACCT is not set 73 73 # CONFIG_TASKSTATS is not set 74 74 # CONFIG_AUDIT is not set 75 + 76 + # 77 + # RCU Subsystem 78 + # 79 + CONFIG_CLASSIC_RCU=y 80 + # CONFIG_TREE_RCU is not set 81 + # CONFIG_PREEMPT_RCU is not set 82 + # CONFIG_TREE_RCU_TRACE is not set 83 + # CONFIG_PREEMPT_RCU_TRACE is not set 75 84 # CONFIG_IKCONFIG is not set 76 85 CONFIG_LOG_BUF_SHIFT=14 77 - # CONFIG_CGROUPS is not set 78 86 CONFIG_GROUP_SCHED=y 79 87 # CONFIG_FAIR_GROUP_SCHED is not set 80 88 # CONFIG_RT_GROUP_SCHED is not set 81 89 CONFIG_USER_SCHED=y 82 90 # CONFIG_CGROUP_SCHED is not set 91 + # CONFIG_CGROUPS is not set 83 92 CONFIG_SYSFS_DEPRECATED=y 84 93 CONFIG_SYSFS_DEPRECATED_V2=y 85 94 # CONFIG_RELAY is not set ··· 121 112 CONFIG_SLUB=y 122 113 # CONFIG_SLOB is not set 123 114 # CONFIG_PROFILING is not set 124 - # CONFIG_MARKERS is not set 125 115 CONFIG_HAVE_OPROFILE=y 126 116 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 127 117 CONFIG_HAVE_IOREMAP_PROT=y ··· 131 123 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 132 124 CONFIG_SLABINFO=y 133 125 CONFIG_RT_MUTEXES=y 134 - # CONFIG_TINY_SHMEM is not set 135 126 CONFIG_BASE_SMALL=0 136 127 CONFIG_MODULES=y 137 128 # CONFIG_MODULE_FORCE_LOAD is not set ··· 138 131 # CONFIG_MODULE_FORCE_UNLOAD is not set 139 132 # CONFIG_MODVERSIONS is not set 140 133 # CONFIG_MODULE_SRCVERSION_ALL is not set 141 - CONFIG_KMOD=y 142 134 CONFIG_BLOCK=y 143 135 # CONFIG_LBD is not set 144 136 # CONFIG_BLK_DEV_IO_TRACE is not set 145 - # CONFIG_LSF is not set 146 137 # CONFIG_BLK_DEV_BSG is not set 147 138 # CONFIG_BLK_DEV_INTEGRITY is not set 148 139 ··· 156 151 # CONFIG_DEFAULT_CFQ is not set 157 152 # CONFIG_DEFAULT_NOOP is not set 158 153 CONFIG_DEFAULT_IOSCHED="anticipatory" 159 - CONFIG_CLASSIC_RCU=y 160 154 CONFIG_FREEZER=y 161 155 162 156 # ··· 196 192 CONFIG_PPC_BESTCOMM=y 197 193 CONFIG_PPC_BESTCOMM_ATA=y 198 194 CONFIG_PPC_BESTCOMM_FEC=y 199 - CONFIG_PPC_BESTCOMM_GEN_BD=y 195 + # CONFIG_SIMPLE_GPIO is not set 200 196 201 197 # 202 198 # Kernel options ··· 224 220 CONFIG_ARCH_HAS_WALK_MEMORY=y 225 221 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 226 222 # CONFIG_KEXEC is not set 223 + # CONFIG_CRASH_DUMP is not set 227 224 CONFIG_ARCH_FLATMEM_ENABLE=y 228 225 CONFIG_ARCH_POPULATES_NODE_MAP=y 229 226 CONFIG_SELECT_MEMORY_MODEL=y ··· 236 231 CONFIG_PAGEFLAGS_EXTENDED=y 237 232 CONFIG_SPLIT_PTLOCK_CPUS=4 238 233 CONFIG_MIGRATION=y 239 - # CONFIG_RESOURCES_64BIT is not set 240 234 # CONFIG_PHYS_ADDR_T_64BIT is not set 241 235 CONFIG_ZONE_DMA_FLAG=1 242 236 CONFIG_BOUNCE=y 243 237 CONFIG_VIRT_TO_BUS=y 244 238 CONFIG_UNEVICTABLE_LRU=y 239 + CONFIG_PPC_4K_PAGES=y 240 + # CONFIG_PPC_16K_PAGES is not set 241 + # CONFIG_PPC_64K_PAGES is not set 245 242 CONFIG_FORCE_MAX_ZONEORDER=11 246 243 CONFIG_PROC_DEVICETREE=y 247 244 # CONFIG_CMDLINE_BOOL is not set ··· 271 264 # CONFIG_PCI_MSI is not set 272 265 CONFIG_PCI_LEGACY=y 273 266 # CONFIG_PCI_DEBUG is not set 267 + # CONFIG_PCI_STUB is not set 274 268 # CONFIG_PCCARD is not set 275 269 # CONFIG_HOTPLUG_PCI is not set 276 270 # CONFIG_HAS_RAPIDIO is not set ··· 294 286 # 295 287 # Networking options 296 288 # 289 + CONFIG_COMPAT_NET_DEV_OPS=y 297 290 CONFIG_PACKET=y 298 291 # CONFIG_PACKET_MMAP is not set 299 292 CONFIG_UNIX=y ··· 351 342 # CONFIG_ECONET is not set 352 343 # CONFIG_WAN_ROUTER is not set 353 344 # CONFIG_NET_SCHED is not set 345 + # CONFIG_DCB is not set 354 346 355 347 # 356 348 # Network testing ··· 364 354 # CONFIG_AF_RXRPC is not set 365 355 # CONFIG_PHONET is not set 366 356 # CONFIG_WIRELESS is not set 357 + # CONFIG_WIMAX is not set 367 358 # CONFIG_RFKILL is not set 368 359 # CONFIG_NET_9P is not set 369 360 ··· 407 396 # CONFIG_BLK_DEV_HD is not set 408 397 CONFIG_MISC_DEVICES=y 409 398 # CONFIG_PHANTOM is not set 410 - # CONFIG_EEPROM_93CX6 is not set 411 399 # CONFIG_SGI_IOC4 is not set 412 400 # CONFIG_TIFM_CORE is not set 413 401 # CONFIG_ICS932S401 is not set 414 402 # CONFIG_ENCLOSURE_SERVICES is not set 415 403 # CONFIG_HP_ILO is not set 416 404 # CONFIG_C2PORT is not set 405 + 406 + # 407 + # EEPROM support 408 + # 409 + # CONFIG_EEPROM_AT24 is not set 410 + # CONFIG_EEPROM_LEGACY is not set 411 + # CONFIG_EEPROM_93CX6 is not set 417 412 CONFIG_HAVE_IDE=y 418 413 # CONFIG_IDE is not set 419 414 ··· 462 445 # CONFIG_SCSI_SRP_ATTRS is not set 463 446 CONFIG_SCSI_LOWLEVEL=y 464 447 # CONFIG_ISCSI_TCP is not set 448 + # CONFIG_SCSI_CXGB3_ISCSI is not set 465 449 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set 466 450 # CONFIG_SCSI_3W_9XXX is not set 467 451 # CONFIG_SCSI_ACARD is not set ··· 479 461 # CONFIG_MEGARAID_SAS is not set 480 462 # CONFIG_SCSI_HPTIOP is not set 481 463 # CONFIG_SCSI_BUSLOGIC is not set 464 + # CONFIG_LIBFC is not set 465 + # CONFIG_FCOE is not set 482 466 # CONFIG_SCSI_DMX3191D is not set 483 467 # CONFIG_SCSI_EATA is not set 484 468 # CONFIG_SCSI_FUTURE_DOMAIN is not set ··· 600 580 # CONFIG_BROADCOM_PHY is not set 601 581 # CONFIG_ICPLUS_PHY is not set 602 582 # CONFIG_REALTEK_PHY is not set 583 + # CONFIG_NATIONAL_PHY is not set 584 + # CONFIG_STE10XP is not set 585 + # CONFIG_LSI_ET1011C_PHY is not set 603 586 # CONFIG_FIXED_PHY is not set 604 587 # CONFIG_MDIO_BITBANG is not set 605 588 CONFIG_NET_ETHERNET=y ··· 649 626 # CONFIG_JME is not set 650 627 CONFIG_NETDEV_10000=y 651 628 # CONFIG_CHELSIO_T1 is not set 629 + CONFIG_CHELSIO_T3_DEPENDS=y 652 630 # CONFIG_CHELSIO_T3 is not set 653 631 # CONFIG_ENIC is not set 654 632 # CONFIG_IXGBE is not set ··· 672 648 # CONFIG_WLAN_PRE80211 is not set 673 649 # CONFIG_WLAN_80211 is not set 674 650 # CONFIG_IWLWIFI_LEDS is not set 651 + 652 + # 653 + # Enable WiMAX (Networking options) to see the WiMAX drivers 654 + # 675 655 # CONFIG_WAN is not set 676 656 # CONFIG_FDDI is not set 677 657 # CONFIG_HIPPI is not set ··· 723 695 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 724 696 # CONFIG_SERIAL_JSM is not set 725 697 CONFIG_UNIX98_PTYS=y 698 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 726 699 CONFIG_LEGACY_PTYS=y 727 700 CONFIG_LEGACY_PTY_COUNT=256 701 + # CONFIG_HVC_UDBG is not set 728 702 # CONFIG_IPMI_HANDLER is not set 729 703 # CONFIG_HW_RANDOM is not set 730 704 # CONFIG_NVRAM is not set ··· 792 762 # Miscellaneous I2C Chip support 793 763 # 794 764 # CONFIG_DS1682 is not set 795 - # CONFIG_EEPROM_AT24 is not set 796 - # CONFIG_EEPROM_LEGACY is not set 797 765 # CONFIG_SENSORS_PCF8574 is not set 798 766 # CONFIG_PCF8575 is not set 799 767 # CONFIG_SENSORS_PCA9539 is not set ··· 824 796 # CONFIG_MFD_CORE is not set 825 797 # CONFIG_MFD_SM501 is not set 826 798 # CONFIG_HTC_PASIC3 is not set 799 + # CONFIG_TWL4030_CORE is not set 827 800 # CONFIG_MFD_TMIO is not set 828 801 # CONFIG_PMIC_DA903X is not set 829 802 # CONFIG_MFD_WM8400 is not set 830 803 # CONFIG_MFD_WM8350_I2C is not set 804 + # CONFIG_MFD_PCF50633 is not set 831 805 # CONFIG_REGULATOR is not set 832 806 833 807 # ··· 876 846 # 877 847 878 848 # 879 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 849 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 880 850 # 881 851 # CONFIG_USB_GADGET is not set 852 + 853 + # 854 + # OTG and related infrastructure 855 + # 882 856 # CONFIG_UWB is not set 883 857 # CONFIG_MMC is not set 884 858 # CONFIG_MEMSTICK is not set ··· 894 860 # CONFIG_DMADEVICES is not set 895 861 # CONFIG_UIO is not set 896 862 # CONFIG_STAGING is not set 897 - CONFIG_STAGING_EXCLUDE_BUILD=y 898 863 899 864 # 900 865 # File systems ··· 914 881 CONFIG_FILE_LOCKING=y 915 882 # CONFIG_XFS_FS is not set 916 883 # CONFIG_OCFS2_FS is not set 884 + # CONFIG_BTRFS_FS is not set 917 885 CONFIG_DNOTIFY=y 918 886 CONFIG_INOTIFY=y 919 887 CONFIG_INOTIFY_USER=y ··· 948 914 # CONFIG_TMPFS_POSIX_ACL is not set 949 915 # CONFIG_HUGETLB_PAGE is not set 950 916 # CONFIG_CONFIGFS_FS is not set 951 - 952 - # 953 - # Miscellaneous filesystems 954 - # 917 + CONFIG_MISC_FILESYSTEMS=y 955 918 # CONFIG_ADFS_FS is not set 956 919 # CONFIG_AFFS_FS is not set 957 920 # CONFIG_HFS_FS is not set ··· 957 926 # CONFIG_BFS_FS is not set 958 927 # CONFIG_EFS_FS is not set 959 928 # CONFIG_CRAMFS is not set 929 + # CONFIG_SQUASHFS is not set 960 930 # CONFIG_VXFS_FS is not set 961 931 # CONFIG_MINIX_FS is not set 962 932 # CONFIG_OMFS_FS is not set ··· 999 967 # Library routines 1000 968 # 1001 969 CONFIG_BITREVERSE=y 970 + CONFIG_GENERIC_FIND_LAST_BIT=y 1002 971 # CONFIG_CRC_CCITT is not set 1003 972 # CONFIG_CRC16 is not set 1004 973 # CONFIG_CRC_T10DIF is not set ··· 1049 1016 # CONFIG_DEBUG_MEMORY_INIT is not set 1050 1017 # CONFIG_DEBUG_LIST is not set 1051 1018 # CONFIG_DEBUG_SG is not set 1019 + # CONFIG_DEBUG_NOTIFIERS is not set 1052 1020 # CONFIG_BOOT_PRINTK_DELAY is not set 1053 1021 # CONFIG_RCU_TORTURE_TEST is not set 1054 1022 # CONFIG_RCU_CPU_STALL_DETECTOR is not set ··· 1058 1024 # CONFIG_FAULT_INJECTION is not set 1059 1025 # CONFIG_LATENCYTOP is not set 1060 1026 CONFIG_HAVE_FUNCTION_TRACER=y 1027 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1028 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1061 1029 1062 1030 # 1063 1031 # Tracers ··· 1068 1032 # CONFIG_SCHED_TRACER is not set 1069 1033 # CONFIG_CONTEXT_SWITCH_TRACER is not set 1070 1034 # CONFIG_BOOT_TRACER is not set 1035 + # CONFIG_TRACE_BRANCH_PROFILING is not set 1071 1036 # CONFIG_STACK_TRACER is not set 1072 1037 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1073 1038 # CONFIG_SAMPLES is not set 1074 1039 CONFIG_HAVE_ARCH_KGDB=y 1075 1040 # CONFIG_KGDB is not set 1041 + CONFIG_PRINT_STACK_DEPTH=64 1076 1042 # CONFIG_DEBUG_STACKOVERFLOW is not set 1077 1043 # CONFIG_DEBUG_STACK_USAGE is not set 1078 1044 # CONFIG_DEBUG_PAGEALLOC is not set ··· 1101 1063 # 1102 1064 # CONFIG_CRYPTO_FIPS is not set 1103 1065 CONFIG_CRYPTO_ALGAPI=y 1104 - CONFIG_CRYPTO_AEAD=y 1066 + CONFIG_CRYPTO_ALGAPI2=y 1067 + CONFIG_CRYPTO_AEAD2=y 1105 1068 CONFIG_CRYPTO_BLKCIPHER=y 1069 + CONFIG_CRYPTO_BLKCIPHER2=y 1106 1070 CONFIG_CRYPTO_HASH=y 1107 - CONFIG_CRYPTO_RNG=y 1071 + CONFIG_CRYPTO_HASH2=y 1072 + CONFIG_CRYPTO_RNG2=y 1108 1073 CONFIG_CRYPTO_MANAGER=y 1074 + CONFIG_CRYPTO_MANAGER2=y 1109 1075 # CONFIG_CRYPTO_GF128MUL is not set 1110 1076 # CONFIG_CRYPTO_NULL is not set 1111 1077 # CONFIG_CRYPTO_CRYPTD is not set
+64 -21
arch/powerpc/configs/52xx/motionpro_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:11:02 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:42:29 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 71 71 # CONFIG_BSD_PROCESS_ACCT is not set 72 72 # CONFIG_TASKSTATS is not set 73 73 # CONFIG_AUDIT is not set 74 + 75 + # 76 + # RCU Subsystem 77 + # 78 + CONFIG_CLASSIC_RCU=y 79 + # CONFIG_TREE_RCU is not set 80 + # CONFIG_PREEMPT_RCU is not set 81 + # CONFIG_TREE_RCU_TRACE is not set 82 + # CONFIG_PREEMPT_RCU_TRACE is not set 74 83 # CONFIG_IKCONFIG is not set 75 84 CONFIG_LOG_BUF_SHIFT=14 76 - # CONFIG_CGROUPS is not set 77 85 CONFIG_GROUP_SCHED=y 78 86 CONFIG_FAIR_GROUP_SCHED=y 79 87 # CONFIG_RT_GROUP_SCHED is not set 80 88 CONFIG_USER_SCHED=y 81 89 # CONFIG_CGROUP_SCHED is not set 90 + # CONFIG_CGROUPS is not set 82 91 CONFIG_SYSFS_DEPRECATED=y 83 92 CONFIG_SYSFS_DEPRECATED_V2=y 84 93 # CONFIG_RELAY is not set ··· 119 110 CONFIG_SLUB=y 120 111 # CONFIG_SLOB is not set 121 112 # CONFIG_PROFILING is not set 122 - # CONFIG_MARKERS is not set 123 113 CONFIG_HAVE_OPROFILE=y 124 114 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 125 115 CONFIG_HAVE_IOREMAP_PROT=y ··· 129 121 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 130 122 CONFIG_SLABINFO=y 131 123 CONFIG_RT_MUTEXES=y 132 - # CONFIG_TINY_SHMEM is not set 133 124 CONFIG_BASE_SMALL=0 134 125 # CONFIG_MODULES is not set 135 126 CONFIG_BLOCK=y 136 127 # CONFIG_LBD is not set 137 128 # CONFIG_BLK_DEV_IO_TRACE is not set 138 - # CONFIG_LSF is not set 139 129 # CONFIG_BLK_DEV_BSG is not set 140 130 # CONFIG_BLK_DEV_INTEGRITY is not set 141 131 ··· 149 143 # CONFIG_DEFAULT_CFQ is not set 150 144 # CONFIG_DEFAULT_NOOP is not set 151 145 CONFIG_DEFAULT_IOSCHED="anticipatory" 152 - CONFIG_CLASSIC_RCU=y 153 146 # CONFIG_FREEZER is not set 154 147 155 148 # ··· 187 182 # CONFIG_TAU is not set 188 183 # CONFIG_FSL_ULI1575 is not set 189 184 CONFIG_PPC_BESTCOMM=y 190 - # CONFIG_PPC_BESTCOMM_ATA is not set 185 + CONFIG_PPC_BESTCOMM_ATA=y 191 186 CONFIG_PPC_BESTCOMM_FEC=y 192 - # CONFIG_PPC_BESTCOMM_GEN_BD is not set 187 + # CONFIG_SIMPLE_GPIO is not set 193 188 194 189 # 195 190 # Kernel options ··· 216 211 CONFIG_ARCH_HAS_WALK_MEMORY=y 217 212 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 218 213 # CONFIG_KEXEC is not set 214 + # CONFIG_CRASH_DUMP is not set 219 215 CONFIG_ARCH_FLATMEM_ENABLE=y 220 216 CONFIG_ARCH_POPULATES_NODE_MAP=y 221 217 CONFIG_SELECT_MEMORY_MODEL=y ··· 228 222 CONFIG_PAGEFLAGS_EXTENDED=y 229 223 CONFIG_SPLIT_PTLOCK_CPUS=4 230 224 CONFIG_MIGRATION=y 231 - # CONFIG_RESOURCES_64BIT is not set 232 225 # CONFIG_PHYS_ADDR_T_64BIT is not set 233 226 CONFIG_ZONE_DMA_FLAG=1 234 227 CONFIG_BOUNCE=y 235 228 CONFIG_VIRT_TO_BUS=y 236 229 CONFIG_UNEVICTABLE_LRU=y 230 + CONFIG_PPC_4K_PAGES=y 231 + # CONFIG_PPC_16K_PAGES is not set 232 + # CONFIG_PPC_64K_PAGES is not set 237 233 CONFIG_FORCE_MAX_ZONEORDER=11 238 234 CONFIG_PROC_DEVICETREE=y 239 235 # CONFIG_CMDLINE_BOOL is not set ··· 276 268 # 277 269 # Networking options 278 270 # 271 + CONFIG_COMPAT_NET_DEV_OPS=y 279 272 CONFIG_PACKET=y 280 273 # CONFIG_PACKET_MMAP is not set 281 274 CONFIG_UNIX=y ··· 333 324 # CONFIG_ECONET is not set 334 325 # CONFIG_WAN_ROUTER is not set 335 326 # CONFIG_NET_SCHED is not set 327 + # CONFIG_DCB is not set 336 328 337 329 # 338 330 # Network testing ··· 346 336 # CONFIG_AF_RXRPC is not set 347 337 # CONFIG_PHONET is not set 348 338 # CONFIG_WIRELESS is not set 339 + # CONFIG_WIMAX is not set 349 340 # CONFIG_RFKILL is not set 350 341 # CONFIG_NET_9P is not set 351 342 ··· 438 427 # CONFIG_MTD_ONENAND is not set 439 428 440 429 # 430 + # LPDDR flash memory drivers 431 + # 432 + # CONFIG_MTD_LPDDR is not set 433 + # CONFIG_MTD_QINFO_PROBE is not set 434 + 435 + # 441 436 # UBI - Unsorted block images 442 437 # 443 438 # CONFIG_MTD_UBI is not set ··· 464 447 # CONFIG_ATA_OVER_ETH is not set 465 448 # CONFIG_BLK_DEV_HD is not set 466 449 CONFIG_MISC_DEVICES=y 467 - # CONFIG_EEPROM_93CX6 is not set 468 450 # CONFIG_ICS932S401 is not set 469 451 # CONFIG_ENCLOSURE_SERVICES is not set 470 452 # CONFIG_C2PORT is not set 453 + 454 + # 455 + # EEPROM support 456 + # 457 + # CONFIG_EEPROM_AT24 is not set 458 + CONFIG_EEPROM_LEGACY=y 459 + # CONFIG_EEPROM_93CX6 is not set 471 460 CONFIG_HAVE_IDE=y 472 461 # CONFIG_IDE is not set 473 462 ··· 515 492 # CONFIG_SCSI_SRP_ATTRS is not set 516 493 CONFIG_SCSI_LOWLEVEL=y 517 494 # CONFIG_ISCSI_TCP is not set 495 + # CONFIG_LIBFC is not set 518 496 # CONFIG_SCSI_DEBUG is not set 519 497 # CONFIG_SCSI_DH is not set 520 498 CONFIG_ATA=y ··· 549 525 CONFIG_BROADCOM_PHY=y 550 526 CONFIG_ICPLUS_PHY=y 551 527 # CONFIG_REALTEK_PHY is not set 528 + # CONFIG_NATIONAL_PHY is not set 529 + # CONFIG_STE10XP is not set 530 + # CONFIG_LSI_ET1011C_PHY is not set 552 531 # CONFIG_FIXED_PHY is not set 553 532 CONFIG_MDIO_BITBANG=y 554 533 CONFIG_NET_ETHERNET=y ··· 575 548 # CONFIG_WLAN_PRE80211 is not set 576 549 # CONFIG_WLAN_80211 is not set 577 550 # CONFIG_IWLWIFI_LEDS is not set 551 + 552 + # 553 + # Enable WiMAX (Networking options) to see the WiMAX drivers 554 + # 578 555 # CONFIG_WAN is not set 579 556 # CONFIG_PPP is not set 580 557 # CONFIG_SLIP is not set ··· 621 590 CONFIG_SERIAL_MPC52xx_CONSOLE=y 622 591 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 623 592 CONFIG_UNIX98_PTYS=y 593 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 624 594 CONFIG_LEGACY_PTYS=y 625 595 CONFIG_LEGACY_PTY_COUNT=256 596 + # CONFIG_HVC_UDBG is not set 626 597 # CONFIG_IPMI_HANDLER is not set 627 598 # CONFIG_HW_RANDOM is not set 628 599 # CONFIG_NVRAM is not set ··· 662 629 # Miscellaneous I2C Chip support 663 630 # 664 631 # CONFIG_DS1682 is not set 665 - # CONFIG_EEPROM_AT24 is not set 666 - CONFIG_EEPROM_LEGACY=y 667 632 # CONFIG_SENSORS_PCF8574 is not set 668 633 # CONFIG_PCF8575 is not set 669 634 # CONFIG_SENSORS_PCA9539 is not set ··· 690 659 # CONFIG_SENSORS_ADT7462 is not set 691 660 # CONFIG_SENSORS_ADT7470 is not set 692 661 # CONFIG_SENSORS_ADT7473 is not set 662 + # CONFIG_SENSORS_ADT7475 is not set 693 663 # CONFIG_SENSORS_ATXP1 is not set 694 664 # CONFIG_SENSORS_DS1621 is not set 695 665 # CONFIG_SENSORS_F71805F is not set ··· 710 678 # CONFIG_SENSORS_LM90 is not set 711 679 # CONFIG_SENSORS_LM92 is not set 712 680 # CONFIG_SENSORS_LM93 is not set 681 + # CONFIG_SENSORS_LTC4245 is not set 713 682 # CONFIG_SENSORS_MAX1619 is not set 714 683 # CONFIG_SENSORS_MAX6650 is not set 715 684 # CONFIG_SENSORS_PC87360 is not set ··· 754 721 # CONFIG_MFD_CORE is not set 755 722 # CONFIG_MFD_SM501 is not set 756 723 # CONFIG_HTC_PASIC3 is not set 724 + # CONFIG_TWL4030_CORE is not set 757 725 # CONFIG_MFD_TMIO is not set 758 726 # CONFIG_PMIC_DA903X is not set 759 727 # CONFIG_MFD_WM8400 is not set 760 728 # CONFIG_MFD_WM8350_I2C is not set 729 + # CONFIG_MFD_PCF50633 is not set 761 730 # CONFIG_REGULATOR is not set 762 731 763 732 # ··· 870 835 # CONFIG_DMADEVICES is not set 871 836 # CONFIG_UIO is not set 872 837 # CONFIG_STAGING is not set 873 - CONFIG_STAGING_EXCLUDE_BUILD=y 874 838 875 839 # 876 840 # File systems ··· 890 856 CONFIG_FILE_LOCKING=y 891 857 # CONFIG_XFS_FS is not set 892 858 # CONFIG_OCFS2_FS is not set 859 + # CONFIG_BTRFS_FS is not set 893 860 CONFIG_DNOTIFY=y 894 861 CONFIG_INOTIFY=y 895 862 CONFIG_INOTIFY_USER=y ··· 927 892 # CONFIG_TMPFS_POSIX_ACL is not set 928 893 # CONFIG_HUGETLB_PAGE is not set 929 894 # CONFIG_CONFIGFS_FS is not set 930 - 931 - # 932 - # Miscellaneous filesystems 933 - # 895 + CONFIG_MISC_FILESYSTEMS=y 934 896 # CONFIG_ADFS_FS is not set 935 897 # CONFIG_AFFS_FS is not set 936 898 # CONFIG_HFS_FS is not set ··· 947 915 CONFIG_JFFS2_RTIME=y 948 916 # CONFIG_JFFS2_RUBIN is not set 949 917 CONFIG_CRAMFS=y 918 + # CONFIG_SQUASHFS is not set 950 919 # CONFIG_VXFS_FS is not set 951 920 # CONFIG_MINIX_FS is not set 952 921 # CONFIG_OMFS_FS is not set ··· 1044 1011 # Library routines 1045 1012 # 1046 1013 CONFIG_BITREVERSE=y 1014 + CONFIG_GENERIC_FIND_LAST_BIT=y 1047 1015 # CONFIG_CRC_CCITT is not set 1048 1016 # CONFIG_CRC16 is not set 1049 1017 # CONFIG_CRC_T10DIF is not set ··· 1096 1062 # CONFIG_DEBUG_MEMORY_INIT is not set 1097 1063 # CONFIG_DEBUG_LIST is not set 1098 1064 # CONFIG_DEBUG_SG is not set 1065 + # CONFIG_DEBUG_NOTIFIERS is not set 1099 1066 # CONFIG_BOOT_PRINTK_DELAY is not set 1100 1067 # CONFIG_RCU_TORTURE_TEST is not set 1101 1068 # CONFIG_RCU_CPU_STALL_DETECTOR is not set ··· 1105 1070 # CONFIG_FAULT_INJECTION is not set 1106 1071 # CONFIG_LATENCYTOP is not set 1107 1072 CONFIG_HAVE_FUNCTION_TRACER=y 1073 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1074 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1108 1075 1109 1076 # 1110 1077 # Tracers ··· 1115 1078 # CONFIG_SCHED_TRACER is not set 1116 1079 # CONFIG_CONTEXT_SWITCH_TRACER is not set 1117 1080 # CONFIG_BOOT_TRACER is not set 1081 + # CONFIG_TRACE_BRANCH_PROFILING is not set 1118 1082 # CONFIG_STACK_TRACER is not set 1119 1083 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1120 1084 # CONFIG_SAMPLES is not set 1121 1085 CONFIG_HAVE_ARCH_KGDB=y 1122 1086 # CONFIG_KGDB is not set 1087 + CONFIG_PRINT_STACK_DEPTH=64 1123 1088 # CONFIG_DEBUG_STACKOVERFLOW is not set 1124 1089 # CONFIG_DEBUG_STACK_USAGE is not set 1125 1090 # CONFIG_DEBUG_PAGEALLOC is not set ··· 1148 1109 # 1149 1110 # CONFIG_CRYPTO_FIPS is not set 1150 1111 CONFIG_CRYPTO_ALGAPI=y 1151 - CONFIG_CRYPTO_AEAD=y 1112 + CONFIG_CRYPTO_ALGAPI2=y 1113 + CONFIG_CRYPTO_AEAD2=y 1152 1114 CONFIG_CRYPTO_BLKCIPHER=y 1115 + CONFIG_CRYPTO_BLKCIPHER2=y 1153 1116 CONFIG_CRYPTO_HASH=y 1154 - CONFIG_CRYPTO_RNG=y 1117 + CONFIG_CRYPTO_HASH2=y 1118 + CONFIG_CRYPTO_RNG2=y 1155 1119 CONFIG_CRYPTO_MANAGER=y 1120 + CONFIG_CRYPTO_MANAGER2=y 1156 1121 # CONFIG_CRYPTO_GF128MUL is not set 1157 1122 # CONFIG_CRYPTO_NULL is not set 1158 1123 # CONFIG_CRYPTO_CRYPTD is not set
+56 -26
arch/powerpc/configs/52xx/pcm030_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:13:16 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:41:33 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 72 72 # CONFIG_BSD_PROCESS_ACCT is not set 73 73 # CONFIG_TASKSTATS is not set 74 74 # CONFIG_AUDIT is not set 75 + 76 + # 77 + # RCU Subsystem 78 + # 79 + CONFIG_CLASSIC_RCU=y 80 + # CONFIG_TREE_RCU is not set 81 + # CONFIG_PREEMPT_RCU is not set 82 + # CONFIG_TREE_RCU_TRACE is not set 83 + # CONFIG_PREEMPT_RCU_TRACE is not set 75 84 CONFIG_IKCONFIG=y 76 85 CONFIG_IKCONFIG_PROC=y 77 86 CONFIG_LOG_BUF_SHIFT=14 78 - # CONFIG_CGROUPS is not set 79 87 CONFIG_GROUP_SCHED=y 80 88 CONFIG_FAIR_GROUP_SCHED=y 81 89 # CONFIG_RT_GROUP_SCHED is not set 82 90 CONFIG_USER_SCHED=y 83 91 # CONFIG_CGROUP_SCHED is not set 92 + # CONFIG_CGROUPS is not set 84 93 CONFIG_SYSFS_DEPRECATED=y 85 94 CONFIG_SYSFS_DEPRECATED_V2=y 86 95 # CONFIG_RELAY is not set ··· 121 112 # CONFIG_SLUB is not set 122 113 # CONFIG_SLOB is not set 123 114 # CONFIG_PROFILING is not set 124 - # CONFIG_MARKERS is not set 125 115 CONFIG_HAVE_OPROFILE=y 126 116 # CONFIG_KPROBES is not set 127 117 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y ··· 132 124 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 133 125 CONFIG_SLABINFO=y 134 126 CONFIG_RT_MUTEXES=y 135 - # CONFIG_TINY_SHMEM is not set 136 127 CONFIG_BASE_SMALL=0 137 128 CONFIG_MODULES=y 138 129 # CONFIG_MODULE_FORCE_LOAD is not set ··· 139 132 # CONFIG_MODULE_FORCE_UNLOAD is not set 140 133 # CONFIG_MODVERSIONS is not set 141 134 # CONFIG_MODULE_SRCVERSION_ALL is not set 142 - CONFIG_KMOD=y 143 135 CONFIG_BLOCK=y 144 136 # CONFIG_LBD is not set 145 137 # CONFIG_BLK_DEV_IO_TRACE is not set 146 - # CONFIG_LSF is not set 147 138 # CONFIG_BLK_DEV_BSG is not set 148 139 # CONFIG_BLK_DEV_INTEGRITY is not set 149 140 ··· 157 152 # CONFIG_DEFAULT_CFQ is not set 158 153 CONFIG_DEFAULT_NOOP=y 159 154 CONFIG_DEFAULT_IOSCHED="noop" 160 - CONFIG_CLASSIC_RCU=y 161 155 # CONFIG_FREEZER is not set 162 156 163 157 # ··· 195 191 # CONFIG_TAU is not set 196 192 # CONFIG_FSL_ULI1575 is not set 197 193 CONFIG_PPC_BESTCOMM=y 198 - CONFIG_PPC_BESTCOMM_ATA=y 194 + CONFIG_PPC_BESTCOMM_ATA=m 199 195 CONFIG_PPC_BESTCOMM_FEC=y 200 - CONFIG_PPC_BESTCOMM_GEN_BD=y 196 + # CONFIG_SIMPLE_GPIO is not set 201 197 202 198 # 203 199 # Kernel options ··· 216 212 # CONFIG_PREEMPT_NONE is not set 217 213 # CONFIG_PREEMPT_VOLUNTARY is not set 218 214 CONFIG_PREEMPT=y 219 - # CONFIG_PREEMPT_RCU is not set 220 215 CONFIG_BINFMT_ELF=y 221 216 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 222 217 # CONFIG_HAVE_AOUT is not set ··· 225 222 CONFIG_ARCH_HAS_WALK_MEMORY=y 226 223 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 227 224 # CONFIG_KEXEC is not set 225 + # CONFIG_CRASH_DUMP is not set 228 226 CONFIG_ARCH_FLATMEM_ENABLE=y 229 227 CONFIG_ARCH_POPULATES_NODE_MAP=y 230 228 CONFIG_SELECT_MEMORY_MODEL=y ··· 237 233 CONFIG_PAGEFLAGS_EXTENDED=y 238 234 CONFIG_SPLIT_PTLOCK_CPUS=4 239 235 CONFIG_MIGRATION=y 240 - # CONFIG_RESOURCES_64BIT is not set 241 236 # CONFIG_PHYS_ADDR_T_64BIT is not set 242 237 CONFIG_ZONE_DMA_FLAG=1 243 238 CONFIG_BOUNCE=y 244 239 CONFIG_VIRT_TO_BUS=y 245 240 CONFIG_UNEVICTABLE_LRU=y 241 + CONFIG_PPC_4K_PAGES=y 242 + # CONFIG_PPC_16K_PAGES is not set 243 + # CONFIG_PPC_64K_PAGES is not set 246 244 CONFIG_FORCE_MAX_ZONEORDER=11 247 245 CONFIG_PROC_DEVICETREE=y 248 246 # CONFIG_CMDLINE_BOOL is not set ··· 267 261 CONFIG_ARCH_SUPPORTS_MSI=y 268 262 # CONFIG_PCI_MSI is not set 269 263 CONFIG_PCI_LEGACY=y 264 + # CONFIG_PCI_STUB is not set 270 265 # CONFIG_PCCARD is not set 271 266 # CONFIG_HOTPLUG_PCI is not set 272 267 # CONFIG_HAS_RAPIDIO is not set ··· 290 283 # 291 284 # Networking options 292 285 # 286 + CONFIG_COMPAT_NET_DEV_OPS=y 293 287 CONFIG_PACKET=y 294 288 # CONFIG_PACKET_MMAP is not set 295 289 CONFIG_UNIX=y ··· 341 333 # CONFIG_ECONET is not set 342 334 # CONFIG_WAN_ROUTER is not set 343 335 # CONFIG_NET_SCHED is not set 336 + # CONFIG_DCB is not set 344 337 345 338 # 346 339 # Network testing ··· 354 345 # CONFIG_AF_RXRPC is not set 355 346 # CONFIG_PHONET is not set 356 347 # CONFIG_WIRELESS is not set 348 + # CONFIG_WIMAX is not set 357 349 # CONFIG_RFKILL is not set 358 350 # CONFIG_NET_9P is not set 359 351 ··· 375 365 # CONFIG_MTD_DEBUG is not set 376 366 # CONFIG_MTD_CONCAT is not set 377 367 CONFIG_MTD_PARTITIONS=y 368 + # CONFIG_MTD_TESTS is not set 378 369 # CONFIG_MTD_REDBOOT_PARTS is not set 379 370 CONFIG_MTD_CMDLINE_PARTS=y 380 371 # CONFIG_MTD_OF_PARTS is not set ··· 424 413 # 425 414 # CONFIG_MTD_COMPLEX_MAPPINGS is not set 426 415 CONFIG_MTD_PHYSMAP=y 427 - CONFIG_MTD_PHYSMAP_START=0x0 428 - CONFIG_MTD_PHYSMAP_LEN=0x0 429 - CONFIG_MTD_PHYSMAP_BANKWIDTH=1 416 + # CONFIG_MTD_PHYSMAP_COMPAT is not set 430 417 # CONFIG_MTD_PHYSMAP_OF is not set 431 418 # CONFIG_MTD_INTEL_VR_NOR is not set 432 419 # CONFIG_MTD_PLATRAM is not set ··· 446 437 # CONFIG_MTD_DOC2001PLUS is not set 447 438 # CONFIG_MTD_NAND is not set 448 439 # CONFIG_MTD_ONENAND is not set 440 + 441 + # 442 + # LPDDR flash memory drivers 443 + # 444 + # CONFIG_MTD_LPDDR is not set 445 + # CONFIG_MTD_QINFO_PROBE is not set 449 446 450 447 # 451 448 # UBI - Unsorted block images ··· 602 587 # CONFIG_BROADCOM_PHY is not set 603 588 # CONFIG_ICPLUS_PHY is not set 604 589 # CONFIG_REALTEK_PHY is not set 590 + # CONFIG_NATIONAL_PHY is not set 591 + # CONFIG_STE10XP is not set 592 + # CONFIG_LSI_ET1011C_PHY is not set 605 593 # CONFIG_FIXED_PHY is not set 606 594 # CONFIG_MDIO_BITBANG is not set 607 595 CONFIG_NET_ETHERNET=y ··· 637 619 # CONFIG_WLAN_PRE80211 is not set 638 620 # CONFIG_WLAN_80211 is not set 639 621 # CONFIG_IWLWIFI_LEDS is not set 622 + 623 + # 624 + # Enable WiMAX (Networking options) to see the WiMAX drivers 625 + # 640 626 641 627 # 642 628 # USB Network Adapters ··· 697 675 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600 698 676 # CONFIG_SERIAL_JSM is not set 699 677 CONFIG_UNIX98_PTYS=y 678 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 700 679 # CONFIG_LEGACY_PTYS is not set 680 + # CONFIG_HVC_UDBG is not set 701 681 # CONFIG_IPMI_HANDLER is not set 702 682 CONFIG_HW_RANDOM=y 703 683 # CONFIG_NVRAM is not set ··· 764 740 # Miscellaneous I2C Chip support 765 741 # 766 742 # CONFIG_DS1682 is not set 767 - # CONFIG_EEPROM_AT24 is not set 768 - CONFIG_EEPROM_LEGACY=m 769 743 # CONFIG_SENSORS_PCF8574 is not set 770 744 # CONFIG_PCF8575 is not set 771 745 # CONFIG_SENSORS_PCA9539 is not set ··· 796 774 # CONFIG_MFD_CORE is not set 797 775 # CONFIG_MFD_SM501 is not set 798 776 # CONFIG_HTC_PASIC3 is not set 777 + # CONFIG_TWL4030_CORE is not set 799 778 # CONFIG_MFD_TMIO is not set 800 779 # CONFIG_PMIC_DA903X is not set 801 780 # CONFIG_MFD_WM8400 is not set 802 781 # CONFIG_MFD_WM8350_I2C is not set 782 + # CONFIG_MFD_PCF50633 is not set 803 783 # CONFIG_REGULATOR is not set 804 784 805 785 # ··· 861 837 # 862 838 # CONFIG_USB_C67X00_HCD is not set 863 839 # CONFIG_USB_EHCI_HCD is not set 840 + # CONFIG_USB_OXU210HP_HCD is not set 864 841 # CONFIG_USB_ISP116X_HCD is not set 865 842 # CONFIG_USB_ISP1760_HCD is not set 866 843 CONFIG_USB_OHCI_HCD=m ··· 889 864 # CONFIG_USB_TMC is not set 890 865 891 866 # 892 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 867 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 893 868 # 894 869 895 870 # 896 - # may also be needed; see USB_STORAGE Help for more information 871 + # see USB_STORAGE Help for more information 897 872 # 898 873 CONFIG_USB_STORAGE=m 899 874 # CONFIG_USB_STORAGE_DEBUG is not set 900 875 # CONFIG_USB_STORAGE_DATAFAB is not set 901 876 # CONFIG_USB_STORAGE_FREECOM is not set 902 877 # CONFIG_USB_STORAGE_ISD200 is not set 903 - # CONFIG_USB_STORAGE_DPCM is not set 904 878 # CONFIG_USB_STORAGE_USBAT is not set 905 879 # CONFIG_USB_STORAGE_SDDR09 is not set 906 880 # CONFIG_USB_STORAGE_SDDR55 is not set ··· 945 921 # CONFIG_USB_ISIGHTFW is not set 946 922 # CONFIG_USB_VST is not set 947 923 # CONFIG_USB_GADGET is not set 924 + 925 + # 926 + # OTG and related infrastructure 927 + # 948 928 # CONFIG_UWB is not set 949 929 # CONFIG_MMC is not set 950 930 # CONFIG_MEMSTICK is not set ··· 1011 983 # CONFIG_DMADEVICES is not set 1012 984 # CONFIG_UIO is not set 1013 985 # CONFIG_STAGING is not set 1014 - CONFIG_STAGING_EXCLUDE_BUILD=y 1015 986 1016 987 # 1017 988 # File systems ··· 1031 1004 CONFIG_FILE_LOCKING=y 1032 1005 # CONFIG_XFS_FS is not set 1033 1006 # CONFIG_OCFS2_FS is not set 1007 + # CONFIG_BTRFS_FS is not set 1034 1008 # CONFIG_DNOTIFY is not set 1035 1009 # CONFIG_INOTIFY is not set 1036 1010 # CONFIG_QUOTA is not set ··· 1067 1039 # CONFIG_TMPFS_POSIX_ACL is not set 1068 1040 # CONFIG_HUGETLB_PAGE is not set 1069 1041 # CONFIG_CONFIGFS_FS is not set 1070 - 1071 - # 1072 - # Miscellaneous filesystems 1073 - # 1042 + CONFIG_MISC_FILESYSTEMS=y 1074 1043 # CONFIG_ADFS_FS is not set 1075 1044 # CONFIG_AFFS_FS is not set 1076 1045 # CONFIG_HFS_FS is not set ··· 1087 1062 CONFIG_JFFS2_RTIME=y 1088 1063 # CONFIG_JFFS2_RUBIN is not set 1089 1064 # CONFIG_CRAMFS is not set 1065 + # CONFIG_SQUASHFS is not set 1090 1066 # CONFIG_VXFS_FS is not set 1091 1067 # CONFIG_MINIX_FS is not set 1092 1068 # CONFIG_OMFS_FS is not set ··· 1167 1141 # Library routines 1168 1142 # 1169 1143 CONFIG_BITREVERSE=y 1144 + CONFIG_GENERIC_FIND_LAST_BIT=y 1170 1145 # CONFIG_CRC_CCITT is not set 1171 1146 # CONFIG_CRC16 is not set 1172 1147 # CONFIG_CRC_T10DIF is not set ··· 1200 1173 # CONFIG_RCU_CPU_STALL_DETECTOR is not set 1201 1174 # CONFIG_LATENCYTOP is not set 1202 1175 CONFIG_HAVE_FUNCTION_TRACER=y 1176 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1177 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1203 1178 1204 1179 # 1205 1180 # Tracers ··· 1209 1180 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1210 1181 # CONFIG_SAMPLES is not set 1211 1182 CONFIG_HAVE_ARCH_KGDB=y 1183 + CONFIG_PRINT_STACK_DEPTH=64 1212 1184 # CONFIG_IRQSTACKS is not set 1213 1185 # CONFIG_BOOTX_TEXT is not set 1214 1186 # CONFIG_PPC_EARLY_DEBUG is not set
+65 -24
arch/powerpc/configs/52xx/tqm5200_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:09:30 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:42:58 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 71 71 # CONFIG_BSD_PROCESS_ACCT is not set 72 72 # CONFIG_TASKSTATS is not set 73 73 # CONFIG_AUDIT is not set 74 + 75 + # 76 + # RCU Subsystem 77 + # 78 + CONFIG_CLASSIC_RCU=y 79 + # CONFIG_TREE_RCU is not set 80 + # CONFIG_PREEMPT_RCU is not set 81 + # CONFIG_TREE_RCU_TRACE is not set 82 + # CONFIG_PREEMPT_RCU_TRACE is not set 74 83 # CONFIG_IKCONFIG is not set 75 84 CONFIG_LOG_BUF_SHIFT=14 76 - # CONFIG_CGROUPS is not set 77 85 CONFIG_GROUP_SCHED=y 78 86 CONFIG_FAIR_GROUP_SCHED=y 79 87 # CONFIG_RT_GROUP_SCHED is not set 80 88 CONFIG_USER_SCHED=y 81 89 # CONFIG_CGROUP_SCHED is not set 90 + # CONFIG_CGROUPS is not set 82 91 CONFIG_SYSFS_DEPRECATED=y 83 92 CONFIG_SYSFS_DEPRECATED_V2=y 84 93 # CONFIG_RELAY is not set ··· 119 110 CONFIG_SLUB=y 120 111 # CONFIG_SLOB is not set 121 112 # CONFIG_PROFILING is not set 122 - # CONFIG_MARKERS is not set 123 113 CONFIG_HAVE_OPROFILE=y 124 114 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 125 115 CONFIG_HAVE_IOREMAP_PROT=y ··· 129 121 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 130 122 CONFIG_SLABINFO=y 131 123 CONFIG_RT_MUTEXES=y 132 - # CONFIG_TINY_SHMEM is not set 133 124 CONFIG_BASE_SMALL=0 134 125 CONFIG_MODULES=y 135 126 # CONFIG_MODULE_FORCE_LOAD is not set ··· 136 129 # CONFIG_MODULE_FORCE_UNLOAD is not set 137 130 CONFIG_MODVERSIONS=y 138 131 # CONFIG_MODULE_SRCVERSION_ALL is not set 139 - CONFIG_KMOD=y 140 132 CONFIG_BLOCK=y 141 133 # CONFIG_LBD is not set 142 134 # CONFIG_BLK_DEV_IO_TRACE is not set 143 - # CONFIG_LSF is not set 144 135 # CONFIG_BLK_DEV_BSG is not set 145 136 # CONFIG_BLK_DEV_INTEGRITY is not set 146 137 ··· 154 149 # CONFIG_DEFAULT_CFQ is not set 155 150 # CONFIG_DEFAULT_NOOP is not set 156 151 CONFIG_DEFAULT_IOSCHED="anticipatory" 157 - CONFIG_CLASSIC_RCU=y 158 152 # CONFIG_FREEZER is not set 159 153 160 154 # ··· 192 188 # CONFIG_TAU is not set 193 189 # CONFIG_FSL_ULI1575 is not set 194 190 CONFIG_PPC_BESTCOMM=y 195 - # CONFIG_PPC_BESTCOMM_ATA is not set 191 + CONFIG_PPC_BESTCOMM_ATA=y 196 192 CONFIG_PPC_BESTCOMM_FEC=y 197 - # CONFIG_PPC_BESTCOMM_GEN_BD is not set 193 + # CONFIG_SIMPLE_GPIO is not set 198 194 199 195 # 200 196 # Kernel options ··· 221 217 CONFIG_ARCH_HAS_WALK_MEMORY=y 222 218 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 223 219 # CONFIG_KEXEC is not set 220 + # CONFIG_CRASH_DUMP is not set 224 221 CONFIG_ARCH_FLATMEM_ENABLE=y 225 222 CONFIG_ARCH_POPULATES_NODE_MAP=y 226 223 CONFIG_SELECT_MEMORY_MODEL=y ··· 233 228 CONFIG_PAGEFLAGS_EXTENDED=y 234 229 CONFIG_SPLIT_PTLOCK_CPUS=4 235 230 CONFIG_MIGRATION=y 236 - # CONFIG_RESOURCES_64BIT is not set 237 231 # CONFIG_PHYS_ADDR_T_64BIT is not set 238 232 CONFIG_ZONE_DMA_FLAG=1 239 233 CONFIG_BOUNCE=y 240 234 CONFIG_VIRT_TO_BUS=y 241 235 CONFIG_UNEVICTABLE_LRU=y 236 + CONFIG_PPC_4K_PAGES=y 237 + # CONFIG_PPC_16K_PAGES is not set 238 + # CONFIG_PPC_64K_PAGES is not set 242 239 CONFIG_FORCE_MAX_ZONEORDER=11 243 240 CONFIG_PROC_DEVICETREE=y 244 241 # CONFIG_CMDLINE_BOOL is not set ··· 281 274 # 282 275 # Networking options 283 276 # 277 + CONFIG_COMPAT_NET_DEV_OPS=y 284 278 CONFIG_PACKET=y 285 279 # CONFIG_PACKET_MMAP is not set 286 280 CONFIG_UNIX=y ··· 338 330 # CONFIG_ECONET is not set 339 331 # CONFIG_WAN_ROUTER is not set 340 332 # CONFIG_NET_SCHED is not set 333 + # CONFIG_DCB is not set 341 334 342 335 # 343 336 # Network testing ··· 351 342 # CONFIG_AF_RXRPC is not set 352 343 # CONFIG_PHONET is not set 353 344 # CONFIG_WIRELESS is not set 345 + # CONFIG_WIMAX is not set 354 346 # CONFIG_RFKILL is not set 355 347 # CONFIG_NET_9P is not set 356 348 ··· 374 364 # CONFIG_MTD_DEBUG is not set 375 365 CONFIG_MTD_CONCAT=y 376 366 CONFIG_MTD_PARTITIONS=y 367 + # CONFIG_MTD_TESTS is not set 377 368 # CONFIG_MTD_REDBOOT_PARTS is not set 378 369 CONFIG_MTD_CMDLINE_PARTS=y 379 370 # CONFIG_MTD_OF_PARTS is not set ··· 444 433 # CONFIG_MTD_ONENAND is not set 445 434 446 435 # 436 + # LPDDR flash memory drivers 437 + # 438 + # CONFIG_MTD_LPDDR is not set 439 + # CONFIG_MTD_QINFO_PROBE is not set 440 + 441 + # 447 442 # UBI - Unsorted block images 448 443 # 449 444 # CONFIG_MTD_UBI is not set ··· 513 496 # CONFIG_SCSI_SRP_ATTRS is not set 514 497 CONFIG_SCSI_LOWLEVEL=y 515 498 # CONFIG_ISCSI_TCP is not set 499 + # CONFIG_LIBFC is not set 516 500 # CONFIG_SCSI_DEBUG is not set 517 501 # CONFIG_SCSI_DH is not set 518 502 CONFIG_ATA=y ··· 548 530 # CONFIG_BROADCOM_PHY is not set 549 531 # CONFIG_ICPLUS_PHY is not set 550 532 # CONFIG_REALTEK_PHY is not set 533 + # CONFIG_NATIONAL_PHY is not set 534 + # CONFIG_STE10XP is not set 535 + # CONFIG_LSI_ET1011C_PHY is not set 551 536 # CONFIG_FIXED_PHY is not set 552 537 # CONFIG_MDIO_BITBANG is not set 553 538 CONFIG_NET_ETHERNET=y ··· 574 553 # CONFIG_WLAN_PRE80211 is not set 575 554 # CONFIG_WLAN_80211 is not set 576 555 # CONFIG_IWLWIFI_LEDS is not set 556 + 557 + # 558 + # Enable WiMAX (Networking options) to see the WiMAX drivers 559 + # 577 560 578 561 # 579 562 # USB Network Adapters ··· 629 604 CONFIG_SERIAL_MPC52xx_CONSOLE=y 630 605 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 631 606 CONFIG_UNIX98_PTYS=y 607 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 632 608 CONFIG_LEGACY_PTYS=y 633 609 CONFIG_LEGACY_PTY_COUNT=256 610 + # CONFIG_HVC_UDBG is not set 634 611 # CONFIG_IPMI_HANDLER is not set 635 612 # CONFIG_HW_RANDOM is not set 636 613 # CONFIG_NVRAM is not set ··· 672 645 # Miscellaneous I2C Chip support 673 646 # 674 647 # CONFIG_DS1682 is not set 675 - # CONFIG_EEPROM_AT24 is not set 676 - # CONFIG_EEPROM_LEGACY is not set 677 648 # CONFIG_SENSORS_PCF8574 is not set 678 649 # CONFIG_PCF8575 is not set 679 650 # CONFIG_SENSORS_PCA9539 is not set ··· 700 675 # CONFIG_SENSORS_ADT7462 is not set 701 676 # CONFIG_SENSORS_ADT7470 is not set 702 677 # CONFIG_SENSORS_ADT7473 is not set 678 + # CONFIG_SENSORS_ADT7475 is not set 703 679 # CONFIG_SENSORS_ATXP1 is not set 704 680 # CONFIG_SENSORS_DS1621 is not set 705 681 # CONFIG_SENSORS_F71805F is not set ··· 720 694 # CONFIG_SENSORS_LM90 is not set 721 695 # CONFIG_SENSORS_LM92 is not set 722 696 # CONFIG_SENSORS_LM93 is not set 697 + # CONFIG_SENSORS_LTC4245 is not set 723 698 # CONFIG_SENSORS_MAX1619 is not set 724 699 # CONFIG_SENSORS_MAX6650 is not set 725 700 # CONFIG_SENSORS_PC87360 is not set ··· 769 742 # CONFIG_MFD_CORE is not set 770 743 # CONFIG_MFD_SM501 is not set 771 744 # CONFIG_HTC_PASIC3 is not set 745 + # CONFIG_TWL4030_CORE is not set 772 746 # CONFIG_MFD_TMIO is not set 773 747 # CONFIG_PMIC_DA903X is not set 774 748 # CONFIG_MFD_WM8400 is not set 775 749 # CONFIG_MFD_WM8350_I2C is not set 750 + # CONFIG_MFD_PCF50633 is not set 776 751 # CONFIG_REGULATOR is not set 777 752 778 753 # ··· 832 803 # USB Host Controller Drivers 833 804 # 834 805 # CONFIG_USB_C67X00_HCD is not set 806 + # CONFIG_USB_OXU210HP_HCD is not set 835 807 # CONFIG_USB_ISP116X_HCD is not set 836 808 # CONFIG_USB_ISP1760_HCD is not set 837 809 CONFIG_USB_OHCI_HCD=y ··· 857 827 # CONFIG_USB_TMC is not set 858 828 859 829 # 860 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 830 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 861 831 # 862 832 863 833 # 864 - # may also be needed; see USB_STORAGE Help for more information 834 + # see USB_STORAGE Help for more information 865 835 # 866 836 CONFIG_USB_STORAGE=y 867 837 # CONFIG_USB_STORAGE_DEBUG is not set 868 838 # CONFIG_USB_STORAGE_DATAFAB is not set 869 839 # CONFIG_USB_STORAGE_FREECOM is not set 870 840 # CONFIG_USB_STORAGE_ISD200 is not set 871 - # CONFIG_USB_STORAGE_DPCM is not set 872 841 # CONFIG_USB_STORAGE_USBAT is not set 873 842 # CONFIG_USB_STORAGE_SDDR09 is not set 874 843 # CONFIG_USB_STORAGE_SDDR55 is not set ··· 913 884 # CONFIG_USB_ISIGHTFW is not set 914 885 # CONFIG_USB_VST is not set 915 886 # CONFIG_USB_GADGET is not set 887 + 888 + # 889 + # OTG and related infrastructure 890 + # 916 891 # CONFIG_MMC is not set 917 892 # CONFIG_MEMSTICK is not set 918 893 # CONFIG_NEW_LEDS is not set ··· 980 947 # CONFIG_DMADEVICES is not set 981 948 # CONFIG_UIO is not set 982 949 # CONFIG_STAGING is not set 983 - CONFIG_STAGING_EXCLUDE_BUILD=y 984 950 985 951 # 986 952 # File systems ··· 1000 968 CONFIG_FILE_LOCKING=y 1001 969 # CONFIG_XFS_FS is not set 1002 970 # CONFIG_OCFS2_FS is not set 971 + # CONFIG_BTRFS_FS is not set 1003 972 CONFIG_DNOTIFY=y 1004 973 CONFIG_INOTIFY=y 1005 974 CONFIG_INOTIFY_USER=y ··· 1037 1004 # CONFIG_TMPFS_POSIX_ACL is not set 1038 1005 # CONFIG_HUGETLB_PAGE is not set 1039 1006 # CONFIG_CONFIGFS_FS is not set 1040 - 1041 - # 1042 - # Miscellaneous filesystems 1043 - # 1007 + CONFIG_MISC_FILESYSTEMS=y 1044 1008 # CONFIG_ADFS_FS is not set 1045 1009 # CONFIG_AFFS_FS is not set 1046 1010 # CONFIG_HFS_FS is not set ··· 1057 1027 CONFIG_JFFS2_RTIME=y 1058 1028 # CONFIG_JFFS2_RUBIN is not set 1059 1029 CONFIG_CRAMFS=y 1030 + # CONFIG_SQUASHFS is not set 1060 1031 # CONFIG_VXFS_FS is not set 1061 1032 # CONFIG_MINIX_FS is not set 1062 1033 # CONFIG_OMFS_FS is not set ··· 1154 1123 # Library routines 1155 1124 # 1156 1125 CONFIG_BITREVERSE=y 1126 + CONFIG_GENERIC_FIND_LAST_BIT=y 1157 1127 # CONFIG_CRC_CCITT is not set 1158 1128 # CONFIG_CRC16 is not set 1159 1129 # CONFIG_CRC_T10DIF is not set ··· 1206 1174 # CONFIG_DEBUG_MEMORY_INIT is not set 1207 1175 # CONFIG_DEBUG_LIST is not set 1208 1176 # CONFIG_DEBUG_SG is not set 1177 + # CONFIG_DEBUG_NOTIFIERS is not set 1209 1178 # CONFIG_BOOT_PRINTK_DELAY is not set 1210 1179 # CONFIG_RCU_TORTURE_TEST is not set 1211 1180 # CONFIG_RCU_CPU_STALL_DETECTOR is not set ··· 1215 1182 # CONFIG_FAULT_INJECTION is not set 1216 1183 # CONFIG_LATENCYTOP is not set 1217 1184 CONFIG_HAVE_FUNCTION_TRACER=y 1185 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1186 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1218 1187 1219 1188 # 1220 1189 # Tracers ··· 1225 1190 # CONFIG_SCHED_TRACER is not set 1226 1191 # CONFIG_CONTEXT_SWITCH_TRACER is not set 1227 1192 # CONFIG_BOOT_TRACER is not set 1193 + # CONFIG_TRACE_BRANCH_PROFILING is not set 1228 1194 # CONFIG_STACK_TRACER is not set 1229 1195 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1230 1196 # CONFIG_SAMPLES is not set 1231 1197 CONFIG_HAVE_ARCH_KGDB=y 1232 1198 # CONFIG_KGDB is not set 1199 + CONFIG_PRINT_STACK_DEPTH=64 1233 1200 # CONFIG_DEBUG_STACKOVERFLOW is not set 1234 1201 # CONFIG_DEBUG_STACK_USAGE is not set 1235 1202 # CONFIG_DEBUG_PAGEALLOC is not set ··· 1258 1221 # 1259 1222 # CONFIG_CRYPTO_FIPS is not set 1260 1223 CONFIG_CRYPTO_ALGAPI=y 1261 - CONFIG_CRYPTO_AEAD=y 1224 + CONFIG_CRYPTO_ALGAPI2=y 1225 + CONFIG_CRYPTO_AEAD2=y 1262 1226 CONFIG_CRYPTO_BLKCIPHER=y 1227 + CONFIG_CRYPTO_BLKCIPHER2=y 1263 1228 CONFIG_CRYPTO_HASH=y 1264 - CONFIG_CRYPTO_RNG=y 1229 + CONFIG_CRYPTO_HASH2=y 1230 + CONFIG_CRYPTO_RNG2=y 1265 1231 CONFIG_CRYPTO_MANAGER=y 1232 + CONFIG_CRYPTO_MANAGER2=y 1266 1233 # CONFIG_CRYPTO_GF128MUL is not set 1267 1234 # CONFIG_CRYPTO_NULL is not set 1268 1235 # CONFIG_CRYPTO_CRYPTD is not set
+77 -27
arch/powerpc/configs/mpc5200_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.28-rc4 4 - # Thu Nov 13 02:09:07 2008 3 + # Linux kernel version: 2.6.29-rc2 4 + # Mon Jan 26 21:40:44 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 43 43 CONFIG_PPC=y 44 44 CONFIG_EARLY_PRINTK=y 45 45 CONFIG_GENERIC_NVRAM=y 46 - CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 46 + CONFIG_SCHED_OMIT_FRAME_POINTER=y 47 47 CONFIG_ARCH_MAY_HAVE_PC_FDC=y 48 48 CONFIG_PPC_OF=y 49 49 CONFIG_OF=y ··· 72 72 # CONFIG_BSD_PROCESS_ACCT is not set 73 73 # CONFIG_TASKSTATS is not set 74 74 # CONFIG_AUDIT is not set 75 + 76 + # 77 + # RCU Subsystem 78 + # 79 + CONFIG_CLASSIC_RCU=y 80 + # CONFIG_TREE_RCU is not set 81 + # CONFIG_PREEMPT_RCU is not set 82 + # CONFIG_TREE_RCU_TRACE is not set 83 + # CONFIG_PREEMPT_RCU_TRACE is not set 75 84 # CONFIG_IKCONFIG is not set 76 85 CONFIG_LOG_BUF_SHIFT=14 77 - # CONFIG_CGROUPS is not set 78 86 # CONFIG_GROUP_SCHED is not set 87 + # CONFIG_CGROUPS is not set 79 88 CONFIG_SYSFS_DEPRECATED=y 80 89 CONFIG_SYSFS_DEPRECATED_V2=y 81 90 # CONFIG_RELAY is not set ··· 117 108 CONFIG_SLUB=y 118 109 # CONFIG_SLOB is not set 119 110 # CONFIG_PROFILING is not set 120 - # CONFIG_MARKERS is not set 121 111 CONFIG_HAVE_OPROFILE=y 122 112 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 123 113 CONFIG_HAVE_IOREMAP_PROT=y ··· 127 119 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 128 120 CONFIG_SLABINFO=y 129 121 CONFIG_RT_MUTEXES=y 130 - # CONFIG_TINY_SHMEM is not set 131 122 CONFIG_BASE_SMALL=0 132 123 CONFIG_MODULES=y 133 124 # CONFIG_MODULE_FORCE_LOAD is not set ··· 134 127 # CONFIG_MODULE_FORCE_UNLOAD is not set 135 128 # CONFIG_MODVERSIONS is not set 136 129 # CONFIG_MODULE_SRCVERSION_ALL is not set 137 - CONFIG_KMOD=y 138 130 CONFIG_BLOCK=y 139 131 # CONFIG_LBD is not set 140 132 # CONFIG_BLK_DEV_IO_TRACE is not set 141 - # CONFIG_LSF is not set 142 133 # CONFIG_BLK_DEV_BSG is not set 143 134 # CONFIG_BLK_DEV_INTEGRITY is not set 144 135 ··· 152 147 # CONFIG_DEFAULT_CFQ is not set 153 148 # CONFIG_DEFAULT_NOOP is not set 154 149 CONFIG_DEFAULT_IOSCHED="anticipatory" 155 - CONFIG_CLASSIC_RCU=y 156 150 CONFIG_FREEZER=y 157 151 158 152 # ··· 196 192 CONFIG_PPC_BESTCOMM=y 197 193 CONFIG_PPC_BESTCOMM_ATA=y 198 194 CONFIG_PPC_BESTCOMM_FEC=y 199 - CONFIG_PPC_BESTCOMM_GEN_BD=y 195 + # CONFIG_SIMPLE_GPIO is not set 200 196 201 197 # 202 198 # Kernel options ··· 224 220 CONFIG_ARCH_HAS_WALK_MEMORY=y 225 221 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 226 222 # CONFIG_KEXEC is not set 223 + # CONFIG_CRASH_DUMP is not set 227 224 CONFIG_ARCH_FLATMEM_ENABLE=y 228 225 CONFIG_ARCH_POPULATES_NODE_MAP=y 229 226 CONFIG_SELECT_MEMORY_MODEL=y ··· 236 231 CONFIG_PAGEFLAGS_EXTENDED=y 237 232 CONFIG_SPLIT_PTLOCK_CPUS=4 238 233 CONFIG_MIGRATION=y 239 - # CONFIG_RESOURCES_64BIT is not set 240 234 # CONFIG_PHYS_ADDR_T_64BIT is not set 241 235 CONFIG_ZONE_DMA_FLAG=1 242 236 CONFIG_BOUNCE=y 243 237 CONFIG_VIRT_TO_BUS=y 244 238 CONFIG_UNEVICTABLE_LRU=y 239 + CONFIG_PPC_4K_PAGES=y 240 + # CONFIG_PPC_16K_PAGES is not set 241 + # CONFIG_PPC_64K_PAGES is not set 245 242 CONFIG_FORCE_MAX_ZONEORDER=11 246 243 CONFIG_PROC_DEVICETREE=y 247 244 # CONFIG_CMDLINE_BOOL is not set ··· 271 264 # CONFIG_PCI_MSI is not set 272 265 CONFIG_PCI_LEGACY=y 273 266 # CONFIG_PCI_DEBUG is not set 267 + # CONFIG_PCI_STUB is not set 274 268 # CONFIG_PCCARD is not set 275 269 # CONFIG_HOTPLUG_PCI is not set 276 270 # CONFIG_HAS_RAPIDIO is not set ··· 294 286 # 295 287 # Networking options 296 288 # 289 + CONFIG_COMPAT_NET_DEV_OPS=y 297 290 CONFIG_PACKET=y 298 291 # CONFIG_PACKET_MMAP is not set 299 292 CONFIG_UNIX=y ··· 351 342 # CONFIG_ECONET is not set 352 343 # CONFIG_WAN_ROUTER is not set 353 344 # CONFIG_NET_SCHED is not set 345 + # CONFIG_DCB is not set 354 346 355 347 # 356 348 # Network testing ··· 364 354 # CONFIG_AF_RXRPC is not set 365 355 # CONFIG_PHONET is not set 366 356 # CONFIG_WIRELESS is not set 357 + # CONFIG_WIMAX is not set 367 358 # CONFIG_RFKILL is not set 368 359 # CONFIG_NET_9P is not set 369 360 ··· 387 376 # CONFIG_MTD_DEBUG is not set 388 377 CONFIG_MTD_CONCAT=y 389 378 CONFIG_MTD_PARTITIONS=y 379 + # CONFIG_MTD_TESTS is not set 390 380 # CONFIG_MTD_REDBOOT_PARTS is not set 391 381 CONFIG_MTD_CMDLINE_PARTS=y 392 382 # CONFIG_MTD_OF_PARTS is not set ··· 459 447 # CONFIG_MTD_ONENAND is not set 460 448 461 449 # 450 + # LPDDR flash memory drivers 451 + # 452 + # CONFIG_MTD_LPDDR is not set 453 + # CONFIG_MTD_QINFO_PROBE is not set 454 + 455 + # 462 456 # UBI - Unsorted block images 463 457 # 464 458 # CONFIG_MTD_UBI is not set ··· 492 474 # CONFIG_BLK_DEV_HD is not set 493 475 CONFIG_MISC_DEVICES=y 494 476 # CONFIG_PHANTOM is not set 495 - # CONFIG_EEPROM_93CX6 is not set 496 477 # CONFIG_SGI_IOC4 is not set 497 478 # CONFIG_TIFM_CORE is not set 498 479 # CONFIG_ICS932S401 is not set 499 480 # CONFIG_ENCLOSURE_SERVICES is not set 500 481 # CONFIG_HP_ILO is not set 501 482 # CONFIG_C2PORT is not set 483 + 484 + # 485 + # EEPROM support 486 + # 487 + # CONFIG_EEPROM_AT24 is not set 488 + # CONFIG_EEPROM_LEGACY is not set 489 + # CONFIG_EEPROM_93CX6 is not set 502 490 CONFIG_HAVE_IDE=y 503 491 # CONFIG_IDE is not set 504 492 ··· 563 539 # CONFIG_MEGARAID_SAS is not set 564 540 # CONFIG_SCSI_HPTIOP is not set 565 541 # CONFIG_SCSI_BUSLOGIC is not set 542 + # CONFIG_LIBFC is not set 543 + # CONFIG_FCOE is not set 566 544 # CONFIG_SCSI_DMX3191D is not set 567 545 # CONFIG_SCSI_EATA is not set 568 546 # CONFIG_SCSI_FUTURE_DOMAIN is not set ··· 685 659 # CONFIG_BROADCOM_PHY is not set 686 660 # CONFIG_ICPLUS_PHY is not set 687 661 # CONFIG_REALTEK_PHY is not set 662 + # CONFIG_NATIONAL_PHY is not set 663 + # CONFIG_STE10XP is not set 664 + # CONFIG_LSI_ET1011C_PHY is not set 688 665 # CONFIG_FIXED_PHY is not set 689 666 # CONFIG_MDIO_BITBANG is not set 690 667 CONFIG_NET_ETHERNET=y ··· 720 691 # CONFIG_WLAN_PRE80211 is not set 721 692 # CONFIG_WLAN_80211 is not set 722 693 # CONFIG_IWLWIFI_LEDS is not set 694 + 695 + # 696 + # Enable WiMAX (Networking options) to see the WiMAX drivers 697 + # 723 698 724 699 # 725 700 # USB Network Adapters ··· 807 774 CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 808 775 # CONFIG_SERIAL_JSM is not set 809 776 CONFIG_UNIX98_PTYS=y 777 + # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 810 778 CONFIG_LEGACY_PTYS=y 811 779 CONFIG_LEGACY_PTY_COUNT=256 812 780 # CONFIG_HVC_RTAS is not set 781 + # CONFIG_HVC_UDBG is not set 813 782 # CONFIG_IPMI_HANDLER is not set 814 783 # CONFIG_HW_RANDOM is not set 815 784 # CONFIG_NVRAM is not set ··· 879 844 # Miscellaneous I2C Chip support 880 845 # 881 846 # CONFIG_DS1682 is not set 882 - # CONFIG_EEPROM_AT24 is not set 883 - # CONFIG_EEPROM_LEGACY is not set 884 847 # CONFIG_SENSORS_PCF8574 is not set 885 848 # CONFIG_PCF8575 is not set 886 849 # CONFIG_SENSORS_PCA9539 is not set ··· 907 874 # CONFIG_SENSORS_ADT7462 is not set 908 875 # CONFIG_SENSORS_ADT7470 is not set 909 876 # CONFIG_SENSORS_ADT7473 is not set 877 + # CONFIG_SENSORS_ADT7475 is not set 910 878 # CONFIG_SENSORS_ATXP1 is not set 911 879 # CONFIG_SENSORS_DS1621 is not set 912 880 # CONFIG_SENSORS_I5K_AMB is not set ··· 928 894 # CONFIG_SENSORS_LM90 is not set 929 895 # CONFIG_SENSORS_LM92 is not set 930 896 # CONFIG_SENSORS_LM93 is not set 897 + # CONFIG_SENSORS_LTC4245 is not set 931 898 # CONFIG_SENSORS_MAX1619 is not set 932 899 # CONFIG_SENSORS_MAX6650 is not set 933 900 # CONFIG_SENSORS_PC87360 is not set ··· 988 953 # CONFIG_MFD_CORE is not set 989 954 # CONFIG_MFD_SM501 is not set 990 955 # CONFIG_HTC_PASIC3 is not set 956 + # CONFIG_TWL4030_CORE is not set 991 957 # CONFIG_MFD_TMIO is not set 992 958 # CONFIG_PMIC_DA903X is not set 993 959 # CONFIG_MFD_WM8400 is not set 994 960 # CONFIG_MFD_WM8350_I2C is not set 961 + # CONFIG_MFD_PCF50633 is not set 995 962 # CONFIG_REGULATOR is not set 996 963 997 964 # ··· 1088 1051 # CONFIG_LCD_ILI9320 is not set 1089 1052 # CONFIG_LCD_PLATFORM is not set 1090 1053 CONFIG_BACKLIGHT_CLASS_DEVICE=y 1091 - # CONFIG_BACKLIGHT_CORGI is not set 1054 + CONFIG_BACKLIGHT_GENERIC=y 1092 1055 1093 1056 # 1094 1057 # Display device support ··· 1130 1093 CONFIG_HID_A4TECH=y 1131 1094 # CONFIG_HID_APPLE is not set 1132 1095 CONFIG_HID_BELKIN=y 1133 - CONFIG_HID_BRIGHT=y 1134 1096 CONFIG_HID_CHERRY=y 1135 1097 # CONFIG_HID_CHICONY is not set 1136 1098 CONFIG_HID_CYPRESS=y 1137 - CONFIG_HID_DELL=y 1138 1099 CONFIG_HID_EZKEY=y 1139 1100 # CONFIG_HID_GYRATION is not set 1140 1101 # CONFIG_HID_LOGITECH is not set 1141 1102 # CONFIG_HID_MICROSOFT is not set 1142 1103 # CONFIG_HID_MONTEREY is not set 1104 + # CONFIG_HID_NTRIG is not set 1143 1105 # CONFIG_HID_PANTHERLORD is not set 1144 1106 # CONFIG_HID_PETALYNX is not set 1145 1107 # CONFIG_HID_SAMSUNG is not set 1146 1108 # CONFIG_HID_SONY is not set 1147 1109 # CONFIG_HID_SUNPLUS is not set 1110 + # CONFIG_GREENASIA_FF is not set 1111 + # CONFIG_HID_TOPSEED is not set 1148 1112 # CONFIG_THRUSTMASTER_FF is not set 1149 1113 # CONFIG_ZEROPLUS_FF is not set 1150 1114 CONFIG_USB_SUPPORT=y ··· 1175 1137 # 1176 1138 # CONFIG_USB_C67X00_HCD is not set 1177 1139 # CONFIG_USB_EHCI_HCD is not set 1140 + # CONFIG_USB_OXU210HP_HCD is not set 1178 1141 # CONFIG_USB_ISP116X_HCD is not set 1179 1142 # CONFIG_USB_ISP1760_HCD is not set 1180 1143 CONFIG_USB_OHCI_HCD=y ··· 1203 1164 # CONFIG_USB_TMC is not set 1204 1165 1205 1166 # 1206 - # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1167 + # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1207 1168 # 1208 1169 1209 1170 # 1210 - # may also be needed; see USB_STORAGE Help for more information 1171 + # see USB_STORAGE Help for more information 1211 1172 # 1212 1173 CONFIG_USB_STORAGE=y 1213 1174 # CONFIG_USB_STORAGE_DEBUG is not set 1214 1175 # CONFIG_USB_STORAGE_DATAFAB is not set 1215 1176 # CONFIG_USB_STORAGE_FREECOM is not set 1216 1177 # CONFIG_USB_STORAGE_ISD200 is not set 1217 - # CONFIG_USB_STORAGE_DPCM is not set 1218 1178 # CONFIG_USB_STORAGE_USBAT is not set 1219 1179 # CONFIG_USB_STORAGE_SDDR09 is not set 1220 1180 # CONFIG_USB_STORAGE_SDDR55 is not set ··· 1260 1222 # CONFIG_USB_ISIGHTFW is not set 1261 1223 # CONFIG_USB_VST is not set 1262 1224 # CONFIG_USB_GADGET is not set 1225 + 1226 + # 1227 + # OTG and related infrastructure 1228 + # 1263 1229 # CONFIG_UWB is not set 1264 1230 # CONFIG_MMC is not set 1265 1231 # CONFIG_MEMSTICK is not set ··· 1285 1243 # CONFIG_DMADEVICES is not set 1286 1244 # CONFIG_UIO is not set 1287 1245 # CONFIG_STAGING is not set 1288 - CONFIG_STAGING_EXCLUDE_BUILD=y 1289 1246 1290 1247 # 1291 1248 # File systems ··· 1305 1264 CONFIG_FILE_LOCKING=y 1306 1265 # CONFIG_XFS_FS is not set 1307 1266 # CONFIG_OCFS2_FS is not set 1267 + # CONFIG_BTRFS_FS is not set 1308 1268 CONFIG_DNOTIFY=y 1309 1269 CONFIG_INOTIFY=y 1310 1270 CONFIG_INOTIFY_USER=y ··· 1342 1300 # CONFIG_TMPFS_POSIX_ACL is not set 1343 1301 # CONFIG_HUGETLB_PAGE is not set 1344 1302 # CONFIG_CONFIGFS_FS is not set 1345 - 1346 - # 1347 - # Miscellaneous filesystems 1348 - # 1303 + CONFIG_MISC_FILESYSTEMS=y 1349 1304 # CONFIG_ADFS_FS is not set 1350 1305 # CONFIG_AFFS_FS is not set 1351 1306 # CONFIG_HFS_FS is not set ··· 1362 1323 CONFIG_JFFS2_RTIME=y 1363 1324 # CONFIG_JFFS2_RUBIN is not set 1364 1325 CONFIG_CRAMFS=y 1326 + # CONFIG_SQUASHFS is not set 1365 1327 # CONFIG_VXFS_FS is not set 1366 1328 # CONFIG_MINIX_FS is not set 1367 1329 # CONFIG_OMFS_FS is not set ··· 1443 1403 # Library routines 1444 1404 # 1445 1405 CONFIG_BITREVERSE=y 1406 + CONFIG_GENERIC_FIND_LAST_BIT=y 1446 1407 # CONFIG_CRC_CCITT is not set 1447 1408 # CONFIG_CRC16 is not set 1448 1409 # CONFIG_CRC_T10DIF is not set ··· 1495 1454 # CONFIG_DEBUG_MEMORY_INIT is not set 1496 1455 # CONFIG_DEBUG_LIST is not set 1497 1456 # CONFIG_DEBUG_SG is not set 1457 + # CONFIG_DEBUG_NOTIFIERS is not set 1498 1458 # CONFIG_BOOT_PRINTK_DELAY is not set 1499 1459 # CONFIG_RCU_TORTURE_TEST is not set 1500 1460 # CONFIG_RCU_CPU_STALL_DETECTOR is not set ··· 1504 1462 # CONFIG_FAULT_INJECTION is not set 1505 1463 # CONFIG_LATENCYTOP is not set 1506 1464 CONFIG_HAVE_FUNCTION_TRACER=y 1465 + CONFIG_HAVE_DYNAMIC_FTRACE=y 1466 + CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1507 1467 1508 1468 # 1509 1469 # Tracers ··· 1514 1470 # CONFIG_SCHED_TRACER is not set 1515 1471 # CONFIG_CONTEXT_SWITCH_TRACER is not set 1516 1472 # CONFIG_BOOT_TRACER is not set 1473 + # CONFIG_TRACE_BRANCH_PROFILING is not set 1517 1474 # CONFIG_STACK_TRACER is not set 1518 1475 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1519 1476 # CONFIG_SAMPLES is not set 1520 1477 CONFIG_HAVE_ARCH_KGDB=y 1521 1478 # CONFIG_KGDB is not set 1479 + CONFIG_PRINT_STACK_DEPTH=64 1522 1480 # CONFIG_DEBUG_STACKOVERFLOW is not set 1523 1481 # CONFIG_DEBUG_STACK_USAGE is not set 1524 1482 # CONFIG_DEBUG_PAGEALLOC is not set ··· 1547 1501 # 1548 1502 # CONFIG_CRYPTO_FIPS is not set 1549 1503 CONFIG_CRYPTO_ALGAPI=y 1550 - CONFIG_CRYPTO_AEAD=y 1504 + CONFIG_CRYPTO_ALGAPI2=y 1505 + CONFIG_CRYPTO_AEAD2=y 1551 1506 CONFIG_CRYPTO_BLKCIPHER=y 1507 + CONFIG_CRYPTO_BLKCIPHER2=y 1552 1508 CONFIG_CRYPTO_HASH=y 1553 - CONFIG_CRYPTO_RNG=y 1509 + CONFIG_CRYPTO_HASH2=y 1510 + CONFIG_CRYPTO_RNG2=y 1554 1511 CONFIG_CRYPTO_MANAGER=y 1512 + CONFIG_CRYPTO_MANAGER2=y 1555 1513 # CONFIG_CRYPTO_GF128MUL is not set 1556 1514 # CONFIG_CRYPTO_NULL is not set 1557 1515 # CONFIG_CRYPTO_CRYPTD is not set
+2 -3
arch/powerpc/kernel/pci-common.c
··· 16 16 * 2 of the License, or (at your option) any later version. 17 17 */ 18 18 19 - #define DEBUG 20 - 21 19 #include <linux/kernel.h> 22 20 #include <linux/pci.h> 23 21 #include <linux/string.h> ··· 256 258 } else { 257 259 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 258 260 oirq.size, oirq.specifier[0], oirq.specifier[1], 259 - oirq.controller->full_name); 261 + oirq.controller ? oirq.controller->full_name : 262 + "<default>"); 260 263 261 264 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 262 265 oirq.size);
+10 -14
arch/powerpc/platforms/52xx/mpc52xx_pci.c
··· 20 20 21 21 22 22 /* ======================================================================== */ 23 - /* PCI windows config */ 24 - /* ======================================================================== */ 25 - 26 - #define MPC52xx_PCI_TARGET_IO 0xf0000000 27 - #define MPC52xx_PCI_TARGET_MEM 0x00000000 28 - 29 - 30 - /* ======================================================================== */ 31 23 /* Structures mapping & Defines for PCI Unit */ 32 24 /* ======================================================================== */ 33 25 ··· 236 244 237 245 static void __init 238 246 mpc52xx_pci_setup(struct pci_controller *hose, 239 - struct mpc52xx_pci __iomem *pci_regs) 247 + struct mpc52xx_pci __iomem *pci_regs, phys_addr_t pci_phys) 240 248 { 241 249 struct resource *res; 242 250 u32 tmp; ··· 306 314 /* Set all the IWCR fields at once; they're in the same reg */ 307 315 out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2)); 308 316 309 - out_be32(&pci_regs->tbatr0, 310 - MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO ); 311 - out_be32(&pci_regs->tbatr1, 312 - MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM ); 317 + /* Map IMMR onto PCI bus */ 318 + pci_phys &= 0xfffc0000; /* bar0 has only 14 significant bits */ 319 + out_be32(&pci_regs->tbatr0, MPC52xx_PCI_TBATR_ENABLE | pci_phys); 320 + out_be32(&pci_regs->bar0, PCI_BASE_ADDRESS_MEM_PREFETCH | pci_phys); 321 + 322 + /* Map memory onto PCI bus */ 323 + out_be32(&pci_regs->tbatr1, MPC52xx_PCI_TBATR_ENABLE); 324 + out_be32(&pci_regs->bar1, PCI_BASE_ADDRESS_MEM_PREFETCH); 313 325 314 326 out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8); 315 327 ··· 410 414 411 415 /* Finish setting up PCI using values obtained by 412 416 * pci_proces_bridge_OF_ranges */ 413 - mpc52xx_pci_setup(hose, pci_regs); 417 + mpc52xx_pci_setup(hose, pci_regs, rsrc.start); 414 418 415 419 return 0; 416 420 }
+5 -6
arch/x86/boot/video-vesa.c
··· 269 269 we genuinely have to assume all registers are destroyed here. */ 270 270 271 271 asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es" 272 - : "+a" (ax), "+b" (bx) 273 - : "c" (cx), "D" (di) 274 - : "esi"); 272 + : "+a" (ax), "+b" (bx), "+c" (cx), "+D" (di) 273 + : : "esi", "edx"); 275 274 276 275 if (ax != 0x004f) 277 276 return; /* No EDID */ ··· 284 285 dx = 0; /* EDID block number */ 285 286 di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */ 286 287 asm(INT10 287 - : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info) 288 - : "c" (cx), "D" (di) 289 - : "esi"); 288 + : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info), 289 + "+c" (cx), "+D" (di) 290 + : : "esi"); 290 291 #endif /* CONFIG_FIRMWARE_EDID */ 291 292 } 292 293
+1
arch/x86/include/asm/e820.h
··· 49 49 #define E820_RESERVED_KERN 128 50 50 51 51 #ifndef __ASSEMBLY__ 52 + #include <linux/types.h> 52 53 struct e820entry { 53 54 __u64 addr; /* start of memory segment */ 54 55 __u64 size; /* size of memory segment */
+1 -1
arch/x86/include/asm/kvm.h
··· 6 6 * 7 7 */ 8 8 9 - #include <asm/types.h> 9 + #include <linux/types.h> 10 10 #include <linux/ioctl.h> 11 11 12 12 /* Architectural interrupt line count. */
+1 -4
arch/x86/include/asm/mce.h
··· 3 3 4 4 #ifdef __x86_64__ 5 5 6 + #include <linux/types.h> 6 7 #include <asm/ioctls.h> 7 - #include <asm/types.h> 8 8 9 9 /* 10 10 * Machine Check support for x86 ··· 115 115 116 116 #endif /* !CONFIG_X86_32 */ 117 117 118 - 119 - 120 118 #ifdef CONFIG_X86_MCE 121 119 extern void mcheck_init(struct cpuinfo_x86 *c); 122 120 #else ··· 124 126 extern void restart_mce(void); 125 127 126 128 #endif /* __KERNEL__ */ 127 - 128 129 #endif /* _ASM_X86_MCE_H */
+1
arch/x86/include/asm/mtrr.h
··· 23 23 #ifndef _ASM_X86_MTRR_H 24 24 #define _ASM_X86_MTRR_H 25 25 26 + #include <linux/types.h> 26 27 #include <linux/ioctl.h> 27 28 #include <linux/errno.h> 28 29
+1 -1
arch/x86/include/asm/ptrace-abi.h
··· 83 83 #ifdef CONFIG_X86_PTRACE_BTS 84 84 85 85 #ifndef __ASSEMBLY__ 86 - #include <asm/types.h> 86 + #include <linux/types.h> 87 87 88 88 /* configuration/status structure used in PTRACE_BTS_CONFIG and 89 89 PTRACE_BTS_STATUS commands.
+1 -1
arch/x86/include/asm/sigcontext.h
··· 2 2 #define _ASM_X86_SIGCONTEXT_H 3 3 4 4 #include <linux/compiler.h> 5 - #include <asm/types.h> 5 + #include <linux/types.h> 6 6 7 7 #define FP_XSTATE_MAGIC1 0x46505853U 8 8 #define FP_XSTATE_MAGIC2 0x46505845U
+2
arch/x86/include/asm/sigcontext32.h
··· 1 1 #ifndef _ASM_X86_SIGCONTEXT32_H 2 2 #define _ASM_X86_SIGCONTEXT32_H 3 3 4 + #include <linux/types.h> 5 + 4 6 /* signal context for 32bit programs. */ 5 7 6 8 #define X86_FXSR_MAGIC 0x0000
+1 -1
arch/x86/include/asm/swab.h
··· 1 1 #ifndef _ASM_X86_SWAB_H 2 2 #define _ASM_X86_SWAB_H 3 3 4 - #include <asm/types.h> 4 + #include <linux/types.h> 5 5 #include <linux/compiler.h> 6 6 7 7 static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
+1 -1
arch/x86/kernel/cpu/intel.c
··· 30 30 static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) 31 31 { 32 32 /* Unmask CPUID levels if masked: */ 33 - if (c->x86 == 6 && c->x86_model >= 15) { 33 + if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { 34 34 u64 misc_enable; 35 35 36 36 rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
+1 -2
arch/x86/kernel/cpu/mtrr/main.c
··· 1594 1594 1595 1595 /* kvm/qemu doesn't have mtrr set right, don't trim them all */ 1596 1596 if (!highest_pfn) { 1597 - WARN(!kvm_para_available(), KERN_WARNING 1598 - "WARNING: strange, CPU MTRRs all blank?\n"); 1597 + printk(KERN_INFO "CPU MTRRs all blank - virtualized system.\n"); 1599 1598 return 0; 1600 1599 } 1601 1600
+17 -14
arch/x86/kernel/ds.c
··· 15 15 * - buffer allocation (memory accounting) 16 16 * 17 17 * 18 - * Copyright (C) 2007-2008 Intel Corporation. 19 - * Markus Metzger <markus.t.metzger@intel.com>, 2007-2008 18 + * Copyright (C) 2007-2009 Intel Corporation. 19 + * Markus Metzger <markus.t.metzger@intel.com>, 2007-2009 20 20 */ 21 21 22 22 ··· 890 890 } 891 891 892 892 static const struct ds_configuration ds_cfg_netburst = { 893 - .name = "netburst", 893 + .name = "Netburst", 894 894 .ctl[dsf_bts] = (1 << 2) | (1 << 3), 895 895 .ctl[dsf_bts_kernel] = (1 << 5), 896 896 .ctl[dsf_bts_user] = (1 << 6), ··· 904 904 #endif 905 905 }; 906 906 static const struct ds_configuration ds_cfg_pentium_m = { 907 - .name = "pentium m", 907 + .name = "Pentium M", 908 908 .ctl[dsf_bts] = (1 << 6) | (1 << 7), 909 909 910 910 .sizeof_field = sizeof(long), ··· 915 915 .sizeof_rec[ds_pebs] = sizeof(long) * 18, 916 916 #endif 917 917 }; 918 - static const struct ds_configuration ds_cfg_core2 = { 919 - .name = "core 2", 918 + static const struct ds_configuration ds_cfg_core2_atom = { 919 + .name = "Core 2/Atom", 920 920 .ctl[dsf_bts] = (1 << 6) | (1 << 7), 921 921 .ctl[dsf_bts_kernel] = (1 << 9), 922 922 .ctl[dsf_bts_user] = (1 << 10), ··· 949 949 switch (c->x86) { 950 950 case 0x6: 951 951 switch (c->x86_model) { 952 - case 0 ... 0xC: 953 - /* sorry, don't know about them */ 954 - break; 955 - case 0xD: 956 - case 0xE: /* Pentium M */ 952 + case 0x9: 953 + case 0xd: /* Pentium M */ 957 954 ds_configure(&ds_cfg_pentium_m); 958 955 break; 959 - default: /* Core2, Atom, ... */ 960 - ds_configure(&ds_cfg_core2); 956 + case 0xf: 957 + case 0x17: /* Core2 */ 958 + case 0x1c: /* Atom */ 959 + ds_configure(&ds_cfg_core2_atom); 960 + break; 961 + case 0x1a: /* i7 */ 962 + default: 963 + /* sorry, don't know about them */ 961 964 break; 962 965 } 963 966 break; 964 - case 0xF: 967 + case 0xf: 965 968 switch (c->x86_model) { 966 969 case 0x0: 967 970 case 0x1:
+1
arch/x86/pci/irq.c
··· 572 572 case PCI_DEVICE_ID_INTEL_ICH7_1: 573 573 case PCI_DEVICE_ID_INTEL_ICH7_30: 574 574 case PCI_DEVICE_ID_INTEL_ICH7_31: 575 + case PCI_DEVICE_ID_INTEL_TGP_LPC: 575 576 case PCI_DEVICE_ID_INTEL_ESB2_0: 576 577 case PCI_DEVICE_ID_INTEL_ICH8_0: 577 578 case PCI_DEVICE_ID_INTEL_ICH8_1:
+1 -1
block/blk-barrier.c
··· 302 302 * Description: 303 303 * Issue a flush for the block device in question. Caller can supply 304 304 * room for storing the error offset in case of a flush error, if they 305 - * wish to. Caller must run wait_for_completion() on its own. 305 + * wish to. 306 306 */ 307 307 int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector) 308 308 {
+63 -37
block/blk-core.c
··· 64 64 65 65 static void drive_stat_acct(struct request *rq, int new_io) 66 66 { 67 + struct gendisk *disk = rq->rq_disk; 67 68 struct hd_struct *part; 68 69 int rw = rq_data_dir(rq); 69 70 int cpu; 70 71 71 - if (!blk_fs_request(rq) || !rq->rq_disk) 72 + if (!blk_fs_request(rq) || !disk || !blk_do_io_stat(disk->queue)) 72 73 return; 73 74 74 75 cpu = part_stat_lock(); ··· 600 599 q->request_fn = rfn; 601 600 q->prep_rq_fn = NULL; 602 601 q->unplug_fn = generic_unplug_device; 603 - q->queue_flags = (1 << QUEUE_FLAG_CLUSTER | 604 - 1 << QUEUE_FLAG_STACKABLE); 602 + q->queue_flags = QUEUE_FLAG_DEFAULT; 605 603 q->queue_lock = lock; 606 604 607 605 blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); ··· 1125 1125 1126 1126 if (bio_sync(bio)) 1127 1127 req->cmd_flags |= REQ_RW_SYNC; 1128 + if (bio_unplug(bio)) 1129 + req->cmd_flags |= REQ_UNPLUG; 1128 1130 if (bio_rw_meta(bio)) 1129 1131 req->cmd_flags |= REQ_RW_META; 1130 1132 ··· 1143 1141 int el_ret, nr_sectors; 1144 1142 const unsigned short prio = bio_prio(bio); 1145 1143 const int sync = bio_sync(bio); 1144 + const int unplug = bio_unplug(bio); 1146 1145 int rw_flags; 1147 1146 1148 1147 nr_sectors = bio_sectors(bio); ··· 1247 1244 blk_plug_device(q); 1248 1245 add_request(q, req); 1249 1246 out: 1250 - if (sync || blk_queue_nonrot(q)) 1247 + if (unplug || blk_queue_nonrot(q)) 1251 1248 __generic_unplug_device(q); 1252 1249 spin_unlock_irq(q->queue_lock); 1253 1250 return 0; ··· 1448 1445 goto end_io; 1449 1446 1450 1447 if (bio_discard(bio) && !q->prepare_discard_fn) { 1448 + err = -EOPNOTSUPP; 1449 + goto end_io; 1450 + } 1451 + if (bio_barrier(bio) && bio_has_data(bio) && 1452 + (q->next_ordered == QUEUE_ORDERED_NONE)) { 1451 1453 err = -EOPNOTSUPP; 1452 1454 goto end_io; 1453 1455 } ··· 1663 1655 } 1664 1656 EXPORT_SYMBOL(blkdev_dequeue_request); 1665 1657 1658 + static void blk_account_io_completion(struct request *req, unsigned int bytes) 1659 + { 1660 + struct gendisk *disk = req->rq_disk; 1661 + 1662 + if (!disk || !blk_do_io_stat(disk->queue)) 1663 + return; 1664 + 1665 + if (blk_fs_request(req)) { 1666 + const int rw = rq_data_dir(req); 1667 + struct hd_struct *part; 1668 + int cpu; 1669 + 1670 + cpu = part_stat_lock(); 1671 + part = disk_map_sector_rcu(req->rq_disk, req->sector); 1672 + part_stat_add(cpu, part, sectors[rw], bytes >> 9); 1673 + part_stat_unlock(); 1674 + } 1675 + } 1676 + 1677 + static void blk_account_io_done(struct request *req) 1678 + { 1679 + struct gendisk *disk = req->rq_disk; 1680 + 1681 + if (!disk || !blk_do_io_stat(disk->queue)) 1682 + return; 1683 + 1684 + /* 1685 + * Account IO completion. bar_rq isn't accounted as a normal 1686 + * IO on queueing nor completion. Accounting the containing 1687 + * request is enough. 1688 + */ 1689 + if (blk_fs_request(req) && req != &req->q->bar_rq) { 1690 + unsigned long duration = jiffies - req->start_time; 1691 + const int rw = rq_data_dir(req); 1692 + struct hd_struct *part; 1693 + int cpu; 1694 + 1695 + cpu = part_stat_lock(); 1696 + part = disk_map_sector_rcu(disk, req->sector); 1697 + 1698 + part_stat_inc(cpu, part, ios[rw]); 1699 + part_stat_add(cpu, part, ticks[rw], duration); 1700 + part_round_stats(cpu, part); 1701 + part_dec_in_flight(part); 1702 + 1703 + part_stat_unlock(); 1704 + } 1705 + } 1706 + 1666 1707 /** 1667 1708 * __end_that_request_first - end I/O on a request 1668 1709 * @req: the request being processed ··· 1747 1690 (unsigned long long)req->sector); 1748 1691 } 1749 1692 1750 - if (blk_fs_request(req) && req->rq_disk) { 1751 - const int rw = rq_data_dir(req); 1752 - struct hd_struct *part; 1753 - int cpu; 1754 - 1755 - cpu = part_stat_lock(); 1756 - part = disk_map_sector_rcu(req->rq_disk, req->sector); 1757 - part_stat_add(cpu, part, sectors[rw], nr_bytes >> 9); 1758 - part_stat_unlock(); 1759 - } 1693 + blk_account_io_completion(req, nr_bytes); 1760 1694 1761 1695 total_bytes = bio_nbytes = 0; 1762 1696 while ((bio = req->bio) != NULL) { ··· 1827 1779 */ 1828 1780 static void end_that_request_last(struct request *req, int error) 1829 1781 { 1830 - struct gendisk *disk = req->rq_disk; 1831 - 1832 1782 if (blk_rq_tagged(req)) 1833 1783 blk_queue_end_tag(req->q, req); 1834 1784 ··· 1838 1792 1839 1793 blk_delete_timer(req); 1840 1794 1841 - /* 1842 - * Account IO completion. bar_rq isn't accounted as a normal 1843 - * IO on queueing nor completion. Accounting the containing 1844 - * request is enough. 1845 - */ 1846 - if (disk && blk_fs_request(req) && req != &req->q->bar_rq) { 1847 - unsigned long duration = jiffies - req->start_time; 1848 - const int rw = rq_data_dir(req); 1849 - struct hd_struct *part; 1850 - int cpu; 1851 - 1852 - cpu = part_stat_lock(); 1853 - part = disk_map_sector_rcu(disk, req->sector); 1854 - 1855 - part_stat_inc(cpu, part, ios[rw]); 1856 - part_stat_add(cpu, part, ticks[rw], duration); 1857 - part_round_stats(cpu, part); 1858 - part_dec_in_flight(part); 1859 - 1860 - part_stat_unlock(); 1861 - } 1795 + blk_account_io_done(req); 1862 1796 1863 1797 if (req->end_io) 1864 1798 req->end_io(req, error);
+14 -11
block/blk-integrity.c
··· 309 309 /** 310 310 * blk_integrity_register - Register a gendisk as being integrity-capable 311 311 * @disk: struct gendisk pointer to make integrity-aware 312 - * @template: integrity profile 312 + * @template: optional integrity profile to register 313 313 * 314 314 * Description: When a device needs to advertise itself as being able 315 315 * to send/receive integrity metadata it must use this function to 316 316 * register the capability with the block layer. The template is a 317 317 * blk_integrity struct with values appropriate for the underlying 318 - * hardware. See Documentation/block/data-integrity.txt. 318 + * hardware. If template is NULL the new profile is allocated but 319 + * not filled out. See Documentation/block/data-integrity.txt. 319 320 */ 320 321 int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) 321 322 { 322 323 struct blk_integrity *bi; 323 324 324 325 BUG_ON(disk == NULL); 325 - BUG_ON(template == NULL); 326 326 327 327 if (disk->integrity == NULL) { 328 328 bi = kmem_cache_alloc(integrity_cachep, 329 - GFP_KERNEL | __GFP_ZERO); 329 + GFP_KERNEL | __GFP_ZERO); 330 330 if (!bi) 331 331 return -1; 332 332 ··· 346 346 bi = disk->integrity; 347 347 348 348 /* Use the provided profile as template */ 349 - bi->name = template->name; 350 - bi->generate_fn = template->generate_fn; 351 - bi->verify_fn = template->verify_fn; 352 - bi->tuple_size = template->tuple_size; 353 - bi->set_tag_fn = template->set_tag_fn; 354 - bi->get_tag_fn = template->get_tag_fn; 355 - bi->tag_size = template->tag_size; 349 + if (template != NULL) { 350 + bi->name = template->name; 351 + bi->generate_fn = template->generate_fn; 352 + bi->verify_fn = template->verify_fn; 353 + bi->tuple_size = template->tuple_size; 354 + bi->set_tag_fn = template->set_tag_fn; 355 + bi->get_tag_fn = template->get_tag_fn; 356 + bi->tag_size = template->tag_size; 357 + } else 358 + bi->name = "unsupported"; 356 359 357 360 return 0; 358 361 }
+57 -1
block/blk-sysfs.c
··· 130 130 return queue_var_show(max_hw_sectors_kb, (page)); 131 131 } 132 132 133 + static ssize_t queue_nonrot_show(struct request_queue *q, char *page) 134 + { 135 + return queue_var_show(!blk_queue_nonrot(q), page); 136 + } 137 + 138 + static ssize_t queue_nonrot_store(struct request_queue *q, const char *page, 139 + size_t count) 140 + { 141 + unsigned long nm; 142 + ssize_t ret = queue_var_store(&nm, page, count); 143 + 144 + spin_lock_irq(q->queue_lock); 145 + if (nm) 146 + queue_flag_clear(QUEUE_FLAG_NONROT, q); 147 + else 148 + queue_flag_set(QUEUE_FLAG_NONROT, q); 149 + spin_unlock_irq(q->queue_lock); 150 + 151 + return ret; 152 + } 153 + 133 154 static ssize_t queue_nomerges_show(struct request_queue *q, char *page) 134 155 { 135 156 return queue_var_show(blk_queue_nomerges(q), page); ··· 167 146 queue_flag_set(QUEUE_FLAG_NOMERGES, q); 168 147 else 169 148 queue_flag_clear(QUEUE_FLAG_NOMERGES, q); 170 - 171 149 spin_unlock_irq(q->queue_lock); 150 + 172 151 return ret; 173 152 } 174 153 ··· 194 173 queue_flag_clear(QUEUE_FLAG_SAME_COMP, q); 195 174 spin_unlock_irq(q->queue_lock); 196 175 #endif 176 + return ret; 177 + } 178 + 179 + static ssize_t queue_iostats_show(struct request_queue *q, char *page) 180 + { 181 + return queue_var_show(blk_queue_io_stat(q), page); 182 + } 183 + 184 + static ssize_t queue_iostats_store(struct request_queue *q, const char *page, 185 + size_t count) 186 + { 187 + unsigned long stats; 188 + ssize_t ret = queue_var_store(&stats, page, count); 189 + 190 + spin_lock_irq(q->queue_lock); 191 + if (stats) 192 + queue_flag_set(QUEUE_FLAG_IO_STAT, q); 193 + else 194 + queue_flag_clear(QUEUE_FLAG_IO_STAT, q); 195 + spin_unlock_irq(q->queue_lock); 196 + 197 197 return ret; 198 198 } 199 199 ··· 252 210 .show = queue_hw_sector_size_show, 253 211 }; 254 212 213 + static struct queue_sysfs_entry queue_nonrot_entry = { 214 + .attr = {.name = "rotational", .mode = S_IRUGO | S_IWUSR }, 215 + .show = queue_nonrot_show, 216 + .store = queue_nonrot_store, 217 + }; 218 + 255 219 static struct queue_sysfs_entry queue_nomerges_entry = { 256 220 .attr = {.name = "nomerges", .mode = S_IRUGO | S_IWUSR }, 257 221 .show = queue_nomerges_show, ··· 270 222 .store = queue_rq_affinity_store, 271 223 }; 272 224 225 + static struct queue_sysfs_entry queue_iostats_entry = { 226 + .attr = {.name = "iostats", .mode = S_IRUGO | S_IWUSR }, 227 + .show = queue_iostats_show, 228 + .store = queue_iostats_store, 229 + }; 230 + 273 231 static struct attribute *default_attrs[] = { 274 232 &queue_requests_entry.attr, 275 233 &queue_ra_entry.attr, ··· 283 229 &queue_max_sectors_entry.attr, 284 230 &queue_iosched_entry.attr, 285 231 &queue_hw_sector_size_entry.attr, 232 + &queue_nonrot_entry.attr, 286 233 &queue_nomerges_entry.attr, 287 234 &queue_rq_affinity_entry.attr, 235 + &queue_iostats_entry.attr, 288 236 NULL, 289 237 }; 290 238
+8
block/blk.h
··· 108 108 #endif 109 109 } 110 110 111 + static inline int blk_do_io_stat(struct request_queue *q) 112 + { 113 + if (q) 114 + return blk_queue_io_stat(q); 115 + 116 + return 0; 117 + } 118 + 111 119 #endif
+21 -51
block/blktrace.c
··· 187 187 188 188 static struct dentry *blk_tree_root; 189 189 static DEFINE_MUTEX(blk_tree_mutex); 190 - static unsigned int root_users; 191 - 192 - static inline void blk_remove_root(void) 193 - { 194 - if (blk_tree_root) { 195 - debugfs_remove(blk_tree_root); 196 - blk_tree_root = NULL; 197 - } 198 - } 199 - 200 - static void blk_remove_tree(struct dentry *dir) 201 - { 202 - mutex_lock(&blk_tree_mutex); 203 - debugfs_remove(dir); 204 - if (--root_users == 0) 205 - blk_remove_root(); 206 - mutex_unlock(&blk_tree_mutex); 207 - } 208 - 209 - static struct dentry *blk_create_tree(const char *blk_name) 210 - { 211 - struct dentry *dir = NULL; 212 - int created = 0; 213 - 214 - mutex_lock(&blk_tree_mutex); 215 - 216 - if (!blk_tree_root) { 217 - blk_tree_root = debugfs_create_dir("block", NULL); 218 - if (!blk_tree_root) 219 - goto err; 220 - created = 1; 221 - } 222 - 223 - dir = debugfs_create_dir(blk_name, blk_tree_root); 224 - if (dir) 225 - root_users++; 226 - else { 227 - /* Delete root only if we created it */ 228 - if (created) 229 - blk_remove_root(); 230 - } 231 - 232 - err: 233 - mutex_unlock(&blk_tree_mutex); 234 - return dir; 235 - } 236 190 237 191 static void blk_trace_cleanup(struct blk_trace *bt) 238 192 { 239 - relay_close(bt->rchan); 240 193 debugfs_remove(bt->msg_file); 241 194 debugfs_remove(bt->dropped_file); 242 - blk_remove_tree(bt->dir); 195 + relay_close(bt->rchan); 243 196 free_percpu(bt->sequence); 244 197 free_percpu(bt->msg_data); 245 198 kfree(bt); ··· 299 346 300 347 static int blk_remove_buf_file_callback(struct dentry *dentry) 301 348 { 349 + struct dentry *parent = dentry->d_parent; 302 350 debugfs_remove(dentry); 351 + 352 + /* 353 + * this will fail for all but the last file, but that is ok. what we 354 + * care about is the top level buts->name directory going away, when 355 + * the last trace file is gone. Then we don't have to rmdir() that 356 + * manually on trace stop, so it nicely solves the issue with 357 + * force killing of running traces. 358 + */ 359 + 360 + debugfs_remove(parent); 303 361 return 0; 304 362 } 305 363 ··· 368 404 goto err; 369 405 370 406 ret = -ENOENT; 371 - dir = blk_create_tree(buts->name); 407 + 408 + if (!blk_tree_root) { 409 + blk_tree_root = debugfs_create_dir("block", NULL); 410 + if (!blk_tree_root) 411 + return -ENOMEM; 412 + } 413 + 414 + dir = debugfs_create_dir(buts->name, blk_tree_root); 415 + 372 416 if (!dir) 373 417 goto err; 374 418 ··· 430 458 atomic_dec(&blk_probes_ref); 431 459 mutex_unlock(&blk_probe_mutex); 432 460 err: 433 - if (dir) 434 - blk_remove_tree(dir); 435 461 if (bt) { 436 462 if (bt->msg_file) 437 463 debugfs_remove(bt->msg_file);
+38 -1
block/cfq-iosched.c
··· 84 84 */ 85 85 struct cfq_rb_root service_tree; 86 86 unsigned int busy_queues; 87 + /* 88 + * Used to track any pending rt requests so we can pre-empt current 89 + * non-RT cfqq in service when this value is non-zero. 90 + */ 91 + unsigned int busy_rt_queues; 87 92 88 93 int rq_in_driver; 89 94 int sync_flight; ··· 567 562 BUG_ON(cfq_cfqq_on_rr(cfqq)); 568 563 cfq_mark_cfqq_on_rr(cfqq); 569 564 cfqd->busy_queues++; 565 + if (cfq_class_rt(cfqq)) 566 + cfqd->busy_rt_queues++; 570 567 571 568 cfq_resort_rr_list(cfqd, cfqq); 572 569 } ··· 588 581 589 582 BUG_ON(!cfqd->busy_queues); 590 583 cfqd->busy_queues--; 584 + if (cfq_class_rt(cfqq)) 585 + cfqd->busy_rt_queues--; 591 586 } 592 587 593 588 /* ··· 1014 1005 goto expire; 1015 1006 1016 1007 /* 1008 + * If we have a RT cfqq waiting, then we pre-empt the current non-rt 1009 + * cfqq. 1010 + */ 1011 + if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) { 1012 + /* 1013 + * We simulate this as cfqq timed out so that it gets to bank 1014 + * the remaining of its time slice. 1015 + */ 1016 + cfq_log_cfqq(cfqd, cfqq, "preempt"); 1017 + cfq_slice_expired(cfqd, 1); 1018 + goto new_queue; 1019 + } 1020 + 1021 + /* 1017 1022 * The active queue has requests and isn't expired, allow it to 1018 1023 * dispatch. 1019 1024 */ ··· 1088 1065 } 1089 1066 1090 1067 if (RB_EMPTY_ROOT(&cfqq->sort_list)) 1068 + break; 1069 + 1070 + /* 1071 + * If there is a non-empty RT cfqq waiting for current 1072 + * cfqq's timeslice to complete, pre-empt this cfqq 1073 + */ 1074 + if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) 1091 1075 break; 1092 1076 1093 1077 } while (dispatched < max_dispatch); ··· 1831 1801 if (rq_is_meta(rq) && !cfqq->meta_pending) 1832 1802 return 1; 1833 1803 1804 + /* 1805 + * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice. 1806 + */ 1807 + if (cfq_class_rt(new_cfqq) && !cfq_class_rt(cfqq)) 1808 + return 1; 1809 + 1834 1810 if (!cfqd->active_cic || !cfq_cfqq_wait_request(cfqq)) 1835 1811 return 0; 1836 1812 ··· 1906 1870 /* 1907 1871 * not the active queue - expire current slice if it is 1908 1872 * idle and has expired it's mean thinktime or this new queue 1909 - * has some old slice time left and is of higher priority 1873 + * has some old slice time left and is of higher priority or 1874 + * this new queue is RT and the current one is BE 1910 1875 */ 1911 1876 cfq_preempt_queue(cfqd, cfqq); 1912 1877 cfq_mark_cfqq_must_dispatch(cfqq);
+1 -1
drivers/char/selection.c
··· 268 268 269 269 /* Allocate a new buffer before freeing the old one ... */ 270 270 multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */ 271 - bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL); 271 + bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL); 272 272 if (!bp) { 273 273 printk(KERN_WARNING "selection: kmalloc() failed\n"); 274 274 clear_selection();
+1 -1
drivers/gpu/drm/drm_gem.c
··· 136 136 obj = kcalloc(1, sizeof(*obj), GFP_KERNEL); 137 137 138 138 obj->dev = dev; 139 - obj->filp = shmem_file_setup("drm mm object", size, 0); 139 + obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); 140 140 if (IS_ERR(obj->filp)) { 141 141 kfree(obj); 142 142 return NULL;
+10
drivers/ide/Kconfig
··· 465 465 466 466 It is safe to say Y to this question. 467 467 468 + config BLK_DEV_CS5536 469 + tristate "CS5536 chipset support" 470 + depends on X86_32 471 + select BLK_DEV_IDEDMA_PCI 472 + help 473 + This option enables support for the AMD CS5536 474 + companion chip used with the Geode LX processor family. 475 + 476 + If unsure, say N. 477 + 468 478 config BLK_DEV_HPT366 469 479 tristate "HPT36X/37X chipset support" 470 480 select BLK_DEV_IDEDMA_PCI
+1
drivers/ide/Makefile
··· 43 43 obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o 44 44 obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o 45 45 obj-$(CONFIG_BLK_DEV_CS5535) += cs5535.o 46 + obj-$(CONFIG_BLK_DEV_CS5536) += cs5536.o 46 47 obj-$(CONFIG_BLK_DEV_SC1200) += sc1200.o 47 48 obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o 48 49 obj-$(CONFIG_BLK_DEV_DELKIN) += delkin_cb.o
+308
drivers/ide/cs5536.c
··· 1 + /* 2 + * CS5536 PATA support 3 + * (C) 2007 Martin K. Petersen <mkp@mkp.net> 4 + * (C) 2009 Bartlomiej Zolnierkiewicz 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 + * 19 + * Documentation: 20 + * Available from AMD web site. 21 + * 22 + * The IDE timing registers for the CS5536 live in the Geode Machine 23 + * Specific Register file and not PCI config space. Most BIOSes 24 + * virtualize the PCI registers so the chip looks like a standard IDE 25 + * controller. Unfortunately not all implementations get this right. 26 + * In particular some have problems with unaligned accesses to the 27 + * virtualized PCI registers. This driver always does full dword 28 + * writes to work around the issue. Also, in case of a bad BIOS this 29 + * driver can be loaded with the "msr=1" parameter which forces using 30 + * the Machine Specific Registers to configure the device. 31 + */ 32 + 33 + #include <linux/kernel.h> 34 + #include <linux/module.h> 35 + #include <linux/pci.h> 36 + #include <linux/init.h> 37 + #include <linux/ide.h> 38 + #include <asm/msr.h> 39 + 40 + #define DRV_NAME "cs5536" 41 + 42 + enum { 43 + MSR_IDE_CFG = 0x51300010, 44 + PCI_IDE_CFG = 0x40, 45 + 46 + CFG = 0, 47 + DTC = 2, 48 + CAST = 3, 49 + ETC = 4, 50 + 51 + IDE_CFG_CHANEN = (1 << 1), 52 + IDE_CFG_CABLE = (1 << 17) | (1 << 16), 53 + 54 + IDE_D0_SHIFT = 24, 55 + IDE_D1_SHIFT = 16, 56 + IDE_DRV_MASK = 0xff, 57 + 58 + IDE_CAST_D0_SHIFT = 6, 59 + IDE_CAST_D1_SHIFT = 4, 60 + IDE_CAST_DRV_MASK = 0x3, 61 + 62 + IDE_CAST_CMD_SHIFT = 24, 63 + IDE_CAST_CMD_MASK = 0xff, 64 + 65 + IDE_ETC_UDMA_MASK = 0xc0, 66 + }; 67 + 68 + static int use_msr; 69 + 70 + static int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) 71 + { 72 + if (unlikely(use_msr)) { 73 + u32 dummy; 74 + 75 + rdmsr(MSR_IDE_CFG + reg, *val, dummy); 76 + return 0; 77 + } 78 + 79 + return pci_read_config_dword(pdev, PCI_IDE_CFG + reg * 4, val); 80 + } 81 + 82 + static int cs5536_write(struct pci_dev *pdev, int reg, int val) 83 + { 84 + if (unlikely(use_msr)) { 85 + wrmsr(MSR_IDE_CFG + reg, val, 0); 86 + return 0; 87 + } 88 + 89 + return pci_write_config_dword(pdev, PCI_IDE_CFG + reg * 4, val); 90 + } 91 + 92 + static void cs5536_program_dtc(ide_drive_t *drive, u8 tim) 93 + { 94 + struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); 95 + int dshift = (drive->dn & 1) ? IDE_D1_SHIFT : IDE_D0_SHIFT; 96 + u32 dtc; 97 + 98 + cs5536_read(pdev, DTC, &dtc); 99 + dtc &= ~(IDE_DRV_MASK << dshift); 100 + dtc |= tim << dshift; 101 + cs5536_write(pdev, DTC, dtc); 102 + } 103 + 104 + /** 105 + * cs5536_cable_detect - detect cable type 106 + * @hwif: Port to detect on 107 + * 108 + * Perform cable detection for ATA66 capable cable. 109 + * 110 + * Returns a cable type. 111 + */ 112 + 113 + static u8 cs5536_cable_detect(ide_hwif_t *hwif) 114 + { 115 + struct pci_dev *pdev = to_pci_dev(hwif->dev); 116 + u32 cfg; 117 + 118 + cs5536_read(pdev, CFG, &cfg); 119 + 120 + if (cfg & IDE_CFG_CABLE) 121 + return ATA_CBL_PATA80; 122 + else 123 + return ATA_CBL_PATA40; 124 + } 125 + 126 + /** 127 + * cs5536_set_pio_mode - PIO timing setup 128 + * @drive: ATA device 129 + * @pio: PIO mode number 130 + */ 131 + 132 + static void cs5536_set_pio_mode(ide_drive_t *drive, const u8 pio) 133 + { 134 + static const u8 drv_timings[5] = { 135 + 0x98, 0x55, 0x32, 0x21, 0x20, 136 + }; 137 + 138 + static const u8 addr_timings[5] = { 139 + 0x2, 0x1, 0x0, 0x0, 0x0, 140 + }; 141 + 142 + static const u8 cmd_timings[5] = { 143 + 0x99, 0x92, 0x90, 0x22, 0x20, 144 + }; 145 + 146 + struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); 147 + ide_drive_t *pair = ide_get_pair_dev(drive); 148 + int cshift = (drive->dn & 1) ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; 149 + u32 cast; 150 + u8 cmd_pio = pio; 151 + 152 + if (pair) 153 + cmd_pio = min(pio, ide_get_best_pio_mode(pair, 255, 4)); 154 + 155 + drive->drive_data &= (IDE_DRV_MASK << 8); 156 + drive->drive_data |= drv_timings[pio]; 157 + 158 + cs5536_program_dtc(drive, drv_timings[pio]); 159 + 160 + cs5536_read(pdev, CAST, &cast); 161 + 162 + cast &= ~(IDE_CAST_DRV_MASK << cshift); 163 + cast |= addr_timings[pio] << cshift; 164 + 165 + cast &= ~(IDE_CAST_CMD_MASK << IDE_CAST_CMD_SHIFT); 166 + cast |= cmd_timings[cmd_pio] << IDE_CAST_CMD_SHIFT; 167 + 168 + cs5536_write(pdev, CAST, cast); 169 + } 170 + 171 + /** 172 + * cs5536_set_dma_mode - DMA timing setup 173 + * @drive: ATA device 174 + * @mode: DMA mode 175 + */ 176 + 177 + static void cs5536_set_dma_mode(ide_drive_t *drive, const u8 mode) 178 + { 179 + static const u8 udma_timings[6] = { 180 + 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, 181 + }; 182 + 183 + static const u8 mwdma_timings[3] = { 184 + 0x67, 0x21, 0x20, 185 + }; 186 + 187 + struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); 188 + int dshift = (drive->dn & 1) ? IDE_D1_SHIFT : IDE_D0_SHIFT; 189 + u32 etc; 190 + 191 + cs5536_read(pdev, ETC, &etc); 192 + 193 + if (mode >= XFER_UDMA_0) { 194 + etc &= ~(IDE_DRV_MASK << dshift); 195 + etc |= udma_timings[mode - XFER_UDMA_0] << dshift; 196 + } else { /* MWDMA */ 197 + etc &= ~(IDE_ETC_UDMA_MASK << dshift); 198 + drive->drive_data &= IDE_DRV_MASK; 199 + drive->drive_data |= mwdma_timings[mode - XFER_MW_DMA_0] << 8; 200 + } 201 + 202 + cs5536_write(pdev, ETC, etc); 203 + } 204 + 205 + static void cs5536_dma_start(ide_drive_t *drive) 206 + { 207 + if (drive->current_speed < XFER_UDMA_0 && 208 + (drive->drive_data >> 8) != (drive->drive_data & IDE_DRV_MASK)) 209 + cs5536_program_dtc(drive, drive->drive_data >> 8); 210 + 211 + ide_dma_start(drive); 212 + } 213 + 214 + static int cs5536_dma_end(ide_drive_t *drive) 215 + { 216 + int ret = ide_dma_end(drive); 217 + 218 + if (drive->current_speed < XFER_UDMA_0 && 219 + (drive->drive_data >> 8) != (drive->drive_data & IDE_DRV_MASK)) 220 + cs5536_program_dtc(drive, drive->drive_data & IDE_DRV_MASK); 221 + 222 + return ret; 223 + } 224 + 225 + static const struct ide_port_ops cs5536_port_ops = { 226 + .set_pio_mode = cs5536_set_pio_mode, 227 + .set_dma_mode = cs5536_set_dma_mode, 228 + .cable_detect = cs5536_cable_detect, 229 + }; 230 + 231 + static const struct ide_dma_ops cs5536_dma_ops = { 232 + .dma_host_set = ide_dma_host_set, 233 + .dma_setup = ide_dma_setup, 234 + .dma_exec_cmd = ide_dma_exec_cmd, 235 + .dma_start = cs5536_dma_start, 236 + .dma_end = cs5536_dma_end, 237 + .dma_test_irq = ide_dma_test_irq, 238 + .dma_lost_irq = ide_dma_lost_irq, 239 + .dma_timeout = ide_dma_timeout, 240 + }; 241 + 242 + static const struct ide_port_info cs5536_info = { 243 + .name = DRV_NAME, 244 + .port_ops = &cs5536_port_ops, 245 + .dma_ops = &cs5536_dma_ops, 246 + .host_flags = IDE_HFLAG_SINGLE, 247 + .pio_mask = ATA_PIO4, 248 + .mwdma_mask = ATA_MWDMA2, 249 + .udma_mask = ATA_UDMA5, 250 + }; 251 + 252 + /** 253 + * cs5536_init_one 254 + * @dev: PCI device 255 + * @id: Entry in match table 256 + */ 257 + 258 + static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id) 259 + { 260 + u32 cfg; 261 + 262 + if (use_msr) 263 + printk(KERN_INFO DRV_NAME ": Using MSR regs instead of PCI\n"); 264 + 265 + cs5536_read(dev, CFG, &cfg); 266 + 267 + if ((cfg & IDE_CFG_CHANEN) == 0) { 268 + printk(KERN_ERR DRV_NAME ": disabled by BIOS\n"); 269 + return -ENODEV; 270 + } 271 + 272 + return ide_pci_init_one(dev, &cs5536_info, NULL); 273 + } 274 + 275 + static const struct pci_device_id cs5536_pci_tbl[] = { 276 + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), }, 277 + { }, 278 + }; 279 + 280 + static struct pci_driver cs5536_pci_driver = { 281 + .name = DRV_NAME, 282 + .id_table = cs5536_pci_tbl, 283 + .probe = cs5536_init_one, 284 + .remove = ide_pci_remove, 285 + .suspend = ide_pci_suspend, 286 + .resume = ide_pci_resume, 287 + }; 288 + 289 + static int __init cs5536_init(void) 290 + { 291 + return pci_register_driver(&cs5536_pci_driver); 292 + } 293 + 294 + static void __exit cs5536_exit(void) 295 + { 296 + pci_unregister_driver(&cs5536_pci_driver); 297 + } 298 + 299 + MODULE_AUTHOR("Martin K. Petersen, Bartlomiej Zolnierkiewicz"); 300 + MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller"); 301 + MODULE_LICENSE("GPL"); 302 + MODULE_DEVICE_TABLE(pci, cs5536_pci_tbl); 303 + 304 + module_param_named(msr, use_msr, int, 0644); 305 + MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); 306 + 307 + module_init(cs5536_init); 308 + module_exit(cs5536_exit);
+1 -1
drivers/ide/icside.c
··· 534 534 d.dma_ops = NULL; 535 535 } 536 536 537 - ret = ide_host_register(host, NULL, hws); 537 + ret = ide_host_register(host, &d, hws); 538 538 if (ret) 539 539 goto err_free; 540 540
+1 -1
drivers/ide/ide-acpi.c
··· 282 282 port = hwif->channel ? drive->dn - 2: drive->dn; 283 283 284 284 DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n", 285 - hwif->name, dev->bus_id, port, hwif->channel); 285 + hwif->name, dev_name(dev), port, hwif->channel); 286 286 287 287 if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) { 288 288 DEBPRINT("%s drive %d:%d not present\n",
+3
drivers/ide/ide-cd.c
··· 787 787 if (blk_fs_request(rq)) { 788 788 ide_end_request(drive, 1, rq->nr_sectors); 789 789 return ide_stopped; 790 + } else if (rq->cmd_type == REQ_TYPE_ATA_PC && !rq->bio) { 791 + ide_end_request(drive, 1, 1); 792 + return ide_stopped; 790 793 } 791 794 goto end_request; 792 795 }
+6 -3
drivers/ide/ide-io.c
··· 418 418 ide_hwif_t *hwif = drive->hwif; 419 419 struct scatterlist *sg = hwif->sg_table; 420 420 421 - if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) { 422 - hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); 423 - } else { 421 + if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { 424 422 sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); 425 423 hwif->sg_nents = 1; 424 + } else if (!rq->bio) { 425 + sg_init_one(sg, rq->data, rq->data_len); 426 + hwif->sg_nents = 1; 427 + } else { 428 + hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); 426 429 } 427 430 } 428 431
+34 -9
drivers/ide/ide-probe.c
··· 1467 1467 } 1468 1468 EXPORT_SYMBOL_GPL(ide_host_alloc); 1469 1469 1470 + static void ide_port_free(ide_hwif_t *hwif) 1471 + { 1472 + ide_port_free_devices(hwif); 1473 + ide_free_port_slot(hwif->index); 1474 + kfree(hwif); 1475 + } 1476 + 1477 + static void ide_disable_port(ide_hwif_t *hwif) 1478 + { 1479 + struct ide_host *host = hwif->host; 1480 + int i; 1481 + 1482 + printk(KERN_INFO "%s: disabling port\n", hwif->name); 1483 + 1484 + for (i = 0; i < MAX_HOST_PORTS; i++) { 1485 + if (host->ports[i] == hwif) { 1486 + host->ports[i] = NULL; 1487 + host->n_ports--; 1488 + } 1489 + } 1490 + 1491 + ide_port_free(hwif); 1492 + } 1493 + 1470 1494 int ide_host_register(struct ide_host *host, const struct ide_port_info *d, 1471 1495 hw_regs_t **hws) 1472 1496 { ··· 1531 1507 hwif->present = 1; 1532 1508 1533 1509 if (hwif->chipset != ide_4drives || !hwif->mate || 1534 - !hwif->mate->present) 1535 - ide_register_port(hwif); 1510 + !hwif->mate->present) { 1511 + if (ide_register_port(hwif)) { 1512 + ide_disable_port(hwif); 1513 + continue; 1514 + } 1515 + } 1536 1516 1537 1517 if (hwif->present) 1538 1518 ide_port_tune_devices(hwif); ··· 1549 1521 if (hwif_init(hwif) == 0) { 1550 1522 printk(KERN_INFO "%s: failed to initialize IDE " 1551 1523 "interface\n", hwif->name); 1552 - hwif->present = 0; 1524 + device_unregister(&hwif->gendev); 1525 + ide_disable_port(hwif); 1553 1526 continue; 1554 1527 } 1555 1528 ··· 1689 1660 int i; 1690 1661 1691 1662 ide_host_for_each_port(i, hwif, host) { 1692 - if (hwif == NULL) 1693 - continue; 1694 - 1695 - ide_port_free_devices(hwif); 1696 - ide_free_port_slot(hwif->index); 1697 - kfree(hwif); 1663 + if (hwif) 1664 + ide_port_free(hwif); 1698 1665 } 1699 1666 1700 1667 kfree(host);
+2 -2
drivers/ide/tx4939ide.c
··· 261 261 bcount = cur_len; 262 262 /* 263 263 * This workaround for zero count seems required. 264 - * (standard ide_build_dmatable do it too) 264 + * (standard ide_build_dmatable does it too) 265 265 */ 266 - if ((bcount & 0xffff) == 0x0000) 266 + if (bcount == 0x10000) 267 267 bcount = 0x8000; 268 268 *table++ = bcount & 0xffff; 269 269 *table++ = cur_addr;
+5
drivers/ide/via82cxxx.c
··· 448 448 d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; 449 449 #endif 450 450 451 + #ifdef CONFIG_AMIGAONE 452 + if (machine_is(amigaone)) 453 + d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; 454 + #endif 455 + 451 456 d.udma_mask = via_config->udma_mask; 452 457 453 458 vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
+1
drivers/media/common/saa7146_video.c
··· 576 576 vv->vflip = c->value; 577 577 break; 578 578 default: { 579 + mutex_unlock(&dev->lock); 579 580 return -EINVAL; 580 581 } 581 582 }
+1 -1
drivers/media/common/tuners/mxl5007t.c
··· 657 657 { 658 658 struct mxl5007t_state *state = fe->tuner_priv; 659 659 int rf_locked, ref_locked; 660 - s32 rf_input_level; 660 + s32 rf_input_level = 0; 661 661 int ret; 662 662 663 663 if (fe->ops.i2c_gate_ctrl)
+21 -3
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
··· 93 93 /* current state of the CAM */ 94 94 int slot_state; 95 95 96 + /* mutex used for serializing access to one CI slot */ 97 + struct mutex slot_lock; 98 + 96 99 /* Number of CAMCHANGES that have occurred since last processing */ 97 100 atomic_t camchange_count; 98 101 ··· 714 711 dprintk("%s\n", __func__); 715 712 716 713 717 - // sanity check 714 + /* sanity check */ 718 715 if (bytes_write > ca->slot_info[slot].link_buf_size) 719 716 return -EINVAL; 720 717 721 - /* check if interface is actually waiting for us to read from it, or if a read is in progress */ 718 + /* it is possible we are dealing with a single buffer implementation, 719 + thus if there is data available for read or if there is even a read 720 + already in progress, we do nothing but awake the kernel thread to 721 + process the data if necessary. */ 722 722 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0) 723 723 goto exitnowrite; 724 724 if (status & (STATUSREG_DA | STATUSREG_RE)) { 725 + if (status & STATUSREG_DA) 726 + dvb_ca_en50221_thread_wakeup(ca); 727 + 725 728 status = -EAGAIN; 726 729 goto exitnowrite; 727 730 } ··· 996 987 /* go through all the slots processing them */ 997 988 for (slot = 0; slot < ca->slot_count; slot++) { 998 989 990 + mutex_lock(&ca->slot_info[slot].slot_lock); 991 + 999 992 // check the cam status + deal with CAMCHANGEs 1000 993 while (dvb_ca_en50221_check_camstatus(ca, slot)) { 1001 994 /* clear down an old CI slot if necessary */ ··· 1133 1122 1134 1123 case DVB_CA_SLOTSTATE_RUNNING: 1135 1124 if (!ca->open) 1136 - continue; 1125 + break; 1137 1126 1138 1127 // poll slots for data 1139 1128 pktcount = 0; ··· 1157 1146 } 1158 1147 break; 1159 1148 } 1149 + 1150 + mutex_unlock(&ca->slot_info[slot].slot_lock); 1160 1151 } 1161 1152 } 1162 1153 ··· 1194 1181 switch (cmd) { 1195 1182 case CA_RESET: 1196 1183 for (slot = 0; slot < ca->slot_count; slot++) { 1184 + mutex_lock(&ca->slot_info[slot].slot_lock); 1197 1185 if (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_NONE) { 1198 1186 dvb_ca_en50221_slot_shutdown(ca, slot); 1199 1187 if (ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE) ··· 1202 1188 slot, 1203 1189 DVB_CA_EN50221_CAMCHANGE_INSERTED); 1204 1190 } 1191 + mutex_unlock(&ca->slot_info[slot].slot_lock); 1205 1192 } 1206 1193 ca->next_read_slot = 0; 1207 1194 dvb_ca_en50221_thread_wakeup(ca); ··· 1323 1308 goto exit; 1324 1309 } 1325 1310 1311 + mutex_lock(&ca->slot_info[slot].slot_lock); 1326 1312 status = dvb_ca_en50221_write_data(ca, slot, fragbuf, fraglen + 2); 1313 + mutex_unlock(&ca->slot_info[slot].slot_lock); 1327 1314 if (status == (fraglen + 2)) { 1328 1315 written = 1; 1329 1316 break; ··· 1681 1664 ca->slot_info[i].slot_state = DVB_CA_SLOTSTATE_NONE; 1682 1665 atomic_set(&ca->slot_info[i].camchange_count, 0); 1683 1666 ca->slot_info[i].camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; 1667 + mutex_init(&ca->slot_info[i].slot_lock); 1684 1668 } 1685 1669 1686 1670 if (signal_pending(current)) {
+4 -2
drivers/media/dvb/dvb-core/dvb_ca_en50221.h
··· 45 45 /* the module owning this structure */ 46 46 struct module* owner; 47 47 48 - /* NOTE: the read_*, write_* and poll_slot_status functions must use locks as 49 - * they may be called from several threads at once */ 48 + /* NOTE: the read_*, write_* and poll_slot_status functions will be 49 + * called for different slots concurrently and need to use locks where 50 + * and if appropriate. There will be no concurrent access to one slot. 51 + */ 50 52 51 53 /* functions for accessing attribute memory on the CAM */ 52 54 int (*read_attribute_mem)(struct dvb_ca_en50221* ca, int slot, int address);
+1 -1
drivers/media/dvb/dvb-usb/af9005-fe.c
··· 220 220 u16 * abort_count) 221 221 { 222 222 u32 loc_cw_count = 0, loc_err_count; 223 - u16 loc_abort_count; 223 + u16 loc_abort_count = 0; 224 224 int ret; 225 225 226 226 ret =
+24 -6
drivers/media/dvb/dvb-usb/af9015.c
··· 694 694 695 695 /* IR remote controller */ 696 696 req.addr = AF9015_EEPROM_IR_MODE; 697 - ret = af9015_rw_udev(udev, &req); 697 + /* first message will timeout often due to possible hw bug */ 698 + for (i = 0; i < 4; i++) { 699 + ret = af9015_rw_udev(udev, &req); 700 + if (!ret) 701 + break; 702 + } 698 703 if (ret) 699 704 goto error; 700 705 deb_info("%s: IR mode:%d\n", __func__, val); ··· 840 835 if (!dvb_usb_af9015_dual_mode) 841 836 af9015_config.dual_mode = 0; 842 837 843 - /* set buffer size according to USB port speed */ 838 + /* Set adapter0 buffer size according to USB port speed, adapter1 buffer 839 + size can be static because it is enabled only USB2.0 */ 844 840 for (i = 0; i < af9015_properties_count; i++) { 845 841 /* USB1.1 set smaller buffersize and disable 2nd adapter */ 846 842 if (udev->speed == USB_SPEED_FULL) { 847 - af9015_properties[i].adapter->stream.u.bulk.buffersize = 848 - TS_USB11_MAX_PACKET_SIZE; 843 + af9015_properties[i].adapter[0].stream.u.bulk.buffersize 844 + = TS_USB11_MAX_PACKET_SIZE; 849 845 /* disable 2nd adapter because we don't have 850 846 PID-filters */ 851 847 af9015_config.dual_mode = 0; 852 848 } else { 853 - af9015_properties[i].adapter->stream.u.bulk.buffersize = 854 - TS_USB20_MAX_PACKET_SIZE; 849 + af9015_properties[i].adapter[0].stream.u.bulk.buffersize 850 + = TS_USB20_MAX_PACKET_SIZE; 855 851 } 856 852 } 857 853 ··· 1260 1254 .type = USB_BULK, 1261 1255 .count = 6, 1262 1256 .endpoint = 0x85, 1257 + .u = { 1258 + .bulk = { 1259 + .buffersize = 1260 + TS_USB20_MAX_PACKET_SIZE, 1261 + } 1262 + } 1263 1263 }, 1264 1264 } 1265 1265 }, ··· 1365 1353 .type = USB_BULK, 1366 1354 .count = 6, 1367 1355 .endpoint = 0x85, 1356 + .u = { 1357 + .bulk = { 1358 + .buffersize = 1359 + TS_USB20_MAX_PACKET_SIZE, 1360 + } 1361 + } 1368 1362 }, 1369 1363 } 1370 1364 },
+15 -3
drivers/media/dvb/dvb-usb/dib0700_devices.c
··· 1393 1393 { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3000H) }, 1394 1394 /* 40 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E) }, 1395 1395 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E_SE) }, 1396 + { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_EXPRESS) }, 1397 + { USB_DEVICE(USB_VID_TERRATEC, 1398 + USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2) }, 1396 1399 { 0 } /* Terminating entry */ 1397 1400 }; 1398 1401 MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); ··· 1540 1537 { "DiBcom STK7700D reference design", 1541 1538 { &dib0700_usb_id_table[14], NULL }, 1542 1539 { NULL }, 1543 - } 1540 + }, 1541 + 1544 1542 }, 1545 1543 1546 1544 .rc_interval = DEFAULT_RC_INTERVAL, ··· 1561 1557 }, 1562 1558 }, 1563 1559 1564 - .num_device_descs = 2, 1560 + .num_device_descs = 3, 1565 1561 .devices = { 1566 1562 { "ASUS My Cinema U3000 Mini DVBT Tuner", 1567 1563 { &dib0700_usb_id_table[23], NULL }, ··· 1569 1565 }, 1570 1566 { "Yuan EC372S", 1571 1567 { &dib0700_usb_id_table[31], NULL }, 1568 + { NULL }, 1569 + }, 1570 + { "Terratec Cinergy T Express", 1571 + { &dib0700_usb_id_table[42], NULL }, 1572 1572 { NULL }, 1573 1573 } 1574 1574 }, ··· 1661 1653 } 1662 1654 }, 1663 1655 1664 - .num_device_descs = 4, 1656 + .num_device_descs = 5, 1665 1657 .devices = { 1666 1658 { "DiBcom STK7070PD reference design", 1667 1659 { &dib0700_usb_id_table[17], NULL }, ··· 1677 1669 }, 1678 1670 { "Hauppauge Nova-TD-500 (84xxx)", 1679 1671 { &dib0700_usb_id_table[36], NULL }, 1672 + { NULL }, 1673 + }, 1674 + { "Terratec Cinergy DT USB XS Diversity", 1675 + { &dib0700_usb_id_table[43], NULL }, 1680 1676 { NULL }, 1681 1677 } 1682 1678 }
+2
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
··· 162 162 #define USB_PID_AVERMEDIA_A309 0xa309 163 163 #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006 164 164 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a 165 + #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2 0x0081 165 166 #define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058 166 167 #define USB_PID_TERRATEC_CINERGY_HT_EXPRESS 0x0060 168 + #define USB_PID_TERRATEC_CINERGY_T_EXPRESS 0x0062 167 169 #define USB_PID_TERRATEC_CINERGY_T_XXS 0x0078 168 170 #define USB_PID_PINNACLE_EXPRESSCARD_320CX 0x022e 169 171 #define USB_PID_PINNACLE_PCTV2000E 0x022c
+1 -1
drivers/media/dvb/frontends/drx397xD.c
··· 646 646 u32 edi = 0, ebx = 0, ebp = 0, edx = 0; 647 647 u16 v20 = 0, v1E = 0, v16 = 0, v14 = 0, v12 = 0, v10 = 0, v0E = 0; 648 648 649 - int rc, df_tuner; 649 + int rc, df_tuner = 0; 650 650 int a, b, c, d; 651 651 pr_debug("%s %d\n", __func__, s->config.d60); 652 652
+4 -3
drivers/media/dvb/frontends/s5h1409.c
··· 545 545 546 546 s5h1409_enable_modulation(fe, p->u.vsb.modulation); 547 547 548 - /* Allow the demod to settle */ 549 - msleep(100); 550 - 551 548 if (fe->ops.tuner_ops.set_params) { 552 549 if (fe->ops.i2c_gate_ctrl) 553 550 fe->ops.i2c_gate_ctrl(fe, 1); ··· 558 561 s5h1409_set_qam_amhum_mode(fe); 559 562 s5h1409_set_qam_interleave_mode(fe); 560 563 } 564 + 565 + /* Issue a reset to the demod so it knows to resync against the 566 + newly tuned frequency */ 567 + s5h1409_softreset(fe); 561 568 562 569 return 0; 563 570 }
+3
drivers/media/dvb/frontends/stb0899_algo.c
··· 31 31 return n; 32 32 } 33 33 34 + #if 0 35 + /* These functions are currently unused */ 34 36 /* 35 37 * stb0899_calc_srate 36 38 * Compute symbol rate ··· 65 63 66 64 return stb0899_calc_srate(internal->master_clk, sfr); 67 65 } 66 + #endif 68 67 69 68 /* 70 69 * stb0899_set_srate
+1
drivers/media/dvb/ttpci/budget.c
··· 470 470 budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap); 471 471 if (budget->dvb_frontend) { 472 472 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; 473 + budget->dvb_frontend->tuner_priv = NULL; 473 474 break; 474 475 } 475 476 break;
+1 -1
drivers/media/dvb/ttusb-dec/ttusb_dec.c
··· 1384 1384 static int ttusb_dec_init_stb(struct ttusb_dec *dec) 1385 1385 { 1386 1386 int result; 1387 - unsigned int mode, model, version; 1387 + unsigned int mode = 0, model = 0, version = 0; 1388 1388 1389 1389 dprintk("%s\n", __func__); 1390 1390
+6 -6
drivers/media/radio/radio-mr800.c
··· 194 194 return retval; 195 195 } 196 196 197 - mutex_unlock(&radio->lock); 198 - 199 197 radio->muted = 0; 198 + 199 + mutex_unlock(&radio->lock); 200 200 201 201 return retval; 202 202 } ··· 230 230 return retval; 231 231 } 232 232 233 - mutex_unlock(&radio->lock); 234 - 235 233 radio->muted = 1; 234 + 235 + mutex_unlock(&radio->lock); 236 236 237 237 return retval; 238 238 } ··· 284 284 return retval; 285 285 } 286 286 287 - mutex_unlock(&radio->lock); 288 - 289 287 radio->stereo = 0; 288 + 289 + mutex_unlock(&radio->lock); 290 290 291 291 return retval; 292 292 }
-1
drivers/media/video/cs5345.c
··· 18 18 */ 19 19 20 20 21 - #include <linux/version.h> 22 21 #include <linux/module.h> 23 22 #include <linux/kernel.h> 24 23 #include <linux/i2c.h>
+2 -1
drivers/media/video/cx23885/cx23885-417.c
··· 1586 1586 lock_kernel(); 1587 1587 list_for_each(list, &cx23885_devlist) { 1588 1588 h = list_entry(list, struct cx23885_dev, devlist); 1589 - if (h->v4l_device->minor == minor) { 1589 + if (h->v4l_device && 1590 + h->v4l_device->minor == minor) { 1590 1591 dev = h; 1591 1592 break; 1592 1593 }
+3 -2
drivers/media/video/cx23885/cx23885-video.c
··· 730 730 lock_kernel(); 731 731 list_for_each(list, &cx23885_devlist) { 732 732 h = list_entry(list, struct cx23885_dev, devlist); 733 - if (h->video_dev->minor == minor) { 733 + if (h->video_dev && 734 + h->video_dev->minor == minor) { 734 735 dev = h; 735 736 type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 736 737 } 737 738 if (h->vbi_dev && 738 - h->vbi_dev->minor == minor) { 739 + h->vbi_dev->minor == minor) { 739 740 dev = h; 740 741 type = V4L2_BUF_TYPE_VBI_CAPTURE; 741 742 }
+8
drivers/media/video/cx25840/cx25840-core.c
··· 1382 1382 1383 1383 static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) 1384 1384 { 1385 + /* ignore this command */ 1386 + if (cmd == TUNER_SET_TYPE_ADDR || cmd == TUNER_SET_CONFIG) 1387 + return 0; 1388 + 1389 + /* Old-style drivers rely on initialization on first use, so 1390 + call the init whenever a command is issued to this driver. 1391 + New-style drivers using v4l2_subdev should call init explicitly. */ 1392 + cx25840_init(i2c_get_clientdata(client), 0); 1385 1393 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); 1386 1394 } 1387 1395
+42 -38
drivers/media/video/cx88/cx88-dvb.c
··· 614 614 .set_ts_params = cx24116_set_ts_param, 615 615 }; 616 616 617 + static int cx8802_alloc_frontends(struct cx8802_dev *dev) 618 + { 619 + struct cx88_core *core = dev->core; 620 + struct videobuf_dvb_frontend *fe = NULL; 621 + int i; 622 + 623 + mutex_init(&dev->frontends.lock); 624 + INIT_LIST_HEAD(&dev->frontends.felist); 625 + 626 + if (!core->board.num_frontends) 627 + return -ENODEV; 628 + 629 + printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, 630 + core->board.num_frontends); 631 + for (i = 1; i <= core->board.num_frontends; i++) { 632 + fe = videobuf_dvb_alloc_frontend(&dev->frontends, i); 633 + if (!fe) { 634 + printk(KERN_ERR "%s() failed to alloc\n", __func__); 635 + videobuf_dvb_dealloc_frontends(&dev->frontends); 636 + return -ENOMEM; 637 + } 638 + } 639 + return 0; 640 + } 641 + 617 642 static int dvb_register(struct cx8802_dev *dev) 618 643 { 619 644 struct cx88_core *core = dev->core; 620 645 struct videobuf_dvb_frontend *fe0, *fe1 = NULL; 621 646 int mfe_shared = 0; /* bus not shared by default */ 622 - int i; 623 647 624 648 if (0 != core->i2c_rc) { 625 649 printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); 626 650 goto frontend_detach; 627 - } 628 - 629 - if (!core->board.num_frontends) 630 - return -EINVAL; 631 - 632 - mutex_init(&dev->frontends.lock); 633 - INIT_LIST_HEAD(&dev->frontends.felist); 634 - 635 - printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, 636 - core->board.num_frontends); 637 - for (i = 1; i <= core->board.num_frontends; i++) { 638 - fe0 = videobuf_dvb_alloc_frontend(&dev->frontends, i); 639 - if (!fe0) { 640 - printk(KERN_ERR "%s() failed to alloc\n", __func__); 641 - videobuf_dvb_dealloc_frontends(&dev->frontends); 642 - goto frontend_detach; 643 - } 644 651 } 645 652 646 653 /* Get the first frontend */ ··· 1250 1243 struct cx88_core *core = drv->core; 1251 1244 struct cx8802_dev *dev = drv->core->dvbdev; 1252 1245 int err; 1246 + struct videobuf_dvb_frontend *fe; 1247 + int i; 1253 1248 1254 1249 dprintk( 1, "%s\n", __func__); 1255 1250 dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", ··· 1267 1258 /* If vp3054 isn't enabled, a stub will just return 0 */ 1268 1259 err = vp3054_i2c_probe(dev); 1269 1260 if (0 != err) 1270 - goto fail_probe; 1261 + goto fail_core; 1271 1262 1272 1263 /* dvb stuff */ 1273 1264 printk(KERN_INFO "%s/2: cx2388x based DVB/ATSC card\n", core->name); 1274 1265 dev->ts_gen_cntrl = 0x0c; 1275 1266 1276 - err = -ENODEV; 1277 - if (core->board.num_frontends) { 1278 - struct videobuf_dvb_frontend *fe; 1279 - int i; 1267 + err = cx8802_alloc_frontends(dev); 1268 + if (err) 1269 + goto fail_core; 1280 1270 1281 - for (i = 1; i <= core->board.num_frontends; i++) { 1282 - fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); 1283 - if (fe == NULL) { 1284 - printk(KERN_ERR "%s() failed to get frontend(%d)\n", 1271 + err = -ENODEV; 1272 + for (i = 1; i <= core->board.num_frontends; i++) { 1273 + fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); 1274 + if (fe == NULL) { 1275 + printk(KERN_ERR "%s() failed to get frontend(%d)\n", 1285 1276 __func__, i); 1286 - goto fail_probe; 1287 - } 1288 - videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, 1277 + goto fail_probe; 1278 + } 1279 + videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, 1289 1280 &dev->pci->dev, &dev->slock, 1290 1281 V4L2_BUF_TYPE_VIDEO_CAPTURE, 1291 1282 V4L2_FIELD_TOP, 1292 1283 sizeof(struct cx88_buffer), 1293 1284 dev); 1294 - /* init struct videobuf_dvb */ 1295 - fe->dvb.name = dev->core->name; 1296 - } 1297 - } else { 1298 - /* no frontends allocated */ 1299 - printk(KERN_ERR "%s/2 .num_frontends should be non-zero\n", 1300 - core->name); 1301 - goto fail_core; 1285 + /* init struct videobuf_dvb */ 1286 + fe->dvb.name = dev->core->name; 1302 1287 } 1288 + 1303 1289 err = dvb_register(dev); 1304 1290 if (err) 1305 1291 /* frontends/adapter de-allocated in dvb_register */
+1 -1
drivers/media/video/cx88/cx88.h
··· 336 336 /* config info -- dvb */ 337 337 #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) 338 338 int (*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); 339 - void (*gate_ctrl)(struct cx88_core *core, int open); 340 339 #endif 340 + void (*gate_ctrl)(struct cx88_core *core, int open); 341 341 342 342 /* state info */ 343 343 struct task_struct *kthread;
+12 -2
drivers/media/video/em28xx/em28xx-audio.c
··· 62 62 63 63 dprintk("Stopping isoc\n"); 64 64 for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { 65 - usb_unlink_urb(dev->adev.urb[i]); 65 + if (!irqs_disabled()) 66 + usb_kill_urb(dev->adev.urb[i]); 67 + else 68 + usb_unlink_urb(dev->adev.urb[i]); 66 69 usb_free_urb(dev->adev.urb[i]); 67 70 dev->adev.urb[i] = NULL; 71 + 72 + kfree(dev->adev.transfer_buffer[i]); 73 + dev->adev.transfer_buffer[i] = NULL; 68 74 } 69 75 70 76 return 0; ··· 395 389 static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream 396 390 *substream) 397 391 { 398 - struct em28xx *dev; 392 + unsigned long flags; 399 393 394 + struct em28xx *dev; 400 395 snd_pcm_uframes_t hwptr_done; 396 + 401 397 dev = snd_pcm_substream_chip(substream); 398 + spin_lock_irqsave(&dev->adev.slock, flags); 402 399 hwptr_done = dev->adev.hwptr_done_capture; 400 + spin_unlock_irqrestore(&dev->adev.slock, flags); 403 401 404 402 return hwptr_done; 405 403 }
+26 -6
drivers/media/video/em28xx/em28xx-cards.c
··· 102 102 /* Board - EM2870 Kworld 355u 103 103 Analog - No input analog */ 104 104 105 + static struct em28xx_reg_seq kworld_330u_analog[] = { 106 + {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, 107 + {EM2880_R04_GPO, 0x00, 0xff, 10}, 108 + { -1, -1, -1, -1}, 109 + }; 110 + 111 + static struct em28xx_reg_seq kworld_330u_digital[] = { 112 + {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, 113 + {EM2880_R04_GPO, 0x08, 0xff, 10}, 114 + { -1, -1, -1, -1}, 115 + }; 116 + 105 117 /* Callback for the most boards */ 106 118 static struct em28xx_reg_seq default_tuner_gpio[] = { 107 119 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, ··· 1189 1177 .gpio = hauppauge_wintv_hvr_900_analog, 1190 1178 } }, 1191 1179 }, 1192 - [EM2883_BOARD_KWORLD_HYBRID_A316] = { 1180 + [EM2883_BOARD_KWORLD_HYBRID_330U] = { 1193 1181 .name = "Kworld PlusTV HD Hybrid 330", 1194 1182 .tuner_type = TUNER_XC2028, 1195 1183 .tuner_gpio = default_tuner_gpio, 1196 1184 .decoder = EM28XX_TVP5150, 1197 1185 .mts_firmware = 1, 1198 1186 .has_dvb = 1, 1199 - .dvb_gpio = default_digital, 1187 + .dvb_gpio = kworld_330u_digital, 1188 + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, 1189 + .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_EEPROM_ON_BOARD | EM28XX_I2C_EEPROM_KEY_VALID, 1200 1190 .input = { { 1201 1191 .type = EM28XX_VMUX_TELEVISION, 1202 1192 .vmux = TVP5150_COMPOSITE0, 1203 1193 .amux = EM28XX_AMUX_VIDEO, 1204 - .gpio = default_analog, 1194 + .gpio = kworld_330u_analog, 1195 + .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, 1205 1196 }, { 1206 1197 .type = EM28XX_VMUX_COMPOSITE1, 1207 1198 .vmux = TVP5150_COMPOSITE1, 1208 1199 .amux = EM28XX_AMUX_LINE_IN, 1209 - .gpio = hauppauge_wintv_hvr_900_analog, 1200 + .gpio = kworld_330u_analog, 1201 + .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, 1210 1202 }, { 1211 1203 .type = EM28XX_VMUX_SVIDEO, 1212 1204 .vmux = TVP5150_SVIDEO, 1213 1205 .amux = EM28XX_AMUX_LINE_IN, 1214 - .gpio = hauppauge_wintv_hvr_900_analog, 1206 + .gpio = kworld_330u_analog, 1215 1207 } }, 1216 1208 }, 1217 1209 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { ··· 1265 1249 { USB_DEVICE(0xeb1a, 0xe310), 1266 1250 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, 1267 1251 { USB_DEVICE(0xeb1a, 0xa316), 1268 - .driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 }, 1252 + .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, 1269 1253 { USB_DEVICE(0xeb1a, 0xe320), 1270 1254 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, 1271 1255 { USB_DEVICE(0xeb1a, 0xe323), ··· 1541 1525 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 1542 1526 /* FIXME: Better to specify the needed IF */ 1543 1527 ctl->demod = XC3028_FE_DEFAULT; 1528 + break; 1529 + case EM2883_BOARD_KWORLD_HYBRID_330U: 1530 + ctl->demod = XC3028_FE_CHINA; 1531 + ctl->fname = XC2028_DEFAULT_FIRMWARE; 1544 1532 break; 1545 1533 default: 1546 1534 ctl->demod = XC3028_FE_OREN538;
+18 -2
drivers/media/video/em28xx/em28xx-core.c
··· 438 438 if (dev->audio_mode.ac97 != EM28XX_NO_AC97) { 439 439 int vol; 440 440 441 + em28xx_write_ac97(dev, AC97_POWER_DOWN_CTRL, 0x4200); 442 + em28xx_write_ac97(dev, AC97_EXT_AUD_CTRL, 0x0031); 443 + em28xx_write_ac97(dev, AC97_PCM_IN_SRATE, 0xbb80); 444 + 441 445 /* LSB: left channel - both channels with the same level */ 442 446 vol = (0x1f - dev->volume) | ((0x1f - dev->volume) << 8); 443 447 ··· 457 453 if (ret < 0) 458 454 em28xx_warn("couldn't setup AC97 register %d\n", 459 455 outputs[i].reg); 456 + } 457 + 458 + if (dev->ctl_aoutput & EM28XX_AOUT_PCM_IN) { 459 + int sel = ac97_return_record_select(dev->ctl_aoutput); 460 + 461 + /* Use the same input for both left and right channels */ 462 + sel |= (sel << 8); 463 + 464 + em28xx_write_ac97(dev, AC97_RECORD_SELECT, sel); 460 465 } 461 466 } 462 467 ··· 860 847 for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { 861 848 urb = dev->isoc_ctl.urb[i]; 862 849 if (urb) { 863 - usb_kill_urb(urb); 864 - usb_unlink_urb(urb); 850 + if (!irqs_disabled()) 851 + usb_kill_urb(urb); 852 + else 853 + usb_unlink_urb(urb); 854 + 865 855 if (dev->isoc_ctl.transfer_buffer[i]) { 866 856 usb_buffer_free(dev->udev, 867 857 urb->transfer_buffer_length,
+19 -1
drivers/media/video/em28xx/em28xx-dvb.c
··· 28 28 29 29 #include "lgdt330x.h" 30 30 #include "zl10353.h" 31 + #include "s5h1409.h" 31 32 #ifdef EM28XX_DRX397XD_SUPPORT 32 33 #include "drx397xD.h" 33 34 #endif ··· 233 232 .if2 = 45600, 234 233 }; 235 234 235 + static struct s5h1409_config em28xx_s5h1409_with_xc3028 = { 236 + .demod_address = 0x32 >> 1, 237 + .output_mode = S5H1409_PARALLEL_OUTPUT, 238 + .gpio = S5H1409_GPIO_OFF, 239 + .inversion = S5H1409_INVERSION_OFF, 240 + .status_mode = S5H1409_DEMODLOCKING, 241 + .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK 242 + }; 243 + 236 244 #ifdef EM28XX_DRX397XD_SUPPORT 237 245 /* [TODO] djh - not sure yet what the device config needs to contain */ 238 246 static struct drx397xD_config em28xx_drx397xD_with_xc3028 = { ··· 422 412 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: 423 413 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: 424 414 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 425 - case EM2883_BOARD_KWORLD_HYBRID_A316: 426 415 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: 427 416 dvb->frontend = dvb_attach(lgdt330x_attach, 428 417 &em2880_lgdt3303_dev, ··· 436 427 case EM2880_BOARD_KWORLD_DVB_310U: 437 428 dvb->frontend = dvb_attach(zl10353_attach, 438 429 &em28xx_zl10353_with_xc3028, 430 + &dev->i2c_adap); 431 + if (attach_xc3028(0x61, dev) < 0) { 432 + result = -EINVAL; 433 + goto out_free; 434 + } 435 + break; 436 + case EM2883_BOARD_KWORLD_HYBRID_330U: 437 + dvb->frontend = dvb_attach(s5h1409_attach, 438 + &em28xx_s5h1409_with_xc3028, 439 439 &dev->i2c_adap); 440 440 if (attach_xc3028(0x61, dev) < 0) { 441 441 result = -EINVAL;
+29 -22
drivers/media/video/em28xx/em28xx-video.c
··· 886 886 if (0 == INPUT(i)->type) 887 887 return -EINVAL; 888 888 889 + dev->ctl_input = i; 890 + 889 891 mutex_lock(&dev->lock); 890 - 891 - video_mux(dev, i); 892 - 892 + video_mux(dev, dev->ctl_input); 893 893 mutex_unlock(&dev->lock); 894 894 return 0; 895 895 } ··· 938 938 { 939 939 struct em28xx_fh *fh = priv; 940 940 struct em28xx *dev = fh->dev; 941 + 942 + 943 + if (a->index >= MAX_EM28XX_INPUT) 944 + return -EINVAL; 945 + if (0 == INPUT(a->index)->type) 946 + return -EINVAL; 941 947 942 948 mutex_lock(&dev->lock); 943 949 ··· 1956 1950 1957 1951 int em28xx_register_analog_devices(struct em28xx *dev) 1958 1952 { 1953 + u8 val; 1959 1954 int ret; 1960 1955 1961 1956 printk(KERN_INFO "%s: v4l2 driver version %d.%d.%d\n", 1962 1957 dev->name, 1963 1958 (EM28XX_VERSION_CODE >> 16) & 0xff, 1964 1959 (EM28XX_VERSION_CODE >> 8) & 0xff, EM28XX_VERSION_CODE & 0xff); 1965 - 1966 - /* Analog specific initialization */ 1967 - dev->format = &format[0]; 1968 - video_mux(dev, 0); 1969 - 1970 - /* enable vbi capturing */ 1971 - 1972 - /* em28xx_write_reg(dev, EM28XX_R0E_AUDIOSRC, 0xc0); audio register */ 1973 - /* em28xx_write_reg(dev, EM28XX_R0F_XCLK, 0x80); clk register */ 1974 - em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x51); 1975 - 1976 - dev->mute = 1; /* maybe not the right place... */ 1977 - dev->volume = 0x1f; 1978 - 1979 - em28xx_set_outfmt(dev); 1980 - em28xx_colorlevels_set_default(dev); 1981 - em28xx_compression_disable(dev); 1982 1960 1983 1961 /* set default norm */ 1984 1962 dev->norm = em28xx_video_template.current_norm; ··· 1971 1981 dev->interlaced = EM28XX_INTERLACED_DEFAULT; 1972 1982 dev->hscale = 0; 1973 1983 dev->vscale = 0; 1984 + dev->ctl_input = 0; 1974 1985 1975 - /* FIXME: This is a very bad hack! Not all devices have TV on input 2 */ 1976 - dev->ctl_input = 2; 1986 + /* Analog specific initialization */ 1987 + dev->format = &format[0]; 1988 + video_mux(dev, dev->ctl_input); 1989 + 1990 + /* Audio defaults */ 1991 + dev->mute = 1; 1992 + dev->volume = 0x1f; 1993 + 1994 + /* enable vbi capturing */ 1995 + 1996 + /* em28xx_write_reg(dev, EM28XX_R0E_AUDIOSRC, 0xc0); audio register */ 1997 + val = (u8)em28xx_read_reg(dev, EM28XX_R0F_XCLK); 1998 + em28xx_write_reg(dev, EM28XX_R0F_XCLK, (EM28XX_XCLK_AUDIO_UNMUTE | val)); 1999 + em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x51); 2000 + 2001 + em28xx_set_outfmt(dev); 2002 + em28xx_colorlevels_set_default(dev); 2003 + em28xx_compression_disable(dev); 1977 2004 1978 2005 /* allocate and fill video video_device struct */ 1979 2006 dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video");
+20 -1
drivers/media/video/em28xx/em28xx.h
··· 94 94 #define EM2882_BOARD_KWORLD_VS_DVBT 54 95 95 #define EM2882_BOARD_TERRATEC_HYBRID_XS 55 96 96 #define EM2882_BOARD_PINNACLE_HYBRID_PRO 56 97 - #define EM2883_BOARD_KWORLD_HYBRID_A316 57 97 + #define EM2883_BOARD_KWORLD_HYBRID_330U 57 98 98 #define EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU 58 99 99 #define EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 60 100 100 #define EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2 61 ··· 300 300 }; 301 301 302 302 enum em28xx_aout { 303 + /* AC97 outputs */ 303 304 EM28XX_AOUT_MASTER = 1 << 0, 304 305 EM28XX_AOUT_LINE = 1 << 1, 305 306 EM28XX_AOUT_MONO = 1 << 2, 306 307 EM28XX_AOUT_LFE = 1 << 3, 307 308 EM28XX_AOUT_SURR = 1 << 4, 309 + 310 + /* PCM IN Mixer - used by AC97_RECORD_SELECT register */ 311 + EM28XX_AOUT_PCM_IN = 1 << 7, 312 + 313 + /* Bits 10-8 are used to indicate the PCM IN record select */ 314 + EM28XX_AOUT_PCM_MIC_PCM = 0 << 8, 315 + EM28XX_AOUT_PCM_CD = 1 << 8, 316 + EM28XX_AOUT_PCM_VIDEO = 2 << 8, 317 + EM28XX_AOUT_PCM_AUX = 3 << 8, 318 + EM28XX_AOUT_PCM_LINE = 4 << 8, 319 + EM28XX_AOUT_PCM_STEREO = 5 << 8, 320 + EM28XX_AOUT_PCM_MONO = 6 << 8, 321 + EM28XX_AOUT_PCM_PHONE = 7 << 8, 308 322 }; 323 + 324 + static inline int ac97_return_record_select(int a_out) 325 + { 326 + return (a_out & 0x700) >> 8; 327 + } 309 328 310 329 struct em28xx_reg_seq { 311 330 int reg;
+2 -2
drivers/media/video/gspca/gspca.c
··· 423 423 break; 424 424 425 425 gspca_dev->urb[i] = NULL; 426 - usb_kill_urb(urb); 426 + if (!gspca_dev->present) 427 + usb_kill_urb(urb); 427 428 if (urb->transfer_buffer != NULL) 428 429 usb_buffer_free(gspca_dev->dev, 429 430 urb->transfer_buffer_length, ··· 1951 1950 struct gspca_dev *gspca_dev = usb_get_intfdata(intf); 1952 1951 1953 1952 gspca_dev->present = 0; 1954 - gspca_dev->streaming = 0; 1955 1953 1956 1954 usb_set_intfdata(intf, NULL); 1957 1955
+3 -1
drivers/media/video/ivtv/ivtv-driver.c
··· 949 949 itv->instance = atomic_inc_return(&ivtv_instance) - 1; 950 950 951 951 retval = v4l2_device_register(&dev->dev, &itv->device); 952 - if (retval) 952 + if (retval) { 953 + kfree(itv); 953 954 return retval; 955 + } 954 956 /* "ivtv + PCI ID" is a bit of a mouthful, so use 955 957 "ivtv + instance" instead. */ 956 958 snprintf(itv->device.name, sizeof(itv->device.name),
-1
drivers/media/video/pwc/pwc-if.c
··· 62 62 #include <linux/poll.h> 63 63 #include <linux/slab.h> 64 64 #include <linux/vmalloc.h> 65 - #include <linux/version.h> 66 65 #include <asm/io.h> 67 66 68 67 #include "pwc.h"
+30 -22
drivers/media/video/saa7127.c
··· 149 149 { SAA7127_REG_COPYGEN_0, 0x77 }, 150 150 { SAA7127_REG_COPYGEN_1, 0x41 }, 151 151 { SAA7127_REG_COPYGEN_2, 0x00 }, /* Macrovision enable/disable */ 152 - { SAA7127_REG_OUTPUT_PORT_CONTROL, 0x9e }, 152 + { SAA7127_REG_OUTPUT_PORT_CONTROL, 0xbf }, 153 153 { SAA7127_REG_GAIN_LUMINANCE_RGB, 0x00 }, 154 154 { SAA7127_REG_GAIN_COLORDIFF_RGB, 0x00 }, 155 155 { SAA7127_REG_INPUT_PORT_CONTROL_1, 0x80 }, /* for color bars */ ··· 488 488 break; 489 489 490 490 case SAA7127_OUTPUT_TYPE_COMPOSITE: 491 - state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ 491 + if (state->ident == V4L2_IDENT_SAA7129) 492 + state->reg_2d = 0x20; /* CVBS only */ 493 + else 494 + state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ 492 495 state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ 493 496 break; 494 497 495 498 case SAA7127_OUTPUT_TYPE_SVIDEO: 496 - state->reg_2d = 0xff; /* 11111111 croma -> R, luma -> CVBS + G + B */ 499 + if (state->ident == V4L2_IDENT_SAA7129) 500 + state->reg_2d = 0x18; /* Y + C */ 501 + else 502 + state->reg_2d = 0xff; /*11111111 croma -> R, luma -> CVBS + G + B */ 497 503 state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ 498 504 break; 499 505 ··· 514 508 break; 515 509 516 510 case SAA7127_OUTPUT_TYPE_BOTH: 517 - state->reg_2d = 0xbf; 511 + if (state->ident == V4L2_IDENT_SAA7129) 512 + state->reg_2d = 0x38; 513 + else 514 + state->reg_2d = 0xbf; 518 515 state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ 519 516 break; 520 517 ··· 740 731 return -ENODEV; 741 732 } 742 733 743 - /* Configure Encoder */ 744 - 745 - v4l2_dbg(1, debug, sd, "Configuring encoder\n"); 746 - saa7127_write_inittab(sd, saa7127_init_config_common); 747 - saa7127_set_std(sd, V4L2_STD_NTSC); 748 - saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH); 749 - saa7127_set_vps(sd, &vbi); 750 - saa7127_set_wss(sd, &vbi); 751 - saa7127_set_cc(sd, &vbi); 752 - saa7127_set_xds(sd, &vbi); 753 - if (test_image == 1) 754 - /* The Encoder has an internal Colorbar generator */ 755 - /* This can be used for debugging */ 756 - saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE); 757 - else 758 - saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL); 759 - saa7127_set_video_enable(sd, 1); 760 - 761 734 if (id->driver_data) { /* Chip type is already known */ 762 735 state->ident = id->driver_data; 763 736 } else { /* Needs detection */ ··· 761 770 762 771 v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name, 763 772 client->addr << 1, client->adapter->name); 773 + 774 + v4l2_dbg(1, debug, sd, "Configuring encoder\n"); 775 + saa7127_write_inittab(sd, saa7127_init_config_common); 776 + saa7127_set_std(sd, V4L2_STD_NTSC); 777 + saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH); 778 + saa7127_set_vps(sd, &vbi); 779 + saa7127_set_wss(sd, &vbi); 780 + saa7127_set_cc(sd, &vbi); 781 + saa7127_set_xds(sd, &vbi); 782 + if (test_image == 1) 783 + /* The Encoder has an internal Colorbar generator */ 784 + /* This can be used for debugging */ 785 + saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE); 786 + else 787 + saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL); 788 + saa7127_set_video_enable(sd, 1); 789 + 764 790 if (state->ident == V4L2_IDENT_SAA7129) 765 791 saa7127_write_inittab(sd, saa7129_init_config_extra); 766 792 return 0;
+5 -1
drivers/media/video/saa7134/saa7134-alsa.c
··· 1089 1089 1090 1090 list_for_each(list,&saa7134_devlist) { 1091 1091 dev = list_entry(list, struct saa7134_dev, devlist); 1092 - alsa_device_init(dev); 1092 + if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130) 1093 + printk(KERN_INFO "%s/alsa: %s doesn't support digital audio\n", 1094 + dev->name, saa7134_boards[dev->board].name); 1095 + else 1096 + alsa_device_init(dev); 1093 1097 } 1094 1098 1095 1099 if (dev == NULL)
+4
drivers/media/video/saa7134/saa7134-core.c
··· 660 660 661 661 saa_writel(SAA7134_IRQ1, 0); 662 662 saa_writel(SAA7134_IRQ2, 0); 663 + 664 + /* Clear any stale IRQ reports */ 665 + saa_writel(SAA7134_IRQ_REPORT, saa_readl(SAA7134_IRQ_REPORT)); 666 + 663 667 mutex_init(&dev->lock); 664 668 spin_lock_init(&dev->slock); 665 669
-1
drivers/media/video/saa717x.c
··· 30 30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 31 31 */ 32 32 33 - #include <linux/version.h> 34 33 #include <linux/module.h> 35 34 #include <linux/kernel.h> 36 35 #include <linux/sched.h>
+1 -1
drivers/media/video/tda9875.c
··· 242 242 static int tda9875_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 243 243 { 244 244 struct tda9875 *t = to_state(sd); 245 - int chvol=0, volume, balance, left, right; 245 + int chvol = 0, volume = 0, balance = 0, left, right; 246 246 247 247 switch (ctrl->id) { 248 248 case V4L2_CID_AUDIO_VOLUME:
+3
drivers/media/video/tveeprom.c
··· 427 427 const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; 428 428 429 429 memset(tvee, 0, sizeof(*tvee)); 430 + tvee->tuner_type = TUNER_ABSENT; 431 + tvee->tuner2_type = TUNER_ABSENT; 432 + 430 433 done = len = beenhere = 0; 431 434 432 435 /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */
+1 -1
drivers/media/video/tvp514x.c
··· 1401 1401 1402 1402 decoder->pdata = client->dev.platform_data; 1403 1403 if (!decoder->pdata) { 1404 - v4l_err(client, "No platform data\n!!"); 1404 + v4l_err(client, "No platform data!!\n"); 1405 1405 return -ENODEV; 1406 1406 } 1407 1407 /*
-1
drivers/media/video/upd64031a.c
··· 21 21 */ 22 22 23 23 24 - #include <linux/version.h> 25 24 #include <linux/module.h> 26 25 #include <linux/kernel.h> 27 26 #include <linux/i2c.h>
-1
drivers/media/video/upd64083.c
··· 21 21 * 02110-1301, USA. 22 22 */ 23 23 24 - #include <linux/version.h> 25 24 #include <linux/module.h> 26 25 #include <linux/kernel.h> 27 26 #include <linux/i2c.h>
+1 -1
drivers/media/video/usbvision/usbvision-i2c.c
··· 157 157 struct i2c_msg *pmsg; 158 158 struct usb_usbvision *usbvision; 159 159 int i, ret; 160 - unsigned char addr; 160 + unsigned char addr = 0; 161 161 162 162 usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); 163 163
+3 -4
drivers/media/video/uvc/uvc_ctrl.c
··· 1 1 /* 2 2 * uvc_ctrl.c -- USB Video Class driver - Controls 3 3 * 4 - * Copyright (C) 2005-2008 4 + * Copyright (C) 2005-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 12 12 */ 13 13 14 14 #include <linux/kernel.h> 15 - #include <linux/version.h> 16 15 #include <linux/list.h> 17 16 #include <linux/module.h> 18 17 #include <linux/uaccess.h> ··· 28 29 #define UVC_CTRL_DATA_BACKUP 1 29 30 30 31 /* ------------------------------------------------------------------------ 31 - * Control, formats, ... 32 + * Controls 32 33 */ 33 34 34 35 static struct uvc_control_info uvc_ctrls[] = { ··· 634 635 mask = (1 << bits) - 1; 635 636 } 636 637 637 - /* Sign-extend the value if needed */ 638 + /* Sign-extend the value if needed. */ 638 639 if (mapping->data_type == UVC_CTRL_DATA_TYPE_SIGNED) 639 640 value |= -(value & (1 << (mapping->size - 1))); 640 641
+25 -30
drivers/media/video/uvc/uvc_driver.c
··· 1 1 /* 2 2 * uvc_driver.c -- USB Video Class driver 3 3 * 4 - * Copyright (C) 2005-2008 4 + * Copyright (C) 2005-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 24 24 */ 25 25 26 26 #include <linux/kernel.h> 27 - #include <linux/version.h> 28 27 #include <linux/list.h> 29 28 #include <linux/module.h> 30 29 #include <linux/usb.h> ··· 48 49 unsigned int uvc_trace_param; 49 50 50 51 /* ------------------------------------------------------------------------ 51 - * Control, formats, ... 52 + * Video formats 52 53 */ 53 54 54 55 static struct uvc_format_desc uvc_fmts[] = { ··· 473 474 474 475 /* Several UVC chipsets screw up dwMaxVideoFrameBufferSize 475 476 * completely. Observed behaviours range from setting the 476 - * value to 1.1x the actual frame size of hardwiring the 477 + * value to 1.1x the actual frame size to hardwiring the 477 478 * 16 low bits to 0. This results in a higher than necessary 478 479 * memory usage as well as a wrong image size information. For 479 480 * uncompressed formats this can be fixed by computing the ··· 486 487 /* Some bogus devices report dwMinFrameInterval equal to 487 488 * dwMaxFrameInterval and have dwFrameIntervalStep set to 488 489 * zero. Setting all null intervals to 1 fixes the problem and 489 - * some other divisions by zero which could happen. 490 + * some other divisions by zero that could happen. 490 491 */ 491 492 for (i = 0; i < n; ++i) { 492 493 interval = get_unaligned_le32(&buffer[26+4*i]); ··· 1199 1200 * Scan the UVC descriptors to locate a chain starting at an Output Terminal 1200 1201 * and containing the following units: 1201 1202 * 1202 - * - a USB Streaming Output Terminal 1203 + * - one Output Terminal (USB Streaming or Display) 1203 1204 * - zero or one Processing Unit 1204 1205 * - zero, one or mode single-input Selector Units 1205 1206 * - zero or one multiple-input Selector Units, provided all inputs are 1206 1207 * connected to input terminals 1207 1208 * - zero, one or mode single-input Extension Units 1208 - * - one Camera Input Terminal, or one or more External terminals. 1209 + * - one or more Input Terminals (Camera, External or USB Streaming) 1209 1210 * 1210 1211 * A side forward scan is made on each detected entity to check for additional 1211 1212 * extension units. ··· 1530 1531 1531 1532 /* Set the driver data before calling video_register_device, otherwise 1532 1533 * uvc_v4l2_open might race us. 1533 - * 1534 - * FIXME: usb_set_intfdata hasn't been called so far. Is that a 1535 - * problem ? Does any function which could be called here get 1536 - * a pointer to the usb_interface ? 1537 1534 */ 1538 1535 dev->video.vdev = vdev; 1539 1536 video_set_drvdata(vdev, &dev->video); ··· 1564 1569 struct uvc_device *dev = container_of(kref, struct uvc_device, kref); 1565 1570 struct list_head *p, *n; 1566 1571 1567 - /* Unregister the video device */ 1572 + /* Unregister the video device. */ 1568 1573 uvc_unregister_video(dev); 1569 1574 usb_put_intf(dev->intf); 1570 1575 usb_put_dev(dev->udev); ··· 1607 1612 uvc_trace(UVC_TRACE_PROBE, "Probing generic UVC device %s\n", 1608 1613 udev->devpath); 1609 1614 1610 - /* Allocate memory for the device and initialize it */ 1615 + /* Allocate memory for the device and initialize it. */ 1611 1616 if ((dev = kzalloc(sizeof *dev, GFP_KERNEL)) == NULL) 1612 1617 return -ENOMEM; 1613 1618 ··· 1628 1633 le16_to_cpu(udev->descriptor.idVendor), 1629 1634 le16_to_cpu(udev->descriptor.idProduct)); 1630 1635 1631 - /* Parse the Video Class control descriptor */ 1636 + /* Parse the Video Class control descriptor. */ 1632 1637 if (uvc_parse_control(dev) < 0) { 1633 1638 uvc_trace(UVC_TRACE_PROBE, "Unable to parse UVC " 1634 1639 "descriptors.\n"); 1635 1640 goto error; 1636 1641 } 1637 1642 1638 - uvc_printk(KERN_INFO, "Found UVC %u.%02u device %s (%04x:%04x)\n", 1643 + uvc_printk(KERN_INFO, "Found UVC %u.%02x device %s (%04x:%04x)\n", 1639 1644 dev->uvc_version >> 8, dev->uvc_version & 0xff, 1640 1645 udev->product ? udev->product : "<unnamed>", 1641 1646 le16_to_cpu(udev->descriptor.idVendor), ··· 1648 1653 "linux-uvc-devel mailing list.\n"); 1649 1654 } 1650 1655 1651 - /* Initialize controls */ 1656 + /* Initialize controls. */ 1652 1657 if (uvc_ctrl_init_device(dev) < 0) 1653 1658 goto error; 1654 1659 1655 - /* Register the video devices */ 1660 + /* Register the video devices. */ 1656 1661 if (uvc_register_video(dev) < 0) 1657 1662 goto error; 1658 1663 1659 - /* Save our data pointer in the interface data */ 1664 + /* Save our data pointer in the interface data. */ 1660 1665 usb_set_intfdata(intf, dev); 1661 1666 1662 - /* Initialize the interrupt URB */ 1667 + /* Initialize the interrupt URB. */ 1663 1668 if ((ret = uvc_status_init(dev)) < 0) { 1664 1669 uvc_printk(KERN_INFO, "Unable to initialize the status " 1665 1670 "endpoint (%d), status interrupt will not be " ··· 1834 1839 .bInterfaceSubClass = 1, 1835 1840 .bInterfaceProtocol = 0 }, 1836 1841 /* Apple Built-In iSight */ 1837 - { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 1842 + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 1838 1843 | USB_DEVICE_ID_MATCH_INT_INFO, 1839 1844 .idVendor = 0x05ac, 1840 1845 .idProduct = 0x8501, 1841 - .bInterfaceClass = USB_CLASS_VIDEO, 1842 - .bInterfaceSubClass = 1, 1843 - .bInterfaceProtocol = 0, 1846 + .bInterfaceClass = USB_CLASS_VIDEO, 1847 + .bInterfaceSubClass = 1, 1848 + .bInterfaceProtocol = 0, 1844 1849 .driver_info = UVC_QUIRK_PROBE_MINMAX 1845 1850 | UVC_QUIRK_BUILTIN_ISIGHT }, 1846 1851 /* Genesys Logic USB 2.0 PC Camera */ 1847 - { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 1852 + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 1848 1853 | USB_DEVICE_ID_MATCH_INT_INFO, 1849 - .idVendor = 0x05e3, 1850 - .idProduct = 0x0505, 1851 - .bInterfaceClass = USB_CLASS_VIDEO, 1852 - .bInterfaceSubClass = 1, 1853 - .bInterfaceProtocol = 0, 1854 - .driver_info = UVC_QUIRK_STREAM_NO_FID }, 1854 + .idVendor = 0x05e3, 1855 + .idProduct = 0x0505, 1856 + .bInterfaceClass = USB_CLASS_VIDEO, 1857 + .bInterfaceSubClass = 1, 1858 + .bInterfaceProtocol = 0, 1859 + .driver_info = UVC_QUIRK_STREAM_NO_FID }, 1855 1860 /* MT6227 */ 1856 1861 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 1857 1862 | USB_DEVICE_ID_MATCH_INT_INFO,
+2
drivers/media/video/uvc/uvc_isight.c
··· 3 3 * 4 4 * Copyright (C) 2006-2007 5 5 * Ivan N. Zlatev <contact@i-nz.net> 6 + * Copyright (C) 2008-2009 7 + * Laurent Pinchart <laurent.pinchart@skynet.be> 6 8 * 7 9 * This program is free software; you can redistribute it and/or modify 8 10 * it under the terms of the GNU General Public License as published by
+15 -16
drivers/media/video/uvc/uvc_queue.c
··· 1 1 /* 2 2 * uvc_queue.c -- USB Video Class driver - Buffers management 3 3 * 4 - * Copyright (C) 2005-2008 4 + * Copyright (C) 2005-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 12 12 */ 13 13 14 14 #include <linux/kernel.h> 15 - #include <linux/version.h> 16 15 #include <linux/mm.h> 17 16 #include <linux/list.h> 18 17 #include <linux/module.h> ··· 36 37 * to user space will return -EBUSY. 37 38 * 38 39 * Video buffers are managed using two queues. However, unlike most USB video 39 - * drivers which use an in queue and an out queue, we use a main queue which 40 - * holds all queued buffers (both 'empty' and 'done' buffers), and an irq 41 - * queue which holds empty buffers. This design (copied from video-buf) 42 - * minimizes locking in interrupt, as only one queue is shared between 43 - * interrupt and user contexts. 40 + * drivers that use an in queue and an out queue, we use a main queue to hold 41 + * all queued buffers (both 'empty' and 'done' buffers), and an irq queue to 42 + * hold empty buffers. This design (copied from video-buf) minimizes locking 43 + * in interrupt, as only one queue is shared between interrupt and user 44 + * contexts. 44 45 * 45 46 * Use cases 46 47 * --------- 47 48 * 48 - * Unless stated otherwise, all operations which modify the irq buffers queue 49 + * Unless stated otherwise, all operations that modify the irq buffers queue 49 50 * are protected by the irq spinlock. 50 51 * 51 52 * 1. The user queues the buffers, starts streaming and dequeues a buffer. 52 53 * 53 54 * The buffers are added to the main and irq queues. Both operations are 54 - * protected by the queue lock, and the latert is protected by the irq 55 + * protected by the queue lock, and the later is protected by the irq 55 56 * spinlock as well. 56 57 * 57 58 * The completion handler fetches a buffer from the irq queue and fills it ··· 59 60 * returns immediately. 60 61 * 61 62 * When the buffer is full, the completion handler removes it from the irq 62 - * queue, marks it as ready (UVC_BUF_STATE_DONE) and wake its wait queue. 63 + * queue, marks it as ready (UVC_BUF_STATE_DONE) and wakes its wait queue. 63 64 * At that point, any process waiting on the buffer will be woken up. If a 64 65 * process tries to dequeue a buffer after it has been marked ready, the 65 66 * dequeing will succeed immediately. ··· 90 91 /* 91 92 * Allocate the video buffers. 92 93 * 93 - * Pages are reserved to make sure they will not be swaped, as they will be 94 - * filled in URB completion handler. 94 + * Pages are reserved to make sure they will not be swapped, as they will be 95 + * filled in the URB completion handler. 95 96 * 96 97 * Buffers will be individually mapped, so they must all be page aligned. 97 98 */ ··· 209 210 __uvc_query_buffer(&queue->buffer[v4l2_buf->index], v4l2_buf); 210 211 211 212 done: 212 - mutex_unlock(&queue->mutex); 213 - return ret; 213 + mutex_unlock(&queue->mutex); 214 + return ret; 214 215 } 215 216 216 217 /* ··· 235 236 } 236 237 237 238 mutex_lock(&queue->mutex); 238 - if (v4l2_buf->index >= queue->count) { 239 + if (v4l2_buf->index >= queue->count) { 239 240 uvc_trace(UVC_TRACE_CAPTURE, "[E] Out of range index.\n"); 240 241 ret = -EINVAL; 241 242 goto done; ··· 428 429 * Cancel the video buffers queue. 429 430 * 430 431 * Cancelling the queue marks all buffers on the irq queue as erroneous, 431 - * wakes them up and remove them from the queue. 432 + * wakes them up and removes them from the queue. 432 433 * 433 434 * If the disconnect parameter is set, further calls to uvc_queue_buffer will 434 435 * fail with -ENODEV.
+1 -2
drivers/media/video/uvc/uvc_status.c
··· 1 1 /* 2 2 * uvc_status.c -- USB Video Class driver - Status endpoint 3 3 * 4 - * Copyright (C) 2007-2008 4 + * Copyright (C) 2007-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 12 12 */ 13 13 14 14 #include <linux/kernel.h> 15 - #include <linux/version.h> 16 15 #include <linux/input.h> 17 16 #include <linux/usb.h> 18 17 #include <linux/usb/input.h>
+5 -5
drivers/media/video/uvc/uvc_v4l2.c
··· 1 1 /* 2 2 * uvc_v4l2.c -- USB Video Class driver - V4L2 API 3 3 * 4 - * Copyright (C) 2005-2008 4 + * Copyright (C) 2005-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 37 37 * must be grouped (for instance the Red Balance, Blue Balance and Do White 38 38 * Balance V4L2 controls use the White Balance Component UVC control) or 39 39 * otherwise translated. The approach we take here is to use a translation 40 - * table for the controls which can be mapped directly, and handle the others 40 + * table for the controls that can be mapped directly, and handle the others 41 41 * manually. 42 42 */ 43 43 static int uvc_v4l2_query_menu(struct uvc_video_device *video, ··· 189 189 probe->dwMaxVideoFrameSize = 190 190 video->streaming->ctrl.dwMaxVideoFrameSize; 191 191 192 - /* Probe the device */ 192 + /* Probe the device. */ 193 193 if ((ret = uvc_probe_video(video, probe)) < 0) 194 194 goto done; 195 195 ··· 354 354 * 355 355 * Each open instance of a UVC device can either be in a privileged or 356 356 * unprivileged state. Only a single instance can be in a privileged state at 357 - * a given time. Trying to perform an operation which requires privileges will 357 + * a given time. Trying to perform an operation that requires privileges will 358 358 * automatically acquire the required privileges if possible, or return -EBUSY 359 359 * otherwise. Privileges are dismissed when closing the instance. 360 360 * 361 - * Operations which require privileges are: 361 + * Operations that require privileges are: 362 362 * 363 363 * - VIDIOC_S_INPUT 364 364 * - VIDIOC_S_PARM
+19 -12
drivers/media/video/uvc/uvc_video.c
··· 1 1 /* 2 2 * uvc_video.c -- USB Video Class driver - Video handling 3 3 * 4 - * Copyright (C) 2005-2008 4 + * Copyright (C) 2005-2009 5 5 * Laurent Pinchart (laurent.pinchart@skynet.be) 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify ··· 12 12 */ 13 13 14 14 #include <linux/kernel.h> 15 - #include <linux/version.h> 16 15 #include <linux/list.h> 17 16 #include <linux/module.h> 18 17 #include <linux/usb.h> ··· 114 115 ctrl->wCompQuality = le16_to_cpup((__le16 *)data); 115 116 ret = 0; 116 117 goto out; 117 - } else if (query == GET_DEF && probe == 1) { 118 + } else if (query == GET_DEF && probe == 1 && ret != size) { 118 119 /* Many cameras don't support the GET_DEF request on their 119 120 * video probe control. Warn once and return, the caller will 120 121 * fall back to GET_CUR. ··· 159 160 } 160 161 161 162 /* Some broken devices return a null or wrong dwMaxVideoFrameSize. 162 - * Try to get the value from the format and frame descriptor. 163 + * Try to get the value from the format and frame descriptors. 163 164 */ 164 165 uvc_fixup_buffer_size(video, ctrl); 165 166 ret = 0; ··· 190 191 *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality); 191 192 *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize); 192 193 *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay); 193 - /* Note: Some of the fields below are not required for IN devices (see 194 - * UVC spec, 4.3.1.1), but we still copy them in case support for OUT 195 - * devices is added in the future. */ 196 194 put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]); 197 195 put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]); 198 196 ··· 396 400 * 397 401 * Empty buffers (bytesused == 0) don't trigger end of frame detection 398 402 * as it doesn't make sense to return an empty buffer. This also 399 - * avoids detecting and of frame conditions at FID toggling if the 403 + * avoids detecting end of frame conditions at FID toggling if the 400 404 * previous payload had the EOF bit set. 401 405 */ 402 406 if (fid != video->last_fid && buf->buf.bytesused != 0) { ··· 449 453 } 450 454 } 451 455 456 + /* Video payload encoding is handled by uvc_video_encode_header() and 457 + * uvc_video_encode_data(). Only bulk transfers are currently supported. 458 + * 459 + * uvc_video_encode_header is called at the start of a payload. It adds header 460 + * data to the transfer buffer and returns the header size. As the only known 461 + * UVC output device transfers a whole frame in a single payload, the EOF bit 462 + * is always set in the header. 463 + * 464 + * uvc_video_encode_data is called for every URB and copies the data from the 465 + * video buffer to the transfer buffer. 466 + */ 452 467 static int uvc_video_encode_header(struct uvc_video_device *video, 453 468 struct uvc_buffer *buf, __u8 *data, int len) 454 469 { ··· 960 953 } 961 954 962 955 /* 963 - * Reconfigure the video interface and restart streaming if it was enable 956 + * Reconfigure the video interface and restart streaming if it was enabled 964 957 * before suspend. 965 958 * 966 959 * If an error occurs, disable the video queue. This will wake all pending ··· 992 985 */ 993 986 994 987 /* 995 - * Initialize the UVC video device by retrieving the default format and 996 - * committing it. 988 + * Initialize the UVC video device by switching to alternate setting 0 and 989 + * retrieve the default format. 997 990 * 998 991 * Some cameras (namely the Fuji Finepix) set the format and frame 999 992 * indexes to zero. The UVC standard doesn't clearly make this a spec ··· 1021 1014 */ 1022 1015 usb_set_interface(video->dev->udev, video->streaming->intfnum, 0); 1023 1016 1024 - /* Some webcams don't suport GET_DEF request on the probe control. We 1017 + /* Some webcams don't suport GET_DEF requests on the probe control. We 1025 1018 * fall back to GET_CUR if GET_DEF fails. 1026 1019 */ 1027 1020 if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 &&
+115 -115
drivers/media/video/uvc/uvcvideo.h
··· 72 72 * UVC constants 73 73 */ 74 74 75 - #define SC_UNDEFINED 0x00 76 - #define SC_VIDEOCONTROL 0x01 77 - #define SC_VIDEOSTREAMING 0x02 78 - #define SC_VIDEO_INTERFACE_COLLECTION 0x03 75 + #define SC_UNDEFINED 0x00 76 + #define SC_VIDEOCONTROL 0x01 77 + #define SC_VIDEOSTREAMING 0x02 78 + #define SC_VIDEO_INTERFACE_COLLECTION 0x03 79 79 80 - #define PC_PROTOCOL_UNDEFINED 0x00 80 + #define PC_PROTOCOL_UNDEFINED 0x00 81 81 82 - #define CS_UNDEFINED 0x20 83 - #define CS_DEVICE 0x21 84 - #define CS_CONFIGURATION 0x22 85 - #define CS_STRING 0x23 86 - #define CS_INTERFACE 0x24 87 - #define CS_ENDPOINT 0x25 82 + #define CS_UNDEFINED 0x20 83 + #define CS_DEVICE 0x21 84 + #define CS_CONFIGURATION 0x22 85 + #define CS_STRING 0x23 86 + #define CS_INTERFACE 0x24 87 + #define CS_ENDPOINT 0x25 88 88 89 89 /* VideoControl class specific interface descriptor */ 90 - #define VC_DESCRIPTOR_UNDEFINED 0x00 91 - #define VC_HEADER 0x01 92 - #define VC_INPUT_TERMINAL 0x02 93 - #define VC_OUTPUT_TERMINAL 0x03 94 - #define VC_SELECTOR_UNIT 0x04 95 - #define VC_PROCESSING_UNIT 0x05 96 - #define VC_EXTENSION_UNIT 0x06 90 + #define VC_DESCRIPTOR_UNDEFINED 0x00 91 + #define VC_HEADER 0x01 92 + #define VC_INPUT_TERMINAL 0x02 93 + #define VC_OUTPUT_TERMINAL 0x03 94 + #define VC_SELECTOR_UNIT 0x04 95 + #define VC_PROCESSING_UNIT 0x05 96 + #define VC_EXTENSION_UNIT 0x06 97 97 98 98 /* VideoStreaming class specific interface descriptor */ 99 - #define VS_UNDEFINED 0x00 100 - #define VS_INPUT_HEADER 0x01 101 - #define VS_OUTPUT_HEADER 0x02 102 - #define VS_STILL_IMAGE_FRAME 0x03 103 - #define VS_FORMAT_UNCOMPRESSED 0x04 104 - #define VS_FRAME_UNCOMPRESSED 0x05 105 - #define VS_FORMAT_MJPEG 0x06 106 - #define VS_FRAME_MJPEG 0x07 107 - #define VS_FORMAT_MPEG2TS 0x0a 108 - #define VS_FORMAT_DV 0x0c 109 - #define VS_COLORFORMAT 0x0d 110 - #define VS_FORMAT_FRAME_BASED 0x10 111 - #define VS_FRAME_FRAME_BASED 0x11 112 - #define VS_FORMAT_STREAM_BASED 0x12 99 + #define VS_UNDEFINED 0x00 100 + #define VS_INPUT_HEADER 0x01 101 + #define VS_OUTPUT_HEADER 0x02 102 + #define VS_STILL_IMAGE_FRAME 0x03 103 + #define VS_FORMAT_UNCOMPRESSED 0x04 104 + #define VS_FRAME_UNCOMPRESSED 0x05 105 + #define VS_FORMAT_MJPEG 0x06 106 + #define VS_FRAME_MJPEG 0x07 107 + #define VS_FORMAT_MPEG2TS 0x0a 108 + #define VS_FORMAT_DV 0x0c 109 + #define VS_COLORFORMAT 0x0d 110 + #define VS_FORMAT_FRAME_BASED 0x10 111 + #define VS_FRAME_FRAME_BASED 0x11 112 + #define VS_FORMAT_STREAM_BASED 0x12 113 113 114 114 /* Endpoint type */ 115 - #define EP_UNDEFINED 0x00 116 - #define EP_GENERAL 0x01 117 - #define EP_ENDPOINT 0x02 118 - #define EP_INTERRUPT 0x03 115 + #define EP_UNDEFINED 0x00 116 + #define EP_GENERAL 0x01 117 + #define EP_ENDPOINT 0x02 118 + #define EP_INTERRUPT 0x03 119 119 120 120 /* Request codes */ 121 - #define RC_UNDEFINED 0x00 122 - #define SET_CUR 0x01 123 - #define GET_CUR 0x81 124 - #define GET_MIN 0x82 125 - #define GET_MAX 0x83 126 - #define GET_RES 0x84 127 - #define GET_LEN 0x85 128 - #define GET_INFO 0x86 129 - #define GET_DEF 0x87 121 + #define RC_UNDEFINED 0x00 122 + #define SET_CUR 0x01 123 + #define GET_CUR 0x81 124 + #define GET_MIN 0x82 125 + #define GET_MAX 0x83 126 + #define GET_RES 0x84 127 + #define GET_LEN 0x85 128 + #define GET_INFO 0x86 129 + #define GET_DEF 0x87 130 130 131 131 /* VideoControl interface controls */ 132 - #define VC_CONTROL_UNDEFINED 0x00 133 - #define VC_VIDEO_POWER_MODE_CONTROL 0x01 134 - #define VC_REQUEST_ERROR_CODE_CONTROL 0x02 132 + #define VC_CONTROL_UNDEFINED 0x00 133 + #define VC_VIDEO_POWER_MODE_CONTROL 0x01 134 + #define VC_REQUEST_ERROR_CODE_CONTROL 0x02 135 135 136 136 /* Terminal controls */ 137 - #define TE_CONTROL_UNDEFINED 0x00 137 + #define TE_CONTROL_UNDEFINED 0x00 138 138 139 139 /* Selector Unit controls */ 140 - #define SU_CONTROL_UNDEFINED 0x00 141 - #define SU_INPUT_SELECT_CONTROL 0x01 140 + #define SU_CONTROL_UNDEFINED 0x00 141 + #define SU_INPUT_SELECT_CONTROL 0x01 142 142 143 143 /* Camera Terminal controls */ 144 - #define CT_CONTROL_UNDEFINED 0x00 145 - #define CT_SCANNING_MODE_CONTROL 0x01 146 - #define CT_AE_MODE_CONTROL 0x02 147 - #define CT_AE_PRIORITY_CONTROL 0x03 148 - #define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 149 - #define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 150 - #define CT_FOCUS_ABSOLUTE_CONTROL 0x06 151 - #define CT_FOCUS_RELATIVE_CONTROL 0x07 152 - #define CT_FOCUS_AUTO_CONTROL 0x08 153 - #define CT_IRIS_ABSOLUTE_CONTROL 0x09 154 - #define CT_IRIS_RELATIVE_CONTROL 0x0a 155 - #define CT_ZOOM_ABSOLUTE_CONTROL 0x0b 156 - #define CT_ZOOM_RELATIVE_CONTROL 0x0c 157 - #define CT_PANTILT_ABSOLUTE_CONTROL 0x0d 158 - #define CT_PANTILT_RELATIVE_CONTROL 0x0e 159 - #define CT_ROLL_ABSOLUTE_CONTROL 0x0f 160 - #define CT_ROLL_RELATIVE_CONTROL 0x10 161 - #define CT_PRIVACY_CONTROL 0x11 144 + #define CT_CONTROL_UNDEFINED 0x00 145 + #define CT_SCANNING_MODE_CONTROL 0x01 146 + #define CT_AE_MODE_CONTROL 0x02 147 + #define CT_AE_PRIORITY_CONTROL 0x03 148 + #define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 149 + #define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 150 + #define CT_FOCUS_ABSOLUTE_CONTROL 0x06 151 + #define CT_FOCUS_RELATIVE_CONTROL 0x07 152 + #define CT_FOCUS_AUTO_CONTROL 0x08 153 + #define CT_IRIS_ABSOLUTE_CONTROL 0x09 154 + #define CT_IRIS_RELATIVE_CONTROL 0x0a 155 + #define CT_ZOOM_ABSOLUTE_CONTROL 0x0b 156 + #define CT_ZOOM_RELATIVE_CONTROL 0x0c 157 + #define CT_PANTILT_ABSOLUTE_CONTROL 0x0d 158 + #define CT_PANTILT_RELATIVE_CONTROL 0x0e 159 + #define CT_ROLL_ABSOLUTE_CONTROL 0x0f 160 + #define CT_ROLL_RELATIVE_CONTROL 0x10 161 + #define CT_PRIVACY_CONTROL 0x11 162 162 163 163 /* Processing Unit controls */ 164 - #define PU_CONTROL_UNDEFINED 0x00 165 - #define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 166 - #define PU_BRIGHTNESS_CONTROL 0x02 167 - #define PU_CONTRAST_CONTROL 0x03 168 - #define PU_GAIN_CONTROL 0x04 169 - #define PU_POWER_LINE_FREQUENCY_CONTROL 0x05 170 - #define PU_HUE_CONTROL 0x06 171 - #define PU_SATURATION_CONTROL 0x07 172 - #define PU_SHARPNESS_CONTROL 0x08 173 - #define PU_GAMMA_CONTROL 0x09 174 - #define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a 175 - #define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b 176 - #define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c 177 - #define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d 178 - #define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e 179 - #define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f 180 - #define PU_HUE_AUTO_CONTROL 0x10 181 - #define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 182 - #define PU_ANALOG_LOCK_STATUS_CONTROL 0x12 164 + #define PU_CONTROL_UNDEFINED 0x00 165 + #define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 166 + #define PU_BRIGHTNESS_CONTROL 0x02 167 + #define PU_CONTRAST_CONTROL 0x03 168 + #define PU_GAIN_CONTROL 0x04 169 + #define PU_POWER_LINE_FREQUENCY_CONTROL 0x05 170 + #define PU_HUE_CONTROL 0x06 171 + #define PU_SATURATION_CONTROL 0x07 172 + #define PU_SHARPNESS_CONTROL 0x08 173 + #define PU_GAMMA_CONTROL 0x09 174 + #define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a 175 + #define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b 176 + #define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c 177 + #define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d 178 + #define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e 179 + #define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f 180 + #define PU_HUE_AUTO_CONTROL 0x10 181 + #define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 182 + #define PU_ANALOG_LOCK_STATUS_CONTROL 0x12 183 183 184 184 #define LXU_MOTOR_PANTILT_RELATIVE_CONTROL 0x01 185 185 #define LXU_MOTOR_PANTILT_RESET_CONTROL 0x02 186 186 #define LXU_MOTOR_FOCUS_MOTOR_CONTROL 0x03 187 187 188 188 /* VideoStreaming interface controls */ 189 - #define VS_CONTROL_UNDEFINED 0x00 190 - #define VS_PROBE_CONTROL 0x01 191 - #define VS_COMMIT_CONTROL 0x02 192 - #define VS_STILL_PROBE_CONTROL 0x03 193 - #define VS_STILL_COMMIT_CONTROL 0x04 194 - #define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 195 - #define VS_STREAM_ERROR_CODE_CONTROL 0x06 196 - #define VS_GENERATE_KEY_FRAME_CONTROL 0x07 197 - #define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 198 - #define VS_SYNC_DELAY_CONTROL 0x09 189 + #define VS_CONTROL_UNDEFINED 0x00 190 + #define VS_PROBE_CONTROL 0x01 191 + #define VS_COMMIT_CONTROL 0x02 192 + #define VS_STILL_PROBE_CONTROL 0x03 193 + #define VS_STILL_COMMIT_CONTROL 0x04 194 + #define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 195 + #define VS_STREAM_ERROR_CODE_CONTROL 0x06 196 + #define VS_GENERATE_KEY_FRAME_CONTROL 0x07 197 + #define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 198 + #define VS_SYNC_DELAY_CONTROL 0x09 199 199 200 - #define TT_VENDOR_SPECIFIC 0x0100 201 - #define TT_STREAMING 0x0101 200 + #define TT_VENDOR_SPECIFIC 0x0100 201 + #define TT_STREAMING 0x0101 202 202 203 203 /* Input Terminal types */ 204 - #define ITT_VENDOR_SPECIFIC 0x0200 205 - #define ITT_CAMERA 0x0201 206 - #define ITT_MEDIA_TRANSPORT_INPUT 0x0202 204 + #define ITT_VENDOR_SPECIFIC 0x0200 205 + #define ITT_CAMERA 0x0201 206 + #define ITT_MEDIA_TRANSPORT_INPUT 0x0202 207 207 208 208 /* Output Terminal types */ 209 - #define OTT_VENDOR_SPECIFIC 0x0300 210 - #define OTT_DISPLAY 0x0301 211 - #define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 209 + #define OTT_VENDOR_SPECIFIC 0x0300 210 + #define OTT_DISPLAY 0x0301 211 + #define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 212 212 213 213 /* External Terminal types */ 214 - #define EXTERNAL_VENDOR_SPECIFIC 0x0400 215 - #define COMPOSITE_CONNECTOR 0x0401 216 - #define SVIDEO_CONNECTOR 0x0402 217 - #define COMPONENT_CONNECTOR 0x0403 214 + #define EXTERNAL_VENDOR_SPECIFIC 0x0400 215 + #define COMPOSITE_CONNECTOR 0x0401 216 + #define SVIDEO_CONNECTOR 0x0402 217 + #define COMPONENT_CONNECTOR 0x0403 218 218 219 219 #define UVC_TERM_INPUT 0x0000 220 220 #define UVC_TERM_OUTPUT 0x8000 ··· 541 541 }; 542 542 543 543 enum uvc_buffer_state { 544 - UVC_BUF_STATE_IDLE = 0, 545 - UVC_BUF_STATE_QUEUED = 1, 546 - UVC_BUF_STATE_ACTIVE = 2, 547 - UVC_BUF_STATE_DONE = 3, 548 - UVC_BUF_STATE_ERROR = 4, 544 + UVC_BUF_STATE_IDLE = 0, 545 + UVC_BUF_STATE_QUEUED = 1, 546 + UVC_BUF_STATE_ACTIVE = 2, 547 + UVC_BUF_STATE_DONE = 3, 548 + UVC_BUF_STATE_ERROR = 4, 549 549 }; 550 550 551 551 struct uvc_buffer {
+2 -2
drivers/media/video/v4l2-subdev.c
··· 28 28 { 29 29 switch (cmd) { 30 30 case VIDIOC_QUERYCTRL: 31 - return v4l2_subdev_call(sd, core, querymenu, arg); 31 + return v4l2_subdev_call(sd, core, queryctrl, arg); 32 32 case VIDIOC_G_CTRL: 33 33 return v4l2_subdev_call(sd, core, g_ctrl, arg); 34 34 case VIDIOC_S_CTRL: 35 35 return v4l2_subdev_call(sd, core, s_ctrl, arg); 36 36 case VIDIOC_QUERYMENU: 37 - return v4l2_subdev_call(sd, core, queryctrl, arg); 37 + return v4l2_subdev_call(sd, core, querymenu, arg); 38 38 case VIDIOC_LOG_STATUS: 39 39 return v4l2_subdev_call(sd, core, log_status); 40 40 case VIDIOC_DBG_G_CHIP_IDENT:
+2 -10
drivers/media/video/zoran/zoran.h
··· 349 349 u16 i2c_decoder, i2c_encoder; /* I2C types */ 350 350 u16 video_vfe, video_codec; /* videocodec types */ 351 351 u16 audio_chip; /* audio type */ 352 - u16 vendor_id, device_id; /* subsystem vendor/device ID */ 353 352 354 353 int inputs; /* number of video inputs */ 355 354 struct input { ··· 400 401 char name[32]; /* name of this device */ 401 402 struct pci_dev *pci_dev; /* PCI device */ 402 403 unsigned char revision; /* revision of zr36057 */ 403 - unsigned int zr36057_adr; /* bus address of IO mem returned by PCI BIOS */ 404 404 unsigned char __iomem *zr36057_mem;/* pointer to mapped IO memory */ 405 405 406 406 spinlock_t spinlock; /* Spinlock */ ··· 488 490 wait_queue_head_t test_q; 489 491 }; 490 492 491 - /*The following should be done in more portable way. It depends on define 492 - of _ALPHA_BUZ in the Makefile.*/ 493 - 494 - #ifdef _ALPHA_BUZ 495 - #define btwrite(dat,adr) writel((dat), zr->zr36057_adr+(adr)) 496 - #define btread(adr) readl(zr->zr36057_adr+(adr)) 497 - #else 493 + /* There was something called _ALPHA_BUZ that used the PCI address instead of 494 + * the kernel iomapped address for btread/btwrite. */ 498 495 #define btwrite(dat,adr) writel((dat), zr->zr36057_mem+(adr)) 499 496 #define btread(adr) readl(zr->zr36057_mem+(adr)) 500 - #endif 501 497 502 498 #define btand(dat,adr) btwrite((dat) & btread(adr), adr) 503 499 #define btor(dat,adr) btwrite((dat) | btread(adr), adr)
+317 -337
drivers/media/video/zoran/zoran_card.c
··· 61 61 62 62 extern const struct zoran_format zoran_formats[]; 63 63 64 - static int card[BUZ_MAX] = { -1, -1, -1, -1 }; 64 + static int card[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; 65 65 module_param_array(card, int, NULL, 0444); 66 - MODULE_PARM_DESC(card, "The type of card"); 66 + MODULE_PARM_DESC(card, "Card type"); 67 67 68 - static int encoder[BUZ_MAX] = { -1, -1, -1, -1 }; 68 + static int encoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; 69 69 module_param_array(encoder, int, NULL, 0444); 70 - MODULE_PARM_DESC(encoder, "i2c TV encoder"); 70 + MODULE_PARM_DESC(encoder, "Video encoder chip"); 71 71 72 - static int decoder[BUZ_MAX] = { -1, -1, -1, -1 }; 72 + static int decoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; 73 73 module_param_array(decoder, int, NULL, 0444); 74 - MODULE_PARM_DESC(decoder, "i2c TV decoder"); 74 + MODULE_PARM_DESC(decoder, "Video decoder chip"); 75 75 76 76 /* 77 77 The video mem address of the video card. ··· 104 104 MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); 105 105 106 106 /* /dev/videoN, -1 for autodetect */ 107 - static int video_nr[BUZ_MAX] = {-1, -1, -1, -1}; 107 + static int video_nr[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; 108 108 module_param_array(video_nr, int, NULL, 0444); 109 - MODULE_PARM_DESC(video_nr, "video device number (-1=Auto)"); 109 + MODULE_PARM_DESC(video_nr, "Video device number (-1=Auto)"); 110 110 111 111 /* 112 112 Number and size of grab buffers for Video 4 Linux ··· 153 153 MODULE_AUTHOR("Serguei Miridonov"); 154 154 MODULE_LICENSE("GPL"); 155 155 156 + #define ZR_DEVICE(subven, subdev, data) { \ 157 + .vendor = PCI_VENDOR_ID_ZORAN, .device = PCI_DEVICE_ID_ZORAN_36057, \ 158 + .subvendor = (subven), .subdevice = (subdev), .driver_data = (data) } 156 159 157 - int zoran_num; /* number of Buzs in use */ 158 - struct zoran *zoran[BUZ_MAX]; 160 + static struct pci_device_id zr36067_pci_tbl[] = { 161 + ZR_DEVICE(PCI_VENDOR_ID_MIRO, PCI_DEVICE_ID_MIRO_DC10PLUS, DC10plus), 162 + ZR_DEVICE(PCI_VENDOR_ID_MIRO, PCI_DEVICE_ID_MIRO_DC30PLUS, DC30plus), 163 + ZR_DEVICE(PCI_VENDOR_ID_ELECTRONICDESIGNGMBH, PCI_DEVICE_ID_LML_33R10, LML33R10), 164 + ZR_DEVICE(PCI_VENDOR_ID_IOMEGA, PCI_DEVICE_ID_IOMEGA_BUZ, BUZ), 165 + ZR_DEVICE(PCI_ANY_ID, PCI_ANY_ID, NUM_CARDS), 166 + {0} 167 + }; 168 + MODULE_DEVICE_TABLE(pci, zr36067_pci_tbl); 169 + 170 + static unsigned int zoran_num; /* number of cards found */ 159 171 160 172 /* videocodec bus functions ZR36060 */ 161 173 static u32 ··· 484 472 }, { 485 473 .type = DC10plus, 486 474 .name = "DC10plus", 487 - .vendor_id = PCI_VENDOR_ID_MIRO, 488 - .device_id = PCI_DEVICE_ID_MIRO_DC10PLUS, 489 475 .i2c_decoder = I2C_DRIVERID_SAA7110, 490 476 .i2c_encoder = I2C_DRIVERID_ADV7175, 491 477 .video_codec = CODEC_TYPE_ZR36060, ··· 541 531 }, { 542 532 .type = DC30plus, 543 533 .name = "DC30plus", 544 - .vendor_id = PCI_VENDOR_ID_MIRO, 545 - .device_id = PCI_DEVICE_ID_MIRO_DC30PLUS, 546 534 .i2c_decoder = I2C_DRIVERID_VPX3220, 547 535 .i2c_encoder = I2C_DRIVERID_ADV7175, 548 536 .video_codec = CODEC_TYPE_ZR36050, ··· 597 589 }, { 598 590 .type = LML33R10, 599 591 .name = "LML33R10", 600 - .vendor_id = PCI_VENDOR_ID_ELECTRONICDESIGNGMBH, 601 - .device_id = PCI_DEVICE_ID_LML_33R10, 602 592 .i2c_decoder = I2C_DRIVERID_SAA7114, 603 593 .i2c_encoder = I2C_DRIVERID_ADV7170, 604 594 .video_codec = CODEC_TYPE_ZR36060, ··· 624 618 }, { 625 619 .type = BUZ, 626 620 .name = "Buz", 627 - .vendor_id = PCI_VENDOR_ID_IOMEGA, 628 - .device_id = PCI_DEVICE_ID_IOMEGA_BUZ, 629 621 .i2c_decoder = I2C_DRIVERID_SAA7111A, 630 622 .i2c_encoder = I2C_DRIVERID_SAA7185B, 631 623 .video_codec = CODEC_TYPE_ZR36060, ··· 653 649 .name = "6-Eyes", 654 650 /* AverMedia chose not to brand the 6-Eyes. Thus it 655 651 can't be autodetected, and requires card=x. */ 656 - .vendor_id = -1, 657 - .device_id = -1, 658 652 .i2c_decoder = I2C_DRIVERID_KS0127, 659 653 .i2c_encoder = I2C_DRIVERID_BT866, 660 654 .video_codec = CODEC_TYPE_ZR36060, ··· 1140 1138 strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); 1141 1139 err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]); 1142 1140 if (err < 0) 1143 - goto exit_unregister; 1141 + goto exit_free; 1142 + video_set_drvdata(zr->video_dev, zr); 1144 1143 1145 1144 zoran_init_hardware(zr); 1146 1145 if (zr36067_debug > 2) ··· 1156 1153 zr->initialized = 1; 1157 1154 return 0; 1158 1155 1159 - exit_unregister: 1160 - zoran_unregister_i2c(zr); 1161 1156 exit_free: 1162 1157 kfree(zr->stat_com); 1163 1158 kfree(zr->video_dev); 1164 1159 return err; 1165 1160 } 1166 1161 1167 - static void 1168 - zoran_release (struct zoran *zr) 1162 + static void __devexit zoran_remove(struct pci_dev *pdev) 1169 1163 { 1164 + struct zoran *zr = pci_get_drvdata(pdev); 1165 + 1170 1166 if (!zr->initialized) 1171 1167 goto exit_free; 1168 + 1172 1169 /* unregister videocodec bus */ 1173 1170 if (zr->codec) { 1174 1171 struct videocodec_master *master = zr->codec->master_data; ··· 1197 1194 pci_disable_device(zr->pci_dev); 1198 1195 video_unregister_device(zr->video_dev); 1199 1196 exit_free: 1197 + pci_set_drvdata(pdev, NULL); 1200 1198 kfree(zr); 1201 1199 } 1202 1200 ··· 1260 1256 * Scan for a Buz card (actually for the PCI controller ZR36057), 1261 1257 * request the irq and map the io memory 1262 1258 */ 1263 - static int __devinit 1264 - find_zr36057 (void) 1259 + static int __devinit zoran_probe(struct pci_dev *pdev, 1260 + const struct pci_device_id *ent) 1265 1261 { 1266 1262 unsigned char latency, need_latency; 1267 1263 struct zoran *zr; 1268 - struct pci_dev *dev = NULL; 1269 1264 int result; 1270 1265 struct videocodec_master *master_vfe = NULL; 1271 1266 struct videocodec_master *master_codec = NULL; 1272 1267 int card_num; 1273 1268 char *i2c_enc_name, *i2c_dec_name, *codec_name, *vfe_name; 1269 + unsigned int nr; 1274 1270 1275 - zoran_num = 0; 1276 - while (zoran_num < BUZ_MAX && 1277 - (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { 1278 - card_num = card[zoran_num]; 1279 - zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); 1280 - if (!zr) { 1281 - dprintk(1, 1282 - KERN_ERR 1283 - "%s: find_zr36057() - kzalloc failed\n", 1284 - ZORAN_NAME); 1285 - continue; 1286 - } 1287 - zr->pci_dev = dev; 1288 - //zr->zr36057_mem = NULL; 1289 - zr->id = zoran_num; 1290 - snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); 1291 - spin_lock_init(&zr->spinlock); 1292 - mutex_init(&zr->resource_lock); 1293 - if (pci_enable_device(dev)) 1294 - goto zr_free_mem; 1295 - zr->zr36057_adr = pci_resource_start(zr->pci_dev, 0); 1296 - pci_read_config_byte(zr->pci_dev, PCI_CLASS_REVISION, 1297 - &zr->revision); 1271 + 1272 + nr = zoran_num++; 1273 + if (nr >= BUZ_MAX) { 1274 + dprintk(1, 1275 + KERN_ERR 1276 + "%s: driver limited to %d card(s) maximum\n", 1277 + ZORAN_NAME, BUZ_MAX); 1278 + return -ENOENT; 1279 + } 1280 + 1281 + zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); 1282 + if (!zr) { 1283 + dprintk(1, 1284 + KERN_ERR 1285 + "%s: find_zr36057() - kzalloc failed\n", 1286 + ZORAN_NAME); 1287 + return -ENOMEM; 1288 + } 1289 + zr->pci_dev = pdev; 1290 + zr->id = nr; 1291 + snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); 1292 + spin_lock_init(&zr->spinlock); 1293 + mutex_init(&zr->resource_lock); 1294 + if (pci_enable_device(pdev)) 1295 + goto zr_free_mem; 1296 + pci_read_config_byte(zr->pci_dev, PCI_CLASS_REVISION, &zr->revision); 1297 + 1298 + dprintk(1, 1299 + KERN_INFO 1300 + "%s: Zoran ZR360%c7 (rev %d), irq: %d, memory: 0x%08llx\n", 1301 + ZR_DEVNAME(zr), zr->revision < 2 ? '5' : '6', zr->revision, 1302 + zr->pci_dev->irq, (uint64_t)pci_resource_start(zr->pci_dev, 0)); 1303 + if (zr->revision >= 2) { 1304 + dprintk(1, 1305 + KERN_INFO 1306 + "%s: Subsystem vendor=0x%04x id=0x%04x\n", 1307 + ZR_DEVNAME(zr), zr->pci_dev->subsystem_vendor, 1308 + zr->pci_dev->subsystem_device); 1309 + } 1310 + 1311 + /* Use auto-detected card type? */ 1312 + if (card[nr] == -1) { 1298 1313 if (zr->revision < 2) { 1299 1314 dprintk(1, 1300 - KERN_INFO 1301 - "%s: Zoran ZR36057 (rev %d) irq: %d, memory: 0x%08x.\n", 1302 - ZR_DEVNAME(zr), zr->revision, zr->pci_dev->irq, 1303 - zr->zr36057_adr); 1304 - 1305 - if (card_num == -1) { 1306 - dprintk(1, 1307 - KERN_ERR 1308 - "%s: find_zr36057() - no card specified, please use the card=X insmod option\n", 1309 - ZR_DEVNAME(zr)); 1310 - goto zr_free_mem; 1311 - } 1312 - } else { 1313 - int i; 1314 - unsigned short ss_vendor, ss_device; 1315 - 1316 - ss_vendor = zr->pci_dev->subsystem_vendor; 1317 - ss_device = zr->pci_dev->subsystem_device; 1318 - dprintk(1, 1319 - KERN_INFO 1320 - "%s: Zoran ZR36067 (rev %d) irq: %d, memory: 0x%08x\n", 1321 - ZR_DEVNAME(zr), zr->revision, zr->pci_dev->irq, 1322 - zr->zr36057_adr); 1323 - dprintk(1, 1324 - KERN_INFO 1325 - "%s: subsystem vendor=0x%04x id=0x%04x\n", 1326 - ZR_DEVNAME(zr), ss_vendor, ss_device); 1327 - if (card_num == -1) { 1328 - dprintk(3, 1329 - KERN_DEBUG 1330 - "%s: find_zr36057() - trying to autodetect card type\n", 1331 - ZR_DEVNAME(zr)); 1332 - for (i=0;i<NUM_CARDS;i++) { 1333 - if (ss_vendor == zoran_cards[i].vendor_id && 1334 - ss_device == zoran_cards[i].device_id) { 1335 - dprintk(3, 1336 - KERN_DEBUG 1337 - "%s: find_zr36057() - card %s detected\n", 1338 - ZR_DEVNAME(zr), 1339 - zoran_cards[i].name); 1340 - card_num = i; 1341 - break; 1342 - } 1343 - } 1344 - if (i == NUM_CARDS) { 1345 - dprintk(1, 1346 - KERN_ERR 1347 - "%s: find_zr36057() - unknown card\n", 1348 - ZR_DEVNAME(zr)); 1349 - goto zr_free_mem; 1350 - } 1351 - } 1352 - } 1353 - 1354 - if (card_num < 0 || card_num >= NUM_CARDS) { 1355 - dprintk(2, 1356 1315 KERN_ERR 1357 - "%s: find_zr36057() - invalid cardnum %d\n", 1358 - ZR_DEVNAME(zr), card_num); 1359 - goto zr_free_mem; 1360 - } 1361 - 1362 - /* even though we make this a non pointer and thus 1363 - * theoretically allow for making changes to this struct 1364 - * on a per-individual card basis at runtime, this is 1365 - * strongly discouraged. This structure is intended to 1366 - * keep general card information, no settings or anything */ 1367 - zr->card = zoran_cards[card_num]; 1368 - snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), 1369 - "%s[%u]", zr->card.name, zr->id); 1370 - 1371 - zr->zr36057_mem = ioremap_nocache(zr->zr36057_adr, 0x1000); 1372 - if (!zr->zr36057_mem) { 1316 + "%s: No card type specified, please use the card=X module parameter\n", 1317 + ZR_DEVNAME(zr)); 1373 1318 dprintk(1, 1374 1319 KERN_ERR 1375 - "%s: find_zr36057() - ioremap failed\n", 1320 + "%s: It is not possible to auto-detect ZR36057 based cards\n", 1376 1321 ZR_DEVNAME(zr)); 1377 1322 goto zr_free_mem; 1378 1323 } 1379 1324 1380 - result = request_irq(zr->pci_dev->irq, 1381 - zoran_irq, 1382 - IRQF_SHARED | IRQF_DISABLED, 1383 - ZR_DEVNAME(zr), 1384 - (void *) zr); 1385 - if (result < 0) { 1386 - if (result == -EINVAL) { 1387 - dprintk(1, 1388 - KERN_ERR 1389 - "%s: find_zr36057() - bad irq number or handler\n", 1390 - ZR_DEVNAME(zr)); 1391 - } else if (result == -EBUSY) { 1392 - dprintk(1, 1393 - KERN_ERR 1394 - "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", 1395 - ZR_DEVNAME(zr), zr->pci_dev->irq); 1396 - } else { 1397 - dprintk(1, 1398 - KERN_ERR 1399 - "%s: find_zr36057() - can't assign irq, error code %d\n", 1400 - ZR_DEVNAME(zr), result); 1401 - } 1402 - goto zr_unmap; 1403 - } 1404 - 1405 - /* set PCI latency timer */ 1406 - pci_read_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, 1407 - &latency); 1408 - need_latency = zr->revision > 1 ? 32 : 48; 1409 - if (latency != need_latency) { 1410 - dprintk(2, 1411 - KERN_INFO 1412 - "%s: Changing PCI latency from %d to %d.\n", 1413 - ZR_DEVNAME(zr), latency, need_latency); 1414 - pci_write_config_byte(zr->pci_dev, 1415 - PCI_LATENCY_TIMER, 1416 - need_latency); 1417 - } 1418 - 1419 - zr36057_restart(zr); 1420 - /* i2c */ 1421 - dprintk(2, KERN_INFO "%s: Initializing i2c bus...\n", 1422 - ZR_DEVNAME(zr)); 1423 - 1424 - /* i2c decoder */ 1425 - if (decoder[zr->id] != -1) { 1426 - i2c_dec_name = i2cid_to_modulename(decoder[zr->id]); 1427 - zr->card.i2c_decoder = decoder[zr->id]; 1428 - } else if (zr->card.i2c_decoder != 0) { 1429 - i2c_dec_name = 1430 - i2cid_to_modulename(zr->card.i2c_decoder); 1431 - } else { 1432 - i2c_dec_name = NULL; 1433 - } 1434 - 1435 - if (i2c_dec_name) { 1436 - if ((result = request_module(i2c_dec_name)) < 0) { 1437 - dprintk(1, 1438 - KERN_ERR 1439 - "%s: failed to load module %s: %d\n", 1440 - ZR_DEVNAME(zr), i2c_dec_name, result); 1441 - } 1442 - } 1443 - 1444 - /* i2c encoder */ 1445 - if (encoder[zr->id] != -1) { 1446 - i2c_enc_name = i2cid_to_modulename(encoder[zr->id]); 1447 - zr->card.i2c_encoder = encoder[zr->id]; 1448 - } else if (zr->card.i2c_encoder != 0) { 1449 - i2c_enc_name = 1450 - i2cid_to_modulename(zr->card.i2c_encoder); 1451 - } else { 1452 - i2c_enc_name = NULL; 1453 - } 1454 - 1455 - if (i2c_enc_name) { 1456 - if ((result = request_module(i2c_enc_name)) < 0) { 1457 - dprintk(1, 1458 - KERN_ERR 1459 - "%s: failed to load module %s: %d\n", 1460 - ZR_DEVNAME(zr), i2c_enc_name, result); 1461 - } 1462 - } 1463 - 1464 - if (zoran_register_i2c(zr) < 0) { 1325 + card_num = ent->driver_data; 1326 + if (card_num >= NUM_CARDS) { 1465 1327 dprintk(1, 1466 1328 KERN_ERR 1467 - "%s: find_zr36057() - can't initialize i2c bus\n", 1329 + "%s: Unknown card, try specifying card=X module parameter\n", 1468 1330 ZR_DEVNAME(zr)); 1469 - goto zr_free_irq; 1331 + goto zr_free_mem; 1470 1332 } 1333 + dprintk(3, 1334 + KERN_DEBUG 1335 + "%s: %s() - card %s detected\n", 1336 + ZR_DEVNAME(zr), __func__, zoran_cards[card_num].name); 1337 + } else { 1338 + card_num = card[nr]; 1339 + if (card_num >= NUM_CARDS || card_num < 0) { 1340 + dprintk(1, 1341 + KERN_ERR 1342 + "%s: User specified card type %d out of range (0 .. %d)\n", 1343 + ZR_DEVNAME(zr), card_num, NUM_CARDS - 1); 1344 + goto zr_free_mem; 1345 + } 1346 + } 1471 1347 1348 + /* even though we make this a non pointer and thus 1349 + * theoretically allow for making changes to this struct 1350 + * on a per-individual card basis at runtime, this is 1351 + * strongly discouraged. This structure is intended to 1352 + * keep general card information, no settings or anything */ 1353 + zr->card = zoran_cards[card_num]; 1354 + snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), 1355 + "%s[%u]", zr->card.name, zr->id); 1356 + 1357 + zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0); 1358 + if (!zr->zr36057_mem) { 1359 + dprintk(1, 1360 + KERN_ERR 1361 + "%s: %s() - ioremap failed\n", 1362 + ZR_DEVNAME(zr), __func__); 1363 + goto zr_free_mem; 1364 + } 1365 + 1366 + result = request_irq(zr->pci_dev->irq, zoran_irq, 1367 + IRQF_SHARED | IRQF_DISABLED, ZR_DEVNAME(zr), zr); 1368 + if (result < 0) { 1369 + if (result == -EINVAL) { 1370 + dprintk(1, 1371 + KERN_ERR 1372 + "%s: find_zr36057() - bad irq number or handler\n", 1373 + ZR_DEVNAME(zr)); 1374 + } else if (result == -EBUSY) { 1375 + dprintk(1, 1376 + KERN_ERR 1377 + "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", 1378 + ZR_DEVNAME(zr), zr->pci_dev->irq); 1379 + } else { 1380 + dprintk(1, 1381 + KERN_ERR 1382 + "%s: find_zr36057() - can't assign irq, error code %d\n", 1383 + ZR_DEVNAME(zr), result); 1384 + } 1385 + goto zr_unmap; 1386 + } 1387 + 1388 + /* set PCI latency timer */ 1389 + pci_read_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, 1390 + &latency); 1391 + need_latency = zr->revision > 1 ? 32 : 48; 1392 + if (latency != need_latency) { 1472 1393 dprintk(2, 1473 - KERN_INFO "%s: Initializing videocodec bus...\n", 1474 - ZR_DEVNAME(zr)); 1394 + KERN_INFO 1395 + "%s: Changing PCI latency from %d to %d\n", 1396 + ZR_DEVNAME(zr), latency, need_latency); 1397 + pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, 1398 + need_latency); 1399 + } 1475 1400 1476 - if (zr->card.video_codec != 0 && 1477 - (codec_name = 1478 - codecid_to_modulename(zr->card.video_codec)) != NULL) { 1479 - if ((result = request_module(codec_name)) < 0) { 1401 + zr36057_restart(zr); 1402 + /* i2c */ 1403 + dprintk(2, KERN_INFO "%s: Initializing i2c bus...\n", 1404 + ZR_DEVNAME(zr)); 1405 + 1406 + /* i2c decoder */ 1407 + if (decoder[zr->id] != -1) { 1408 + i2c_dec_name = i2cid_to_modulename(decoder[zr->id]); 1409 + zr->card.i2c_decoder = decoder[zr->id]; 1410 + } else if (zr->card.i2c_decoder != 0) { 1411 + i2c_dec_name = i2cid_to_modulename(zr->card.i2c_decoder); 1412 + } else { 1413 + i2c_dec_name = NULL; 1414 + } 1415 + 1416 + if (i2c_dec_name) { 1417 + result = request_module(i2c_dec_name); 1418 + if (result < 0) { 1419 + dprintk(1, 1420 + KERN_ERR 1421 + "%s: failed to load module %s: %d\n", 1422 + ZR_DEVNAME(zr), i2c_dec_name, result); 1423 + } 1424 + } 1425 + 1426 + /* i2c encoder */ 1427 + if (encoder[zr->id] != -1) { 1428 + i2c_enc_name = i2cid_to_modulename(encoder[zr->id]); 1429 + zr->card.i2c_encoder = encoder[zr->id]; 1430 + } else if (zr->card.i2c_encoder != 0) { 1431 + i2c_enc_name = i2cid_to_modulename(zr->card.i2c_encoder); 1432 + } else { 1433 + i2c_enc_name = NULL; 1434 + } 1435 + 1436 + if (i2c_enc_name) { 1437 + result = request_module(i2c_enc_name); 1438 + if (result < 0) { 1439 + dprintk(1, 1440 + KERN_ERR 1441 + "%s: failed to load module %s: %d\n", 1442 + ZR_DEVNAME(zr), i2c_enc_name, result); 1443 + } 1444 + } 1445 + 1446 + if (zoran_register_i2c(zr) < 0) { 1447 + dprintk(1, 1448 + KERN_ERR 1449 + "%s: find_zr36057() - can't initialize i2c bus\n", 1450 + ZR_DEVNAME(zr)); 1451 + goto zr_free_irq; 1452 + } 1453 + 1454 + dprintk(2, 1455 + KERN_INFO "%s: Initializing videocodec bus...\n", 1456 + ZR_DEVNAME(zr)); 1457 + 1458 + if (zr->card.video_codec) { 1459 + codec_name = codecid_to_modulename(zr->card.video_codec); 1460 + if (codec_name) { 1461 + result = request_module(codec_name); 1462 + if (result) { 1480 1463 dprintk(1, 1481 1464 KERN_ERR 1482 1465 "%s: failed to load modules %s: %d\n", 1483 1466 ZR_DEVNAME(zr), codec_name, result); 1484 1467 } 1485 1468 } 1486 - if (zr->card.video_vfe != 0 && 1487 - (vfe_name = 1488 - codecid_to_modulename(zr->card.video_vfe)) != NULL) { 1489 - if ((result = request_module(vfe_name)) < 0) { 1469 + } 1470 + if (zr->card.video_vfe) { 1471 + vfe_name = codecid_to_modulename(zr->card.video_vfe); 1472 + if (vfe_name) { 1473 + result = request_module(vfe_name); 1474 + if (result < 0) { 1490 1475 dprintk(1, 1491 1476 KERN_ERR 1492 1477 "%s: failed to load modules %s: %d\n", 1493 1478 ZR_DEVNAME(zr), vfe_name, result); 1494 1479 } 1495 1480 } 1496 - 1497 - /* reset JPEG codec */ 1498 - jpeg_codec_sleep(zr, 1); 1499 - jpeg_codec_reset(zr); 1500 - /* video bus enabled */ 1501 - /* display codec revision */ 1502 - if (zr->card.video_codec != 0) { 1503 - master_codec = zoran_setup_videocodec(zr, 1504 - zr->card.video_codec); 1505 - if (!master_codec) 1506 - goto zr_unreg_i2c; 1507 - zr->codec = videocodec_attach(master_codec); 1508 - if (!zr->codec) { 1509 - dprintk(1, 1510 - KERN_ERR 1511 - "%s: find_zr36057() - no codec found\n", 1512 - ZR_DEVNAME(zr)); 1513 - goto zr_free_codec; 1514 - } 1515 - if (zr->codec->type != zr->card.video_codec) { 1516 - dprintk(1, 1517 - KERN_ERR 1518 - "%s: find_zr36057() - wrong codec\n", 1519 - ZR_DEVNAME(zr)); 1520 - goto zr_detach_codec; 1521 - } 1522 - } 1523 - if (zr->card.video_vfe != 0) { 1524 - master_vfe = zoran_setup_videocodec(zr, 1525 - zr->card.video_vfe); 1526 - if (!master_vfe) 1527 - goto zr_detach_codec; 1528 - zr->vfe = videocodec_attach(master_vfe); 1529 - if (!zr->vfe) { 1530 - dprintk(1, 1531 - KERN_ERR 1532 - "%s: find_zr36057() - no VFE found\n", 1533 - ZR_DEVNAME(zr)); 1534 - goto zr_free_vfe; 1535 - } 1536 - if (zr->vfe->type != zr->card.video_vfe) { 1537 - dprintk(1, 1538 - KERN_ERR 1539 - "%s: find_zr36057() = wrong VFE\n", 1540 - ZR_DEVNAME(zr)); 1541 - goto zr_detach_vfe; 1542 - } 1543 - } 1544 - /* Success so keep the pci_dev referenced */ 1545 - pci_dev_get(zr->pci_dev); 1546 - zoran[zoran_num++] = zr; 1547 - continue; 1548 - 1549 - // Init errors 1550 - zr_detach_vfe: 1551 - videocodec_detach(zr->vfe); 1552 - zr_free_vfe: 1553 - kfree(master_vfe); 1554 - zr_detach_codec: 1555 - videocodec_detach(zr->codec); 1556 - zr_free_codec: 1557 - kfree(master_codec); 1558 - zr_unreg_i2c: 1559 - zoran_unregister_i2c(zr); 1560 - zr_free_irq: 1561 - btwrite(0, ZR36057_SPGPPCR); 1562 - free_irq(zr->pci_dev->irq, zr); 1563 - zr_unmap: 1564 - iounmap(zr->zr36057_mem); 1565 - zr_free_mem: 1566 - kfree(zr); 1567 - continue; 1568 1481 } 1569 - if (dev) /* Clean up ref count on early exit */ 1570 - pci_dev_put(dev); 1571 1482 1572 - if (zoran_num == 0) { 1573 - dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); 1483 + /* reset JPEG codec */ 1484 + jpeg_codec_sleep(zr, 1); 1485 + jpeg_codec_reset(zr); 1486 + /* video bus enabled */ 1487 + /* display codec revision */ 1488 + if (zr->card.video_codec != 0) { 1489 + master_codec = zoran_setup_videocodec(zr, zr->card.video_codec); 1490 + if (!master_codec) 1491 + goto zr_unreg_i2c; 1492 + zr->codec = videocodec_attach(master_codec); 1493 + if (!zr->codec) { 1494 + dprintk(1, 1495 + KERN_ERR 1496 + "%s: find_zr36057() - no codec found\n", 1497 + ZR_DEVNAME(zr)); 1498 + goto zr_free_codec; 1499 + } 1500 + if (zr->codec->type != zr->card.video_codec) { 1501 + dprintk(1, 1502 + KERN_ERR 1503 + "%s: find_zr36057() - wrong codec\n", 1504 + ZR_DEVNAME(zr)); 1505 + goto zr_detach_codec; 1506 + } 1574 1507 } 1575 - return zoran_num; 1508 + if (zr->card.video_vfe != 0) { 1509 + master_vfe = zoran_setup_videocodec(zr, zr->card.video_vfe); 1510 + if (!master_vfe) 1511 + goto zr_detach_codec; 1512 + zr->vfe = videocodec_attach(master_vfe); 1513 + if (!zr->vfe) { 1514 + dprintk(1, 1515 + KERN_ERR 1516 + "%s: find_zr36057() - no VFE found\n", 1517 + ZR_DEVNAME(zr)); 1518 + goto zr_free_vfe; 1519 + } 1520 + if (zr->vfe->type != zr->card.video_vfe) { 1521 + dprintk(1, 1522 + KERN_ERR 1523 + "%s: find_zr36057() = wrong VFE\n", 1524 + ZR_DEVNAME(zr)); 1525 + goto zr_detach_vfe; 1526 + } 1527 + } 1528 + 1529 + /* take care of Natoma chipset and a revision 1 zr36057 */ 1530 + if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { 1531 + zr->jpg_buffers.need_contiguous = 1; 1532 + dprintk(1, 1533 + KERN_INFO 1534 + "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", 1535 + ZR_DEVNAME(zr)); 1536 + } 1537 + 1538 + if (zr36057_init(zr) < 0) 1539 + goto zr_detach_vfe; 1540 + 1541 + zoran_proc_init(zr); 1542 + 1543 + pci_set_drvdata(pdev, zr); 1544 + 1545 + return 0; 1546 + 1547 + zr_detach_vfe: 1548 + videocodec_detach(zr->vfe); 1549 + zr_free_vfe: 1550 + kfree(master_vfe); 1551 + zr_detach_codec: 1552 + videocodec_detach(zr->codec); 1553 + zr_free_codec: 1554 + kfree(master_codec); 1555 + zr_unreg_i2c: 1556 + zoran_unregister_i2c(zr); 1557 + zr_free_irq: 1558 + btwrite(0, ZR36057_SPGPPCR); 1559 + free_irq(zr->pci_dev->irq, zr); 1560 + zr_unmap: 1561 + iounmap(zr->zr36057_mem); 1562 + zr_free_mem: 1563 + kfree(zr); 1564 + 1565 + return -ENODEV; 1576 1566 } 1577 1567 1578 - static int __init 1579 - init_dc10_cards (void) 1580 - { 1581 - int i; 1568 + static struct pci_driver zoran_driver = { 1569 + .name = "zr36067", 1570 + .id_table = zr36067_pci_tbl, 1571 + .probe = zoran_probe, 1572 + .remove = zoran_remove, 1573 + }; 1582 1574 1583 - memset(zoran, 0, sizeof(zoran)); 1575 + static int __init zoran_init(void) 1576 + { 1577 + int res; 1578 + 1584 1579 printk(KERN_INFO "Zoran MJPEG board driver version %d.%d.%d\n", 1585 1580 MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION); 1586 1581 1587 - /* Look for cards */ 1588 - if (find_zr36057() < 0) { 1589 - return -EIO; 1590 - } 1591 - if (zoran_num == 0) 1592 - return -ENODEV; 1593 - dprintk(1, KERN_INFO "%s: %d card(s) found\n", ZORAN_NAME, 1594 - zoran_num); 1595 1582 /* check the parameters we have been given, adjust if necessary */ 1596 1583 if (v4l_nbufs < 2) 1597 1584 v4l_nbufs = 2; ··· 1624 1629 ZORAN_NAME); 1625 1630 } 1626 1631 1627 - /* take care of Natoma chipset and a revision 1 zr36057 */ 1628 - for (i = 0; i < zoran_num; i++) { 1629 - struct zoran *zr = zoran[i]; 1630 - 1631 - if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { 1632 - zr->jpg_buffers.need_contiguous = 1; 1633 - dprintk(1, 1634 - KERN_INFO 1635 - "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", 1636 - ZR_DEVNAME(zr)); 1637 - } 1638 - 1639 - if (zr36057_init(zr) < 0) { 1640 - for (i = 0; i < zoran_num; i++) 1641 - zoran_release(zoran[i]); 1642 - return -EIO; 1643 - } 1644 - zoran_proc_init(zr); 1632 + res = pci_register_driver(&zoran_driver); 1633 + if (res) { 1634 + dprintk(1, 1635 + KERN_ERR 1636 + "%s: Unable to register ZR36057 driver\n", 1637 + ZORAN_NAME); 1638 + return res; 1645 1639 } 1646 1640 1647 1641 return 0; 1648 1642 } 1649 1643 1650 - static void __exit 1651 - unload_dc10_cards (void) 1644 + static void __exit zoran_exit(void) 1652 1645 { 1653 - int i; 1654 - 1655 - for (i = 0; i < zoran_num; i++) 1656 - zoran_release(zoran[i]); 1646 + pci_unregister_driver(&zoran_driver); 1657 1647 } 1658 1648 1659 - module_init(init_dc10_cards); 1660 - module_exit(unload_dc10_cards); 1649 + module_init(zoran_init); 1650 + module_exit(zoran_exit);
-2
drivers/media/video/zoran/zoran_card.h
··· 40 40 41 41 /* Anybody who uses more than four? */ 42 42 #define BUZ_MAX 4 43 - extern int zoran_num; 44 - extern struct zoran *zoran[BUZ_MAX]; 45 43 46 44 extern struct video_device zoran_template; 47 45
+35 -70
drivers/media/video/zoran/zoran_driver.c
··· 1196 1196 * Open a zoran card. Right now the flags stuff is just playing 1197 1197 */ 1198 1198 1199 - static int 1200 - zoran_open(struct file *file) 1199 + static int zoran_open(struct file *file) 1201 1200 { 1202 - unsigned int minor = video_devdata(file)->minor; 1203 - struct zoran *zr = NULL; 1201 + struct zoran *zr = video_drvdata(file); 1204 1202 struct zoran_fh *fh; 1205 - int i, res, first_open = 0, have_module_locks = 0; 1203 + int res, first_open = 0; 1204 + 1205 + dprintk(2, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", 1206 + ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user + 1); 1206 1207 1207 1208 lock_kernel(); 1208 - /* find the device */ 1209 - for (i = 0; i < zoran_num; i++) { 1210 - if (zoran[i]->video_dev->minor == minor) { 1211 - zr = zoran[i]; 1212 - break; 1213 - } 1214 - } 1215 - 1216 - if (!zr) { 1217 - dprintk(1, KERN_ERR "%s: device not found!\n", ZORAN_NAME); 1218 - res = -ENODEV; 1219 - goto open_unlock_and_return; 1220 - } 1221 1209 1222 1210 /* see fs/device.c - the kernel already locks during open(), 1223 1211 * so locking ourselves only causes deadlocks */ 1224 1212 /*mutex_lock(&zr->resource_lock);*/ 1213 + 1214 + if (zr->user >= 2048) { 1215 + dprintk(1, KERN_ERR "%s: too many users (%d) on device\n", 1216 + ZR_DEVNAME(zr), zr->user); 1217 + res = -EBUSY; 1218 + goto fail_unlock; 1219 + } 1225 1220 1226 1221 if (!zr->decoder) { 1227 1222 dprintk(1, 1228 1223 KERN_ERR "%s: no TV decoder loaded for device!\n", 1229 1224 ZR_DEVNAME(zr)); 1230 1225 res = -EIO; 1231 - goto open_unlock_and_return; 1226 + goto fail_unlock; 1232 1227 } 1233 1228 1234 - /* try to grab a module lock */ 1235 - if (!try_module_get(THIS_MODULE)) { 1236 - dprintk(1, 1237 - KERN_ERR 1238 - "%s: failed to acquire my own lock! PANIC!\n", 1239 - ZR_DEVNAME(zr)); 1240 - res = -ENODEV; 1241 - goto open_unlock_and_return; 1242 - } 1243 1229 if (!try_module_get(zr->decoder->driver->driver.owner)) { 1244 1230 dprintk(1, 1245 1231 KERN_ERR 1246 - "%s: failed to grab ownership of i2c decoder\n", 1232 + "%s: failed to grab ownership of video decoder\n", 1247 1233 ZR_DEVNAME(zr)); 1248 1234 res = -EIO; 1249 - module_put(THIS_MODULE); 1250 - goto open_unlock_and_return; 1235 + goto fail_unlock; 1251 1236 } 1252 1237 if (zr->encoder && 1253 1238 !try_module_get(zr->encoder->driver->driver.owner)) { 1254 1239 dprintk(1, 1255 1240 KERN_ERR 1256 - "%s: failed to grab ownership of i2c encoder\n", 1241 + "%s: failed to grab ownership of video encoder\n", 1257 1242 ZR_DEVNAME(zr)); 1258 1243 res = -EIO; 1259 - module_put(zr->decoder->driver->driver.owner); 1260 - module_put(THIS_MODULE); 1261 - goto open_unlock_and_return; 1244 + goto fail_decoder; 1262 1245 } 1263 - 1264 - have_module_locks = 1; 1265 - 1266 - if (zr->user >= 2048) { 1267 - dprintk(1, KERN_ERR "%s: too many users (%d) on device\n", 1268 - ZR_DEVNAME(zr), zr->user); 1269 - res = -EBUSY; 1270 - goto open_unlock_and_return; 1271 - } 1272 - 1273 - dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", 1274 - ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); 1275 1246 1276 1247 /* now, create the open()-specific file_ops struct */ 1277 1248 fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); ··· 1252 1281 "%s: zoran_open() - allocation of zoran_fh failed\n", 1253 1282 ZR_DEVNAME(zr)); 1254 1283 res = -ENOMEM; 1255 - goto open_unlock_and_return; 1284 + goto fail_encoder; 1256 1285 } 1257 1286 /* used to be BUZ_MAX_WIDTH/HEIGHT, but that gives overflows 1258 1287 * on norm-change! */ ··· 1263 1292 KERN_ERR 1264 1293 "%s: zoran_open() - allocation of overlay_mask failed\n", 1265 1294 ZR_DEVNAME(zr)); 1266 - kfree(fh); 1267 1295 res = -ENOMEM; 1268 - goto open_unlock_and_return; 1296 + goto fail_fh; 1269 1297 } 1270 1298 1271 1299 if (zr->user++ == 0) ··· 1289 1319 1290 1320 return 0; 1291 1321 1292 - open_unlock_and_return: 1293 - /* if we grabbed locks, release them accordingly */ 1294 - if (have_module_locks) { 1295 - module_put(zr->decoder->driver->driver.owner); 1296 - if (zr->encoder) { 1297 - module_put(zr->encoder->driver->driver.owner); 1298 - } 1299 - module_put(THIS_MODULE); 1300 - } 1301 - 1302 - /* if there's no device found, we didn't obtain the lock either */ 1303 - if (zr) { 1304 - /*mutex_unlock(&zr->resource_lock);*/ 1305 - } 1322 + fail_fh: 1323 + kfree(fh); 1324 + fail_encoder: 1325 + if (zr->encoder) 1326 + module_put(zr->encoder->driver->driver.owner); 1327 + fail_decoder: 1328 + module_put(zr->decoder->driver->driver.owner); 1329 + fail_unlock: 1306 1330 unlock_kernel(); 1331 + 1332 + dprintk(2, KERN_INFO "%s: open failed (%d), users(-)=%d\n", 1333 + ZR_DEVNAME(zr), res, zr->user); 1307 1334 1308 1335 return res; 1309 1336 } ··· 1311 1344 struct zoran_fh *fh = file->private_data; 1312 1345 struct zoran *zr = fh->zr; 1313 1346 1314 - dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", 1315 - ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); 1347 + dprintk(2, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", 1348 + ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user - 1); 1316 1349 1317 1350 /* kernel locks (fs/device.c), so don't do that ourselves 1318 1351 * (prevents deadlocks) */ ··· 1358 1391 1359 1392 /* release locks on the i2c modules */ 1360 1393 module_put(zr->decoder->driver->driver.owner); 1361 - if (zr->encoder) { 1362 - module_put(zr->encoder->driver->driver.owner); 1363 - } 1364 - module_put(THIS_MODULE); 1394 + if (zr->encoder) 1395 + module_put(zr->encoder->driver->driver.owner); 1365 1396 1366 1397 /*mutex_unlock(&zr->resource_lock);*/ 1367 1398
+10
drivers/mmc/host/Kconfig
··· 145 145 146 146 If unsure, say N. 147 147 148 + config MMC_MXC 149 + tristate "Freescale i.MX2/3 Multimedia Card Interface support" 150 + depends on ARCH_MXC 151 + help 152 + This selects the Freescale i.MX2/3 Multimedia card Interface. 153 + If you have a i.MX platform with a Multimedia Card slot, 154 + say Y or M here. 155 + 156 + If unsure, say N. 157 + 148 158 config MMC_TIFM_SD 149 159 tristate "TI Flash Media MMC/SD Interface support (EXPERIMENTAL)" 150 160 depends on EXPERIMENTAL && PCI
+1
drivers/mmc/host/Makefile
··· 9 9 obj-$(CONFIG_MMC_ARMMMCI) += mmci.o 10 10 obj-$(CONFIG_MMC_PXA) += pxamci.o 11 11 obj-$(CONFIG_MMC_IMX) += imxmmc.o 12 + obj-$(CONFIG_MMC_MXC) += mxcmmc.o 12 13 obj-$(CONFIG_MMC_SDHCI) += sdhci.o 13 14 obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o 14 15 obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
+33 -4
drivers/mmc/host/mmci.c
··· 430 430 clk = 255; 431 431 host->cclk = host->mclk / (2 * (clk + 1)); 432 432 } 433 + if (host->hw_designer == 0x80) 434 + clk |= MCI_FCEN; /* Bug fix in ST IP block */ 433 435 clk |= MCI_CLK_ENABLE; 434 436 } 435 437 ··· 442 440 case MMC_POWER_OFF: 443 441 break; 444 442 case MMC_POWER_UP: 445 - pwr |= MCI_PWR_UP; 446 - break; 443 + /* The ST version does not have this, fall through to POWER_ON */ 444 + if (host->hw_designer != 0x80) { 445 + pwr |= MCI_PWR_UP; 446 + break; 447 + } 447 448 case MMC_POWER_ON: 448 449 pwr |= MCI_PWR_ON; 449 450 break; 450 451 } 451 452 452 - if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) 453 - pwr |= MCI_ROD; 453 + if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { 454 + if (host->hw_designer != 0x80) 455 + pwr |= MCI_ROD; 456 + else { 457 + /* 458 + * The ST Micro variant use the ROD bit for something 459 + * else and only has OD (Open Drain). 460 + */ 461 + pwr |= MCI_OD; 462 + } 463 + } 454 464 455 465 writel(clk, host->base + MMCICLOCK); 456 466 ··· 514 500 } 515 501 516 502 host = mmc_priv(mmc); 503 + /* Bits 12 thru 19 is the designer */ 504 + host->hw_designer = (dev->periphid >> 12) & 0xff; 505 + /* Bits 20 thru 23 is the revison */ 506 + host->hw_revision = (dev->periphid >> 20) & 0xf; 507 + DBG(host, "designer ID = 0x%02x\n", host->hw_designer); 508 + DBG(host, "revision = 0x%01x\n", host->hw_revision); 517 509 host->clk = clk_get(&dev->dev, NULL); 518 510 if (IS_ERR(host->clk)) { 519 511 ret = PTR_ERR(host->clk); ··· 712 692 { 713 693 .id = 0x00041181, 714 694 .mask = 0x000fffff, 695 + }, 696 + /* ST Micro variants */ 697 + { 698 + .id = 0x00180180, 699 + .mask = 0x00ffffff, 700 + }, 701 + { 702 + .id = 0x00280180, 703 + .mask = 0x00ffffff, 715 704 }, 716 705 { 0, 0 }, 717 706 };
+28
drivers/mmc/host/mmci.h
··· 11 11 #define MCI_PWR_OFF 0x00 12 12 #define MCI_PWR_UP 0x02 13 13 #define MCI_PWR_ON 0x03 14 + #define MCI_DATA2DIREN (1 << 2) 15 + #define MCI_CMDDIREN (1 << 3) 16 + #define MCI_DATA0DIREN (1 << 4) 17 + #define MCI_DATA31DIREN (1 << 5) 14 18 #define MCI_OD (1 << 6) 15 19 #define MCI_ROD (1 << 7) 20 + /* The ST Micro version does not have ROD */ 21 + #define MCI_FBCLKEN (1 << 7) 22 + #define MCI_DATA74DIREN (1 << 8) 16 23 17 24 #define MMCICLOCK 0x004 18 25 #define MCI_CLK_ENABLE (1 << 8) 19 26 #define MCI_CLK_PWRSAVE (1 << 9) 20 27 #define MCI_CLK_BYPASS (1 << 10) 28 + #define MCI_WIDE_BUS (1 << 11) 29 + /* HW flow control on the ST Micro version */ 30 + #define MCI_FCEN (1 << 13) 21 31 22 32 #define MMCIARGUMENT 0x008 23 33 #define MMCICOMMAND 0x00c ··· 36 26 #define MCI_CPSM_INTERRUPT (1 << 8) 37 27 #define MCI_CPSM_PENDING (1 << 9) 38 28 #define MCI_CPSM_ENABLE (1 << 10) 29 + #define MCI_SDIO_SUSP (1 << 11) 30 + #define MCI_ENCMD_COMPL (1 << 12) 31 + #define MCI_NIEN (1 << 13) 32 + #define MCI_CE_ATACMD (1 << 14) 39 33 40 34 #define MMCIRESPCMD 0x010 41 35 #define MMCIRESPONSE0 0x014 ··· 53 39 #define MCI_DPSM_DIRECTION (1 << 1) 54 40 #define MCI_DPSM_MODE (1 << 2) 55 41 #define MCI_DPSM_DMAENABLE (1 << 3) 42 + #define MCI_DPSM_BLOCKSIZE (1 << 4) 43 + #define MCI_DPSM_RWSTART (1 << 8) 44 + #define MCI_DPSM_RWSTOP (1 << 9) 45 + #define MCI_DPSM_RWMOD (1 << 10) 46 + #define MCI_DPSM_SDIOEN (1 << 11) 56 47 57 48 #define MMCIDATACNT 0x030 58 49 #define MMCISTATUS 0x034 ··· 82 63 #define MCI_RXFIFOEMPTY (1 << 19) 83 64 #define MCI_TXDATAAVLBL (1 << 20) 84 65 #define MCI_RXDATAAVLBL (1 << 21) 66 + #define MCI_SDIOIT (1 << 22) 67 + #define MCI_CEATAEND (1 << 23) 85 68 86 69 #define MMCICLEAR 0x038 87 70 #define MCI_CMDCRCFAILCLR (1 << 0) ··· 96 75 #define MCI_CMDSENTCLR (1 << 7) 97 76 #define MCI_DATAENDCLR (1 << 8) 98 77 #define MCI_DATABLOCKENDCLR (1 << 10) 78 + #define MCI_SDIOITC (1 << 22) 79 + #define MCI_CEATAENDC (1 << 23) 99 80 100 81 #define MMCIMASK0 0x03c 101 82 #define MCI_CMDCRCFAILMASK (1 << 0) ··· 121 98 #define MCI_RXFIFOEMPTYMASK (1 << 19) 122 99 #define MCI_TXDATAAVLBLMASK (1 << 20) 123 100 #define MCI_RXDATAAVLBLMASK (1 << 21) 101 + #define MCI_SDIOITMASK (1 << 22) 102 + #define MCI_CEATAENDMASK (1 << 23) 124 103 125 104 #define MMCIMASK1 0x040 126 105 #define MMCIFIFOCNT 0x048 ··· 160 135 unsigned int cclk; 161 136 u32 pwr; 162 137 struct mmc_platform_data *plat; 138 + 139 + u8 hw_designer; 140 + u8 hw_revision:4; 163 141 164 142 struct timer_list timer; 165 143 unsigned int oldstat;
+880
drivers/mmc/host/mxcmmc.c
··· 1 + /* 2 + * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver 3 + * 4 + * This is a driver for the SDHC controller found in Freescale MX2/MX3 5 + * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c). 6 + * Unlike the hardware found on MX1, this hardware just works and does 7 + * not need all the quirks found in imxmmc.c, hence the seperate driver. 8 + * 9 + * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> 10 + * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com> 11 + * 12 + * derived from pxamci.c by Russell King 13 + * 14 + * This program is free software; you can redistribute it and/or modify 15 + * it under the terms of the GNU General Public License version 2 as 16 + * published by the Free Software Foundation. 17 + * 18 + */ 19 + 20 + #include <linux/module.h> 21 + #include <linux/init.h> 22 + #include <linux/ioport.h> 23 + #include <linux/platform_device.h> 24 + #include <linux/interrupt.h> 25 + #include <linux/irq.h> 26 + #include <linux/blkdev.h> 27 + #include <linux/dma-mapping.h> 28 + #include <linux/mmc/host.h> 29 + #include <linux/mmc/card.h> 30 + #include <linux/delay.h> 31 + #include <linux/clk.h> 32 + #include <linux/io.h> 33 + #include <linux/gpio.h> 34 + 35 + #include <asm/dma.h> 36 + #include <asm/irq.h> 37 + #include <asm/sizes.h> 38 + #include <mach/mmc.h> 39 + 40 + #ifdef CONFIG_ARCH_MX2 41 + #include <mach/dma-mx1-mx2.h> 42 + #define HAS_DMA 43 + #endif 44 + 45 + #define DRIVER_NAME "imx-mmc" 46 + 47 + #define MMC_REG_STR_STP_CLK 0x00 48 + #define MMC_REG_STATUS 0x04 49 + #define MMC_REG_CLK_RATE 0x08 50 + #define MMC_REG_CMD_DAT_CONT 0x0C 51 + #define MMC_REG_RES_TO 0x10 52 + #define MMC_REG_READ_TO 0x14 53 + #define MMC_REG_BLK_LEN 0x18 54 + #define MMC_REG_NOB 0x1C 55 + #define MMC_REG_REV_NO 0x20 56 + #define MMC_REG_INT_CNTR 0x24 57 + #define MMC_REG_CMD 0x28 58 + #define MMC_REG_ARG 0x2C 59 + #define MMC_REG_RES_FIFO 0x34 60 + #define MMC_REG_BUFFER_ACCESS 0x38 61 + 62 + #define STR_STP_CLK_RESET (1 << 3) 63 + #define STR_STP_CLK_START_CLK (1 << 1) 64 + #define STR_STP_CLK_STOP_CLK (1 << 0) 65 + 66 + #define STATUS_CARD_INSERTION (1 << 31) 67 + #define STATUS_CARD_REMOVAL (1 << 30) 68 + #define STATUS_YBUF_EMPTY (1 << 29) 69 + #define STATUS_XBUF_EMPTY (1 << 28) 70 + #define STATUS_YBUF_FULL (1 << 27) 71 + #define STATUS_XBUF_FULL (1 << 26) 72 + #define STATUS_BUF_UND_RUN (1 << 25) 73 + #define STATUS_BUF_OVFL (1 << 24) 74 + #define STATUS_SDIO_INT_ACTIVE (1 << 14) 75 + #define STATUS_END_CMD_RESP (1 << 13) 76 + #define STATUS_WRITE_OP_DONE (1 << 12) 77 + #define STATUS_DATA_TRANS_DONE (1 << 11) 78 + #define STATUS_READ_OP_DONE (1 << 11) 79 + #define STATUS_WR_CRC_ERROR_CODE_MASK (3 << 10) 80 + #define STATUS_CARD_BUS_CLK_RUN (1 << 8) 81 + #define STATUS_BUF_READ_RDY (1 << 7) 82 + #define STATUS_BUF_WRITE_RDY (1 << 6) 83 + #define STATUS_RESP_CRC_ERR (1 << 5) 84 + #define STATUS_CRC_READ_ERR (1 << 3) 85 + #define STATUS_CRC_WRITE_ERR (1 << 2) 86 + #define STATUS_TIME_OUT_RESP (1 << 1) 87 + #define STATUS_TIME_OUT_READ (1 << 0) 88 + #define STATUS_ERR_MASK 0x2f 89 + 90 + #define CMD_DAT_CONT_CMD_RESP_LONG_OFF (1 << 12) 91 + #define CMD_DAT_CONT_STOP_READWAIT (1 << 11) 92 + #define CMD_DAT_CONT_START_READWAIT (1 << 10) 93 + #define CMD_DAT_CONT_BUS_WIDTH_4 (2 << 8) 94 + #define CMD_DAT_CONT_INIT (1 << 7) 95 + #define CMD_DAT_CONT_WRITE (1 << 4) 96 + #define CMD_DAT_CONT_DATA_ENABLE (1 << 3) 97 + #define CMD_DAT_CONT_RESPONSE_48BIT_CRC (1 << 0) 98 + #define CMD_DAT_CONT_RESPONSE_136BIT (2 << 0) 99 + #define CMD_DAT_CONT_RESPONSE_48BIT (3 << 0) 100 + 101 + #define INT_SDIO_INT_WKP_EN (1 << 18) 102 + #define INT_CARD_INSERTION_WKP_EN (1 << 17) 103 + #define INT_CARD_REMOVAL_WKP_EN (1 << 16) 104 + #define INT_CARD_INSERTION_EN (1 << 15) 105 + #define INT_CARD_REMOVAL_EN (1 << 14) 106 + #define INT_SDIO_IRQ_EN (1 << 13) 107 + #define INT_DAT0_EN (1 << 12) 108 + #define INT_BUF_READ_EN (1 << 4) 109 + #define INT_BUF_WRITE_EN (1 << 3) 110 + #define INT_END_CMD_RES_EN (1 << 2) 111 + #define INT_WRITE_OP_DONE_EN (1 << 1) 112 + #define INT_READ_OP_EN (1 << 0) 113 + 114 + struct mxcmci_host { 115 + struct mmc_host *mmc; 116 + struct resource *res; 117 + void __iomem *base; 118 + int irq; 119 + int detect_irq; 120 + int dma; 121 + int do_dma; 122 + unsigned int power_mode; 123 + struct imxmmc_platform_data *pdata; 124 + 125 + struct mmc_request *req; 126 + struct mmc_command *cmd; 127 + struct mmc_data *data; 128 + 129 + unsigned int dma_nents; 130 + unsigned int datasize; 131 + unsigned int dma_dir; 132 + 133 + u16 rev_no; 134 + unsigned int cmdat; 135 + 136 + struct clk *clk; 137 + 138 + int clock; 139 + 140 + struct work_struct datawork; 141 + }; 142 + 143 + static inline int mxcmci_use_dma(struct mxcmci_host *host) 144 + { 145 + return host->do_dma; 146 + } 147 + 148 + static void mxcmci_softreset(struct mxcmci_host *host) 149 + { 150 + int i; 151 + 152 + /* reset sequence */ 153 + writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK); 154 + writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK, 155 + host->base + MMC_REG_STR_STP_CLK); 156 + 157 + for (i = 0; i < 8; i++) 158 + writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); 159 + 160 + writew(0xff, host->base + MMC_REG_RES_TO); 161 + } 162 + 163 + static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data) 164 + { 165 + unsigned int nob = data->blocks; 166 + unsigned int blksz = data->blksz; 167 + unsigned int datasize = nob * blksz; 168 + #ifdef HAS_DMA 169 + struct scatterlist *sg; 170 + int i; 171 + #endif 172 + if (data->flags & MMC_DATA_STREAM) 173 + nob = 0xffff; 174 + 175 + host->data = data; 176 + data->bytes_xfered = 0; 177 + 178 + writew(nob, host->base + MMC_REG_NOB); 179 + writew(blksz, host->base + MMC_REG_BLK_LEN); 180 + host->datasize = datasize; 181 + 182 + #ifdef HAS_DMA 183 + for_each_sg(data->sg, sg, data->sg_len, i) { 184 + if (sg->offset & 3 || sg->length & 3) { 185 + host->do_dma = 0; 186 + return; 187 + } 188 + } 189 + 190 + if (data->flags & MMC_DATA_READ) { 191 + host->dma_dir = DMA_FROM_DEVICE; 192 + host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, 193 + data->sg_len, host->dma_dir); 194 + 195 + imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize, 196 + host->res->start + MMC_REG_BUFFER_ACCESS, 197 + DMA_MODE_READ); 198 + } else { 199 + host->dma_dir = DMA_TO_DEVICE; 200 + host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, 201 + data->sg_len, host->dma_dir); 202 + 203 + imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize, 204 + host->res->start + MMC_REG_BUFFER_ACCESS, 205 + DMA_MODE_WRITE); 206 + } 207 + 208 + wmb(); 209 + 210 + imx_dma_enable(host->dma); 211 + #endif /* HAS_DMA */ 212 + } 213 + 214 + static int mxcmci_start_cmd(struct mxcmci_host *host, struct mmc_command *cmd, 215 + unsigned int cmdat) 216 + { 217 + WARN_ON(host->cmd != NULL); 218 + host->cmd = cmd; 219 + 220 + switch (mmc_resp_type(cmd)) { 221 + case MMC_RSP_R1: /* short CRC, OPCODE */ 222 + case MMC_RSP_R1B:/* short CRC, OPCODE, BUSY */ 223 + cmdat |= CMD_DAT_CONT_RESPONSE_48BIT_CRC; 224 + break; 225 + case MMC_RSP_R2: /* long 136 bit + CRC */ 226 + cmdat |= CMD_DAT_CONT_RESPONSE_136BIT; 227 + break; 228 + case MMC_RSP_R3: /* short */ 229 + cmdat |= CMD_DAT_CONT_RESPONSE_48BIT; 230 + break; 231 + case MMC_RSP_NONE: 232 + break; 233 + default: 234 + dev_err(mmc_dev(host->mmc), "unhandled response type 0x%x\n", 235 + mmc_resp_type(cmd)); 236 + cmd->error = -EINVAL; 237 + return -EINVAL; 238 + } 239 + 240 + if (mxcmci_use_dma(host)) 241 + writel(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN | 242 + INT_END_CMD_RES_EN, 243 + host->base + MMC_REG_INT_CNTR); 244 + else 245 + writel(INT_END_CMD_RES_EN, host->base + MMC_REG_INT_CNTR); 246 + 247 + writew(cmd->opcode, host->base + MMC_REG_CMD); 248 + writel(cmd->arg, host->base + MMC_REG_ARG); 249 + writew(cmdat, host->base + MMC_REG_CMD_DAT_CONT); 250 + 251 + return 0; 252 + } 253 + 254 + static void mxcmci_finish_request(struct mxcmci_host *host, 255 + struct mmc_request *req) 256 + { 257 + writel(0, host->base + MMC_REG_INT_CNTR); 258 + 259 + host->req = NULL; 260 + host->cmd = NULL; 261 + host->data = NULL; 262 + 263 + mmc_request_done(host->mmc, req); 264 + } 265 + 266 + static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat) 267 + { 268 + struct mmc_data *data = host->data; 269 + int data_error; 270 + 271 + #ifdef HAS_DMA 272 + if (mxcmci_use_dma(host)) { 273 + imx_dma_disable(host->dma); 274 + dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents, 275 + host->dma_dir); 276 + } 277 + #endif 278 + 279 + if (stat & STATUS_ERR_MASK) { 280 + dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", 281 + stat); 282 + if (stat & STATUS_CRC_READ_ERR) { 283 + data->error = -EILSEQ; 284 + } else if (stat & STATUS_CRC_WRITE_ERR) { 285 + u32 err_code = (stat >> 9) & 0x3; 286 + if (err_code == 2) /* No CRC response */ 287 + data->error = -ETIMEDOUT; 288 + else 289 + data->error = -EILSEQ; 290 + } else if (stat & STATUS_TIME_OUT_READ) { 291 + data->error = -ETIMEDOUT; 292 + } else { 293 + data->error = -EIO; 294 + } 295 + } else { 296 + data->bytes_xfered = host->datasize; 297 + } 298 + 299 + data_error = data->error; 300 + 301 + host->data = NULL; 302 + 303 + return data_error; 304 + } 305 + 306 + static void mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) 307 + { 308 + struct mmc_command *cmd = host->cmd; 309 + int i; 310 + u32 a, b, c; 311 + 312 + if (!cmd) 313 + return; 314 + 315 + if (stat & STATUS_TIME_OUT_RESP) { 316 + dev_dbg(mmc_dev(host->mmc), "CMD TIMEOUT\n"); 317 + cmd->error = -ETIMEDOUT; 318 + } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) { 319 + dev_dbg(mmc_dev(host->mmc), "cmd crc error\n"); 320 + cmd->error = -EILSEQ; 321 + } 322 + 323 + if (cmd->flags & MMC_RSP_PRESENT) { 324 + if (cmd->flags & MMC_RSP_136) { 325 + for (i = 0; i < 4; i++) { 326 + a = readw(host->base + MMC_REG_RES_FIFO); 327 + b = readw(host->base + MMC_REG_RES_FIFO); 328 + cmd->resp[i] = a << 16 | b; 329 + } 330 + } else { 331 + a = readw(host->base + MMC_REG_RES_FIFO); 332 + b = readw(host->base + MMC_REG_RES_FIFO); 333 + c = readw(host->base + MMC_REG_RES_FIFO); 334 + cmd->resp[0] = a << 24 | b << 8 | c >> 8; 335 + } 336 + } 337 + } 338 + 339 + static int mxcmci_poll_status(struct mxcmci_host *host, u32 mask) 340 + { 341 + u32 stat; 342 + unsigned long timeout = jiffies + HZ; 343 + 344 + do { 345 + stat = readl(host->base + MMC_REG_STATUS); 346 + if (stat & STATUS_ERR_MASK) 347 + return stat; 348 + if (time_after(jiffies, timeout)) 349 + return STATUS_TIME_OUT_READ; 350 + if (stat & mask) 351 + return 0; 352 + cpu_relax(); 353 + } while (1); 354 + } 355 + 356 + static int mxcmci_pull(struct mxcmci_host *host, void *_buf, int bytes) 357 + { 358 + unsigned int stat; 359 + u32 *buf = _buf; 360 + 361 + while (bytes > 3) { 362 + stat = mxcmci_poll_status(host, 363 + STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE); 364 + if (stat) 365 + return stat; 366 + *buf++ = readl(host->base + MMC_REG_BUFFER_ACCESS); 367 + bytes -= 4; 368 + } 369 + 370 + if (bytes) { 371 + u8 *b = (u8 *)buf; 372 + u32 tmp; 373 + 374 + stat = mxcmci_poll_status(host, 375 + STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE); 376 + if (stat) 377 + return stat; 378 + tmp = readl(host->base + MMC_REG_BUFFER_ACCESS); 379 + memcpy(b, &tmp, bytes); 380 + } 381 + 382 + return 0; 383 + } 384 + 385 + static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes) 386 + { 387 + unsigned int stat; 388 + u32 *buf = _buf; 389 + 390 + while (bytes > 3) { 391 + stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); 392 + if (stat) 393 + return stat; 394 + writel(*buf++, host->base + MMC_REG_BUFFER_ACCESS); 395 + bytes -= 4; 396 + } 397 + 398 + if (bytes) { 399 + u8 *b = (u8 *)buf; 400 + u32 tmp; 401 + 402 + stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); 403 + if (stat) 404 + return stat; 405 + 406 + memcpy(&tmp, b, bytes); 407 + writel(tmp, host->base + MMC_REG_BUFFER_ACCESS); 408 + } 409 + 410 + stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); 411 + if (stat) 412 + return stat; 413 + 414 + return 0; 415 + } 416 + 417 + static int mxcmci_transfer_data(struct mxcmci_host *host) 418 + { 419 + struct mmc_data *data = host->req->data; 420 + struct scatterlist *sg; 421 + int stat, i; 422 + 423 + host->datasize = 0; 424 + 425 + host->data = data; 426 + host->datasize = 0; 427 + 428 + if (data->flags & MMC_DATA_READ) { 429 + for_each_sg(data->sg, sg, data->sg_len, i) { 430 + stat = mxcmci_pull(host, sg_virt(sg), sg->length); 431 + if (stat) 432 + return stat; 433 + host->datasize += sg->length; 434 + } 435 + } else { 436 + for_each_sg(data->sg, sg, data->sg_len, i) { 437 + stat = mxcmci_push(host, sg_virt(sg), sg->length); 438 + if (stat) 439 + return stat; 440 + host->datasize += sg->length; 441 + } 442 + stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); 443 + if (stat) 444 + return stat; 445 + } 446 + return 0; 447 + } 448 + 449 + static void mxcmci_datawork(struct work_struct *work) 450 + { 451 + struct mxcmci_host *host = container_of(work, struct mxcmci_host, 452 + datawork); 453 + int datastat = mxcmci_transfer_data(host); 454 + mxcmci_finish_data(host, datastat); 455 + 456 + if (host->req->stop) { 457 + if (mxcmci_start_cmd(host, host->req->stop, 0)) { 458 + mxcmci_finish_request(host, host->req); 459 + return; 460 + } 461 + } else { 462 + mxcmci_finish_request(host, host->req); 463 + } 464 + } 465 + 466 + #ifdef HAS_DMA 467 + static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) 468 + { 469 + struct mmc_data *data = host->data; 470 + int data_error; 471 + 472 + if (!data) 473 + return; 474 + 475 + data_error = mxcmci_finish_data(host, stat); 476 + 477 + mxcmci_read_response(host, stat); 478 + host->cmd = NULL; 479 + 480 + if (host->req->stop) { 481 + if (mxcmci_start_cmd(host, host->req->stop, 0)) { 482 + mxcmci_finish_request(host, host->req); 483 + return; 484 + } 485 + } else { 486 + mxcmci_finish_request(host, host->req); 487 + } 488 + } 489 + #endif /* HAS_DMA */ 490 + 491 + static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) 492 + { 493 + mxcmci_read_response(host, stat); 494 + host->cmd = NULL; 495 + 496 + if (!host->data && host->req) { 497 + mxcmci_finish_request(host, host->req); 498 + return; 499 + } 500 + 501 + /* For the DMA case the DMA engine handles the data transfer 502 + * automatically. For non DMA we have to to it ourselves. 503 + * Don't do it in interrupt context though. 504 + */ 505 + if (!mxcmci_use_dma(host) && host->data) 506 + schedule_work(&host->datawork); 507 + 508 + } 509 + 510 + static irqreturn_t mxcmci_irq(int irq, void *devid) 511 + { 512 + struct mxcmci_host *host = devid; 513 + u32 stat; 514 + 515 + stat = readl(host->base + MMC_REG_STATUS); 516 + writel(stat, host->base + MMC_REG_STATUS); 517 + 518 + dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); 519 + 520 + if (stat & STATUS_END_CMD_RESP) 521 + mxcmci_cmd_done(host, stat); 522 + #ifdef HAS_DMA 523 + if (mxcmci_use_dma(host) && 524 + (stat & (STATUS_DATA_TRANS_DONE | STATUS_WRITE_OP_DONE))) 525 + mxcmci_data_done(host, stat); 526 + #endif 527 + return IRQ_HANDLED; 528 + } 529 + 530 + static void mxcmci_request(struct mmc_host *mmc, struct mmc_request *req) 531 + { 532 + struct mxcmci_host *host = mmc_priv(mmc); 533 + unsigned int cmdat = host->cmdat; 534 + 535 + WARN_ON(host->req != NULL); 536 + 537 + host->req = req; 538 + host->cmdat &= ~CMD_DAT_CONT_INIT; 539 + #ifdef HAS_DMA 540 + host->do_dma = 1; 541 + #endif 542 + if (req->data) { 543 + mxcmci_setup_data(host, req->data); 544 + 545 + cmdat |= CMD_DAT_CONT_DATA_ENABLE; 546 + 547 + if (req->data->flags & MMC_DATA_WRITE) 548 + cmdat |= CMD_DAT_CONT_WRITE; 549 + } 550 + 551 + if (mxcmci_start_cmd(host, req->cmd, cmdat)) 552 + mxcmci_finish_request(host, req); 553 + } 554 + 555 + static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios) 556 + { 557 + unsigned int divider; 558 + int prescaler = 0; 559 + unsigned int clk_in = clk_get_rate(host->clk); 560 + 561 + while (prescaler <= 0x800) { 562 + for (divider = 1; divider <= 0xF; divider++) { 563 + int x; 564 + 565 + x = (clk_in / (divider + 1)); 566 + 567 + if (prescaler) 568 + x /= (prescaler * 2); 569 + 570 + if (x <= clk_ios) 571 + break; 572 + } 573 + if (divider < 0x10) 574 + break; 575 + 576 + if (prescaler == 0) 577 + prescaler = 1; 578 + else 579 + prescaler <<= 1; 580 + } 581 + 582 + writew((prescaler << 4) | divider, host->base + MMC_REG_CLK_RATE); 583 + 584 + dev_dbg(mmc_dev(host->mmc), "scaler: %d divider: %d in: %d out: %d\n", 585 + prescaler, divider, clk_in, clk_ios); 586 + } 587 + 588 + static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) 589 + { 590 + struct mxcmci_host *host = mmc_priv(mmc); 591 + #ifdef HAS_DMA 592 + unsigned int blen; 593 + /* 594 + * use burstlen of 64 in 4 bit mode (--> reg value 0) 595 + * use burstlen of 16 in 1 bit mode (--> reg value 16) 596 + */ 597 + if (ios->bus_width == MMC_BUS_WIDTH_4) 598 + blen = 0; 599 + else 600 + blen = 16; 601 + 602 + imx_dma_config_burstlen(host->dma, blen); 603 + #endif 604 + if (ios->bus_width == MMC_BUS_WIDTH_4) 605 + host->cmdat |= CMD_DAT_CONT_BUS_WIDTH_4; 606 + else 607 + host->cmdat &= ~CMD_DAT_CONT_BUS_WIDTH_4; 608 + 609 + if (host->power_mode != ios->power_mode) { 610 + if (host->pdata && host->pdata->setpower) 611 + host->pdata->setpower(mmc_dev(mmc), ios->vdd); 612 + host->power_mode = ios->power_mode; 613 + if (ios->power_mode == MMC_POWER_ON) 614 + host->cmdat |= CMD_DAT_CONT_INIT; 615 + } 616 + 617 + if (ios->clock) { 618 + mxcmci_set_clk_rate(host, ios->clock); 619 + writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); 620 + } else { 621 + writew(STR_STP_CLK_STOP_CLK, host->base + MMC_REG_STR_STP_CLK); 622 + } 623 + 624 + host->clock = ios->clock; 625 + } 626 + 627 + static irqreturn_t mxcmci_detect_irq(int irq, void *data) 628 + { 629 + struct mmc_host *mmc = data; 630 + 631 + dev_dbg(mmc_dev(mmc), "%s\n", __func__); 632 + 633 + mmc_detect_change(mmc, msecs_to_jiffies(250)); 634 + return IRQ_HANDLED; 635 + } 636 + 637 + static int mxcmci_get_ro(struct mmc_host *mmc) 638 + { 639 + struct mxcmci_host *host = mmc_priv(mmc); 640 + 641 + if (host->pdata && host->pdata->get_ro) 642 + return !!host->pdata->get_ro(mmc_dev(mmc)); 643 + /* 644 + * Board doesn't support read only detection; let the mmc core 645 + * decide what to do. 646 + */ 647 + return -ENOSYS; 648 + } 649 + 650 + 651 + static const struct mmc_host_ops mxcmci_ops = { 652 + .request = mxcmci_request, 653 + .set_ios = mxcmci_set_ios, 654 + .get_ro = mxcmci_get_ro, 655 + }; 656 + 657 + static int mxcmci_probe(struct platform_device *pdev) 658 + { 659 + struct mmc_host *mmc; 660 + struct mxcmci_host *host = NULL; 661 + struct resource *r; 662 + int ret = 0, irq; 663 + 664 + printk(KERN_INFO "i.MX SDHC driver\n"); 665 + 666 + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 667 + irq = platform_get_irq(pdev, 0); 668 + if (!r || irq < 0) 669 + return -EINVAL; 670 + 671 + r = request_mem_region(r->start, resource_size(r), pdev->name); 672 + if (!r) 673 + return -EBUSY; 674 + 675 + mmc = mmc_alloc_host(sizeof(struct mxcmci_host), &pdev->dev); 676 + if (!mmc) { 677 + ret = -ENOMEM; 678 + goto out_release_mem; 679 + } 680 + 681 + mmc->ops = &mxcmci_ops; 682 + mmc->caps = MMC_CAP_4_BIT_DATA; 683 + 684 + /* MMC core transfer sizes tunable parameters */ 685 + mmc->max_hw_segs = 64; 686 + mmc->max_phys_segs = 64; 687 + mmc->max_blk_size = 2048; 688 + mmc->max_blk_count = 65535; 689 + mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; 690 + mmc->max_seg_size = mmc->max_seg_size; 691 + 692 + host = mmc_priv(mmc); 693 + host->base = ioremap(r->start, resource_size(r)); 694 + if (!host->base) { 695 + ret = -ENOMEM; 696 + goto out_free; 697 + } 698 + 699 + host->mmc = mmc; 700 + host->pdata = pdev->dev.platform_data; 701 + 702 + if (host->pdata && host->pdata->ocr_avail) 703 + mmc->ocr_avail = host->pdata->ocr_avail; 704 + else 705 + mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; 706 + 707 + host->res = r; 708 + host->irq = irq; 709 + 710 + host->clk = clk_get(&pdev->dev, "sdhc_clk"); 711 + if (IS_ERR(host->clk)) { 712 + ret = PTR_ERR(host->clk); 713 + goto out_iounmap; 714 + } 715 + clk_enable(host->clk); 716 + 717 + mxcmci_softreset(host); 718 + 719 + host->rev_no = readw(host->base + MMC_REG_REV_NO); 720 + if (host->rev_no != 0x400) { 721 + ret = -ENODEV; 722 + dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", 723 + host->rev_no); 724 + goto out_clk_put; 725 + } 726 + 727 + mmc->f_min = clk_get_rate(host->clk) >> 7; 728 + mmc->f_max = clk_get_rate(host->clk) >> 1; 729 + 730 + /* recommended in data sheet */ 731 + writew(0x2db4, host->base + MMC_REG_READ_TO); 732 + 733 + writel(0, host->base + MMC_REG_INT_CNTR); 734 + 735 + #ifdef HAS_DMA 736 + host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW); 737 + if (host->dma < 0) { 738 + dev_err(mmc_dev(host->mmc), "imx_dma_request_by_prio failed\n"); 739 + ret = -EBUSY; 740 + goto out_clk_put; 741 + } 742 + 743 + r = platform_get_resource(pdev, IORESOURCE_DMA, 0); 744 + if (!r) { 745 + ret = -EINVAL; 746 + goto out_free_dma; 747 + } 748 + 749 + ret = imx_dma_config_channel(host->dma, 750 + IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_FIFO, 751 + IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR, 752 + r->start, 0); 753 + if (ret) { 754 + dev_err(mmc_dev(host->mmc), "failed to config DMA channel\n"); 755 + goto out_free_dma; 756 + } 757 + #endif 758 + INIT_WORK(&host->datawork, mxcmci_datawork); 759 + 760 + ret = request_irq(host->irq, mxcmci_irq, 0, DRIVER_NAME, host); 761 + if (ret) 762 + goto out_free_dma; 763 + 764 + platform_set_drvdata(pdev, mmc); 765 + 766 + if (host->pdata && host->pdata->init) { 767 + ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq, 768 + host->mmc); 769 + if (ret) 770 + goto out_free_irq; 771 + } 772 + 773 + mmc_add_host(mmc); 774 + 775 + return 0; 776 + 777 + out_free_irq: 778 + free_irq(host->irq, host); 779 + out_free_dma: 780 + #ifdef HAS_DMA 781 + imx_dma_free(host->dma); 782 + #endif 783 + out_clk_put: 784 + clk_disable(host->clk); 785 + clk_put(host->clk); 786 + out_iounmap: 787 + iounmap(host->base); 788 + out_free: 789 + mmc_free_host(mmc); 790 + out_release_mem: 791 + release_mem_region(host->res->start, resource_size(host->res)); 792 + return ret; 793 + } 794 + 795 + static int mxcmci_remove(struct platform_device *pdev) 796 + { 797 + struct mmc_host *mmc = platform_get_drvdata(pdev); 798 + struct mxcmci_host *host = mmc_priv(mmc); 799 + 800 + platform_set_drvdata(pdev, NULL); 801 + 802 + mmc_remove_host(mmc); 803 + 804 + if (host->pdata && host->pdata->exit) 805 + host->pdata->exit(&pdev->dev, mmc); 806 + 807 + free_irq(host->irq, host); 808 + iounmap(host->base); 809 + #ifdef HAS_DMA 810 + imx_dma_free(host->dma); 811 + #endif 812 + clk_disable(host->clk); 813 + clk_put(host->clk); 814 + 815 + release_mem_region(host->res->start, resource_size(host->res)); 816 + release_resource(host->res); 817 + 818 + mmc_free_host(mmc); 819 + 820 + return 0; 821 + } 822 + 823 + #ifdef CONFIG_PM 824 + static int mxcmci_suspend(struct platform_device *dev, pm_message_t state) 825 + { 826 + struct mmc_host *mmc = platform_get_drvdata(dev); 827 + int ret = 0; 828 + 829 + if (mmc) 830 + ret = mmc_suspend_host(mmc, state); 831 + 832 + return ret; 833 + } 834 + 835 + static int mxcmci_resume(struct platform_device *dev) 836 + { 837 + struct mmc_host *mmc = platform_get_drvdata(dev); 838 + struct mxcmci_host *host; 839 + int ret = 0; 840 + 841 + if (mmc) { 842 + host = mmc_priv(mmc); 843 + ret = mmc_resume_host(mmc); 844 + } 845 + 846 + return ret; 847 + } 848 + #else 849 + #define mxcmci_suspend NULL 850 + #define mxcmci_resume NULL 851 + #endif /* CONFIG_PM */ 852 + 853 + static struct platform_driver mxcmci_driver = { 854 + .probe = mxcmci_probe, 855 + .remove = mxcmci_remove, 856 + .suspend = mxcmci_suspend, 857 + .resume = mxcmci_resume, 858 + .driver = { 859 + .name = DRIVER_NAME, 860 + .owner = THIS_MODULE, 861 + } 862 + }; 863 + 864 + static int __init mxcmci_init(void) 865 + { 866 + return platform_driver_register(&mxcmci_driver); 867 + } 868 + 869 + static void __exit mxcmci_exit(void) 870 + { 871 + platform_driver_unregister(&mxcmci_driver); 872 + } 873 + 874 + module_init(mxcmci_init); 875 + module_exit(mxcmci_exit); 876 + 877 + MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver"); 878 + MODULE_AUTHOR("Sascha Hauer, Pengutronix"); 879 + MODULE_LICENSE("GPL"); 880 + MODULE_ALIAS("platform:imx-mmc");
+19 -6
drivers/mmc/host/pxamci.c
··· 180 180 else 181 181 DALGN &= ~(1 << host->dma); 182 182 DDADR(host->dma) = host->sg_dma; 183 - DCSR(host->dma) = DCSR_RUN; 183 + 184 + /* 185 + * workaround for erratum #91: 186 + * only start DMA now if we are doing a read, 187 + * otherwise we wait until CMD/RESP has finished 188 + * before starting DMA. 189 + */ 190 + if (!cpu_is_pxa27x() || data->flags & MMC_DATA_READ) 191 + DCSR(host->dma) = DCSR_RUN; 184 192 } 185 193 186 194 static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd, unsigned int cmdat) ··· 259 251 if (stat & STAT_TIME_OUT_RESPONSE) { 260 252 cmd->error = -ETIMEDOUT; 261 253 } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { 262 - #ifdef CONFIG_PXA27x 263 254 /* 264 255 * workaround for erratum #42: 265 256 * Intel PXA27x Family Processor Specification Update Rev 001 266 257 * A bogus CRC error can appear if the msb of a 136 bit 267 258 * response is a one. 268 259 */ 269 - if (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000) { 260 + if (cpu_is_pxa27x() && 261 + (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000)) 270 262 pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); 271 - } else 272 - #endif 273 - cmd->error = -EILSEQ; 263 + else 264 + cmd->error = -EILSEQ; 274 265 } 275 266 276 267 pxamci_disable_irq(host, END_CMD_RES); 277 268 if (host->data && !cmd->error) { 278 269 pxamci_enable_irq(host, DATA_TRAN_DONE); 270 + /* 271 + * workaround for erratum #91, if doing write 272 + * enable DMA late 273 + */ 274 + if (cpu_is_pxa27x() && host->data->flags & MMC_DATA_WRITE) 275 + DCSR(host->dma) = DCSR_RUN; 279 276 } else { 280 277 pxamci_finish_request(host, host->mrq); 281 278 }
+4 -4
drivers/mmc/host/ricoh_mmc.c
··· 196 196 pci_set_drvdata(pdev, NULL); 197 197 } 198 198 199 - static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state) 199 + static int ricoh_mmc_suspend_late(struct pci_dev *pdev, pm_message_t state) 200 200 { 201 201 struct pci_dev *fw_dev = NULL; 202 202 ··· 210 210 return 0; 211 211 } 212 212 213 - static int ricoh_mmc_resume(struct pci_dev *pdev) 213 + static int ricoh_mmc_resume_early(struct pci_dev *pdev) 214 214 { 215 215 struct pci_dev *fw_dev = NULL; 216 216 ··· 229 229 .id_table = pci_ids, 230 230 .probe = ricoh_mmc_probe, 231 231 .remove = __devexit_p(ricoh_mmc_remove), 232 - .suspend = ricoh_mmc_suspend, 233 - .resume = ricoh_mmc_resume, 232 + .suspend_late = ricoh_mmc_suspend_late, 233 + .resume_early = ricoh_mmc_resume_early, 234 234 }; 235 235 236 236 /*****************************************************************************\
+2 -2
drivers/net/e1000/e1000_main.c
··· 31 31 32 32 char e1000_driver_name[] = "e1000"; 33 33 static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; 34 - #define DRV_VERSION "7.3.20-k3-NAPI" 34 + #define DRV_VERSION "7.3.21-k3-NAPI" 35 35 const char e1000_driver_version[] = DRV_VERSION; 36 36 static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; 37 37 ··· 3712 3712 struct e1000_hw *hw = &adapter->hw; 3713 3713 u32 rctl, icr = er32(ICR); 3714 3714 3715 - if (unlikely(!icr)) 3715 + if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags))) 3716 3716 return IRQ_NONE; /* Not our interrupt */ 3717 3717 3718 3718 /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
+2
drivers/net/gianfar_mii.c
··· 234 234 if (NULL == new_bus) 235 235 return -ENOMEM; 236 236 237 + device_init_wakeup(&ofdev->dev, 1); 238 + 237 239 new_bus->name = "Gianfar MII Bus", 238 240 new_bus->read = &gfar_mdio_read, 239 241 new_bus->write = &gfar_mdio_write,
+9 -2
drivers/net/igb/e1000_82575.c
··· 699 699 700 700 /* SGMII link check is done through the PCS register. */ 701 701 if ((hw->phy.media_type != e1000_media_type_copper) || 702 - (igb_sgmii_active_82575(hw))) 702 + (igb_sgmii_active_82575(hw))) { 703 703 ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed, 704 704 &duplex); 705 - else 705 + /* 706 + * Use this flag to determine if link needs to be checked or 707 + * not. If we have link clear the flag so that we do not 708 + * continue to check for link. 709 + */ 710 + hw->mac.get_link_status = !hw->mac.serdes_has_link; 711 + } else { 706 712 ret_val = igb_check_for_copper_link(hw); 713 + } 707 714 708 715 return ret_val; 709 716 }
+4 -5
drivers/net/igb/igb.h
··· 300 300 301 301 #define IGB_FLAG_HAS_MSI (1 << 0) 302 302 #define IGB_FLAG_MSI_ENABLE (1 << 1) 303 - #define IGB_FLAG_HAS_DCA (1 << 2) 304 - #define IGB_FLAG_DCA_ENABLED (1 << 3) 305 - #define IGB_FLAG_IN_NETPOLL (1 << 5) 306 - #define IGB_FLAG_QUAD_PORT_A (1 << 6) 307 - #define IGB_FLAG_NEED_CTX_IDX (1 << 7) 303 + #define IGB_FLAG_DCA_ENABLED (1 << 2) 304 + #define IGB_FLAG_IN_NETPOLL (1 << 3) 305 + #define IGB_FLAG_QUAD_PORT_A (1 << 4) 306 + #define IGB_FLAG_NEED_CTX_IDX (1 << 5) 308 307 309 308 enum e1000_state_t { 310 309 __IGB_TESTING,
+10 -14
drivers/net/igb/igb_main.c
··· 206 206 207 207 global_quad_port_a = 0; 208 208 209 - ret = pci_register_driver(&igb_driver); 210 209 #ifdef CONFIG_IGB_DCA 211 210 dca_register_notify(&dca_notifier); 212 211 #endif 212 + 213 + ret = pci_register_driver(&igb_driver); 213 214 return ret; 214 215 } 215 216 ··· 1157 1156 1158 1157 /* set flags */ 1159 1158 switch (hw->mac.type) { 1160 - case e1000_82576: 1161 1159 case e1000_82575: 1162 - adapter->flags |= IGB_FLAG_HAS_DCA; 1163 1160 adapter->flags |= IGB_FLAG_NEED_CTX_IDX; 1164 1161 break; 1162 + case e1000_82576: 1165 1163 default: 1166 1164 break; 1167 1165 } ··· 1310 1310 goto err_register; 1311 1311 1312 1312 #ifdef CONFIG_IGB_DCA 1313 - if ((adapter->flags & IGB_FLAG_HAS_DCA) && 1314 - (dca_add_requester(&pdev->dev) == 0)) { 1313 + if (dca_add_requester(&pdev->dev) == 0) { 1315 1314 adapter->flags |= IGB_FLAG_DCA_ENABLED; 1316 1315 dev_info(&pdev->dev, "DCA enabled\n"); 1317 1316 /* Always use CB2 mode, difference is masked ··· 1834 1835 rctl |= E1000_RCTL_SECRC; 1835 1836 1836 1837 /* 1837 - * disable store bad packets, long packet enable, and clear size bits. 1838 + * disable store bad packets and clear size bits. 1838 1839 */ 1839 - rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_LPE | E1000_RCTL_SZ_256); 1840 + rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_SZ_256); 1840 1841 1841 - if (adapter->netdev->mtu > ETH_DATA_LEN) 1842 + /* enable LPE when to prevent packets larger than max_frame_size */ 1842 1843 rctl |= E1000_RCTL_LPE; 1843 1844 1844 1845 /* Setup buffer sizes */ ··· 1864 1865 */ 1865 1866 /* allocations using alloc_page take too long for regular MTU 1866 1867 * so only enable packet split for jumbo frames */ 1867 - if (rctl & E1000_RCTL_LPE) { 1868 + if (adapter->netdev->mtu > ETH_DATA_LEN) { 1868 1869 adapter->rx_ps_hdr_size = IGB_RXBUFFER_128; 1869 1870 srrctl |= adapter->rx_ps_hdr_size << 1870 1871 E1000_SRRCTL_BSIZEHDRSIZE_SHIFT; ··· 3472 3473 struct e1000_hw *hw = &adapter->hw; 3473 3474 unsigned long event = *(unsigned long *)data; 3474 3475 3475 - if (!(adapter->flags & IGB_FLAG_HAS_DCA)) 3476 - goto out; 3477 - 3478 3476 switch (event) { 3479 3477 case DCA_PROVIDER_ADD: 3480 3478 /* if already enabled, don't do it again */ 3481 3479 if (adapter->flags & IGB_FLAG_DCA_ENABLED) 3482 3480 break; 3483 - adapter->flags |= IGB_FLAG_DCA_ENABLED; 3484 3481 /* Always use CB2 mode, difference is masked 3485 3482 * in the CB driver. */ 3486 3483 wr32(E1000_DCA_CTRL, 2); 3487 3484 if (dca_add_requester(dev) == 0) { 3485 + adapter->flags |= IGB_FLAG_DCA_ENABLED; 3488 3486 dev_info(&adapter->pdev->dev, "DCA enabled\n"); 3489 3487 igb_setup_dca(adapter); 3490 3488 break; ··· 3498 3502 } 3499 3503 break; 3500 3504 } 3501 - out: 3505 + 3502 3506 return 0; 3503 3507 } 3504 3508
+1 -1
drivers/net/netxen/netxen_nic.h
··· 210 210 #define MAX_CMD_DESCRIPTORS_HOST 1024 211 211 #define MAX_RCV_DESCRIPTORS_1G 2048 212 212 #define MAX_RCV_DESCRIPTORS_10G 4096 213 - #define MAX_JUMBO_RCV_DESCRIPTORS 512 213 + #define MAX_JUMBO_RCV_DESCRIPTORS 1024 214 214 #define MAX_LRO_RCV_DESCRIPTORS 8 215 215 #define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS 216 216 #define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS
+3 -1
drivers/net/netxen/netxen_nic_init.c
··· 947 947 } 948 948 for (i = 0; i < n; i++) { 949 949 if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || 950 - netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) 950 + netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) { 951 + kfree(buf); 951 952 return -EIO; 953 + } 952 954 953 955 buf[i].addr = addr; 954 956 buf[i].data = val;
+1 -1
drivers/net/ps3_gelic_wireless.c
··· 2168 2168 complete(&wl->assoc_done); 2169 2169 netif_carrier_on(port_to_netdev(wl_port(wl))); 2170 2170 } else 2171 - pr_debug("%s: event %#lx under wpa\n", 2171 + pr_debug("%s: event %#llx under wpa\n", 2172 2172 __func__, event); 2173 2173 } 2174 2174
-1
drivers/net/r6040.c
··· 438 438 { 439 439 struct r6040_private *lp = netdev_priv(dev); 440 440 void __iomem *ioaddr = lp->base; 441 - struct pci_dev *pdev = lp->pdev; 442 441 int limit = 2048; 443 442 u16 *adrp; 444 443 u16 cmd;
+41 -18
drivers/net/sfc/efx.c
··· 676 676 rc = efx->phy_op->init(efx); 677 677 if (rc) 678 678 return rc; 679 - efx->phy_op->reconfigure(efx); 680 - 681 679 mutex_lock(&efx->mac_lock); 680 + efx->phy_op->reconfigure(efx); 682 681 rc = falcon_switch_mac(efx); 683 682 mutex_unlock(&efx->mac_lock); 684 683 if (rc) ··· 685 686 efx->mac_op->reconfigure(efx); 686 687 687 688 efx->port_initialized = true; 688 - efx->stats_enabled = true; 689 + efx_stats_enable(efx); 689 690 return 0; 690 691 691 692 fail: ··· 734 735 if (!efx->port_initialized) 735 736 return; 736 737 738 + efx_stats_disable(efx); 737 739 efx->phy_op->fini(efx); 738 740 efx->port_initialized = false; 739 741 ··· 1361 1361 return 0; 1362 1362 } 1363 1363 1364 + void efx_stats_disable(struct efx_nic *efx) 1365 + { 1366 + spin_lock(&efx->stats_lock); 1367 + ++efx->stats_disable_count; 1368 + spin_unlock(&efx->stats_lock); 1369 + } 1370 + 1371 + void efx_stats_enable(struct efx_nic *efx) 1372 + { 1373 + spin_lock(&efx->stats_lock); 1374 + --efx->stats_disable_count; 1375 + spin_unlock(&efx->stats_lock); 1376 + } 1377 + 1364 1378 /* Context: process, dev_base_lock or RTNL held, non-blocking. */ 1365 1379 static struct net_device_stats *efx_net_stats(struct net_device *net_dev) 1366 1380 { ··· 1383 1369 struct net_device_stats *stats = &net_dev->stats; 1384 1370 1385 1371 /* Update stats if possible, but do not wait if another thread 1386 - * is updating them (or resetting the NIC); slightly stale 1387 - * stats are acceptable. 1372 + * is updating them or if MAC stats fetches are temporarily 1373 + * disabled; slightly stale stats are acceptable. 1388 1374 */ 1389 1375 if (!spin_trylock(&efx->stats_lock)) 1390 1376 return stats; 1391 - if (efx->stats_enabled) { 1377 + if (!efx->stats_disable_count) { 1392 1378 efx->mac_op->update_stats(efx); 1393 1379 falcon_update_nic_stats(efx); 1394 1380 } ··· 1636 1622 1637 1623 /* Tears down the entire software state and most of the hardware state 1638 1624 * before reset. */ 1639 - void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd) 1625 + void efx_reset_down(struct efx_nic *efx, enum reset_type method, 1626 + struct ethtool_cmd *ecmd) 1640 1627 { 1641 1628 EFX_ASSERT_RESET_SERIALISED(efx); 1642 1629 1643 - /* The net_dev->get_stats handler is quite slow, and will fail 1644 - * if a fetch is pending over reset. Serialise against it. */ 1645 - spin_lock(&efx->stats_lock); 1646 - efx->stats_enabled = false; 1647 - spin_unlock(&efx->stats_lock); 1648 - 1630 + efx_stats_disable(efx); 1649 1631 efx_stop_all(efx); 1650 1632 mutex_lock(&efx->mac_lock); 1651 1633 mutex_lock(&efx->spi_lock); ··· 1649 1639 efx->phy_op->get_settings(efx, ecmd); 1650 1640 1651 1641 efx_fini_channels(efx); 1642 + if (efx->port_initialized && method != RESET_TYPE_INVISIBLE) 1643 + efx->phy_op->fini(efx); 1652 1644 } 1653 1645 1654 1646 /* This function will always ensure that the locks acquired in ··· 1658 1646 * that we were unable to reinitialise the hardware, and the 1659 1647 * driver should be disabled. If ok is false, then the rx and tx 1660 1648 * engines are not restarted, pending a RESET_DISABLE. */ 1661 - int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, bool ok) 1649 + int efx_reset_up(struct efx_nic *efx, enum reset_type method, 1650 + struct ethtool_cmd *ecmd, bool ok) 1662 1651 { 1663 1652 int rc; 1664 1653 ··· 1669 1656 if (rc) { 1670 1657 EFX_ERR(efx, "failed to initialise NIC\n"); 1671 1658 ok = false; 1659 + } 1660 + 1661 + if (efx->port_initialized && method != RESET_TYPE_INVISIBLE) { 1662 + if (ok) { 1663 + rc = efx->phy_op->init(efx); 1664 + if (rc) 1665 + ok = false; 1666 + } else 1667 + efx->port_initialized = false; 1672 1668 } 1673 1669 1674 1670 if (ok) { ··· 1692 1670 1693 1671 if (ok) { 1694 1672 efx_start_all(efx); 1695 - efx->stats_enabled = true; 1673 + efx_stats_enable(efx); 1696 1674 } 1697 1675 return rc; 1698 1676 } ··· 1724 1702 1725 1703 EFX_INFO(efx, "resetting (%d)\n", method); 1726 1704 1727 - efx_reset_down(efx, &ecmd); 1705 + efx_reset_down(efx, method, &ecmd); 1728 1706 1729 1707 rc = falcon_reset_hw(efx, method); 1730 1708 if (rc) { ··· 1743 1721 1744 1722 /* Leave device stopped if necessary */ 1745 1723 if (method == RESET_TYPE_DISABLE) { 1746 - efx_reset_up(efx, &ecmd, false); 1724 + efx_reset_up(efx, method, &ecmd, false); 1747 1725 rc = -EIO; 1748 1726 } else { 1749 - rc = efx_reset_up(efx, &ecmd, true); 1727 + rc = efx_reset_up(efx, method, &ecmd, true); 1750 1728 } 1751 1729 1752 1730 out_disable: ··· 1898 1876 efx->rx_checksum_enabled = true; 1899 1877 spin_lock_init(&efx->netif_stop_lock); 1900 1878 spin_lock_init(&efx->stats_lock); 1879 + efx->stats_disable_count = 1; 1901 1880 mutex_init(&efx->mac_lock); 1902 1881 efx->mac_op = &efx_dummy_mac_operations; 1903 1882 efx->phy_op = &efx_dummy_phy_operations;
+6 -3
drivers/net/sfc/efx.h
··· 36 36 extern void efx_flush_queues(struct efx_nic *efx); 37 37 38 38 /* Ports */ 39 + extern void efx_stats_disable(struct efx_nic *efx); 40 + extern void efx_stats_enable(struct efx_nic *efx); 39 41 extern void efx_reconfigure_port(struct efx_nic *efx); 40 42 extern void __efx_reconfigure_port(struct efx_nic *efx); 41 43 42 44 /* Reset handling */ 43 - extern void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd); 44 - extern int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, 45 - bool ok); 45 + extern void efx_reset_down(struct efx_nic *efx, enum reset_type method, 46 + struct ethtool_cmd *ecmd); 47 + extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, 48 + struct ethtool_cmd *ecmd, bool ok); 46 49 47 50 /* Global */ 48 51 extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
-3
drivers/net/sfc/ethtool.c
··· 219 219 struct efx_nic *efx = netdev_priv(net_dev); 220 220 int rc; 221 221 222 - if (EFX_WORKAROUND_13963(efx) && !ecmd->autoneg) 223 - return -EINVAL; 224 - 225 222 /* Falcon GMAC does not support 1000Mbps HD */ 226 223 if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) { 227 224 EFX_LOG(efx, "rejecting unsupported 1000Mbps HD"
+18 -14
drivers/net/sfc/falcon.c
··· 824 824 rx_ev_pause_frm ? " [PAUSE]" : ""); 825 825 } 826 826 #endif 827 - 828 - if (unlikely(rx_ev_eth_crc_err && EFX_WORKAROUND_10750(efx) && 829 - efx->phy_type == PHY_TYPE_SFX7101)) 830 - tenxpress_crc_err(efx); 831 827 } 832 828 833 829 /* Handle receive events that are not in-order. */ ··· 1883 1887 1884 1888 /* MAC stats will fail whilst the TX fifo is draining. Serialise 1885 1889 * the drain sequence with the statistics fetch */ 1886 - spin_lock(&efx->stats_lock); 1890 + efx_stats_disable(efx); 1887 1891 1888 1892 falcon_read(efx, &reg, MAC0_CTRL_REG_KER); 1889 1893 EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, 1); ··· 1913 1917 udelay(10); 1914 1918 } 1915 1919 1916 - spin_unlock(&efx->stats_lock); 1920 + efx_stats_enable(efx); 1917 1921 1918 1922 /* If we've reset the EM block and the link is up, then 1919 1923 * we'll have to kick the XAUI link so the PHY can recover */ ··· 2273 2277 struct efx_mac_operations *old_mac_op = efx->mac_op; 2274 2278 efx_oword_t nic_stat; 2275 2279 unsigned strap_val; 2280 + int rc = 0; 2281 + 2282 + /* Don't try to fetch MAC stats while we're switching MACs */ 2283 + efx_stats_disable(efx); 2276 2284 2277 2285 /* Internal loopbacks override the phy speed setting */ 2278 2286 if (efx->loopback_mode == LOOPBACK_GMAC) { ··· 2287 2287 efx->link_fd = true; 2288 2288 } 2289 2289 2290 + WARN_ON(!mutex_is_locked(&efx->mac_lock)); 2290 2291 efx->mac_op = (EFX_IS10G(efx) ? 2291 2292 &falcon_xmac_operations : &falcon_gmac_operations); 2292 - if (old_mac_op == efx->mac_op) 2293 - return 0; 2294 2293 2295 - WARN_ON(!mutex_is_locked(&efx->mac_lock)); 2296 - 2297 - /* Not all macs support a mac-level link state */ 2298 - efx->mac_up = true; 2299 - 2294 + /* Always push the NIC_STAT_REG setting even if the mac hasn't 2295 + * changed, because this function is run post online reset */ 2300 2296 falcon_read(efx, &nic_stat, NIC_STAT_REG); 2301 2297 strap_val = EFX_IS10G(efx) ? 5 : 3; 2302 2298 if (falcon_rev(efx) >= FALCON_REV_B0) { ··· 2305 2309 BUG_ON(EFX_OWORD_FIELD(nic_stat, STRAP_PINS) != strap_val); 2306 2310 } 2307 2311 2312 + if (old_mac_op == efx->mac_op) 2313 + goto out; 2308 2314 2309 2315 EFX_LOG(efx, "selected %cMAC\n", EFX_IS10G(efx) ? 'X' : 'G'); 2310 - return falcon_reset_macs(efx); 2316 + /* Not all macs support a mac-level link state */ 2317 + efx->mac_up = true; 2318 + 2319 + rc = falcon_reset_macs(efx); 2320 + out: 2321 + efx_stats_enable(efx); 2322 + return rc; 2311 2323 } 2312 2324 2313 2325 /* This call is responsible for hooking in the MAC and PHY operations */
+87 -100
drivers/net/sfc/mdio_10g.c
··· 15 15 #include "net_driver.h" 16 16 #include "mdio_10g.h" 17 17 #include "boards.h" 18 + #include "workarounds.h" 18 19 19 20 int mdio_clause45_reset_mmd(struct efx_nic *port, int mmd, 20 21 int spins, int spintime) ··· 180 179 return false; 181 180 else if (efx_phy_mode_disabled(efx->phy_mode)) 182 181 return false; 183 - else if (efx->loopback_mode == LOOPBACK_PHYXS) { 182 + else if (efx->loopback_mode == LOOPBACK_PHYXS) 184 183 mmd_mask &= ~(MDIO_MMDREG_DEVS_PHYXS | 185 184 MDIO_MMDREG_DEVS_PCS | 186 185 MDIO_MMDREG_DEVS_PMAPMD | 187 186 MDIO_MMDREG_DEVS_AN); 188 - if (!mmd_mask) { 189 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PHYXS, 190 - MDIO_PHYXS_STATUS2); 191 - return !(reg & (1 << MDIO_PHYXS_STATUS2_RX_FAULT_LBN)); 192 - } 193 - } else if (efx->loopback_mode == LOOPBACK_PCS) 187 + else if (efx->loopback_mode == LOOPBACK_PCS) 194 188 mmd_mask &= ~(MDIO_MMDREG_DEVS_PCS | 195 189 MDIO_MMDREG_DEVS_PMAPMD | 196 190 MDIO_MMDREG_DEVS_AN); 197 191 else if (efx->loopback_mode == LOOPBACK_PMAPMD) 198 192 mmd_mask &= ~(MDIO_MMDREG_DEVS_PMAPMD | 199 193 MDIO_MMDREG_DEVS_AN); 194 + 195 + if (!mmd_mask) { 196 + /* Use presence of XGMII faults in leui of link state */ 197 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PHYXS, 198 + MDIO_PHYXS_STATUS2); 199 + return !(reg & (1 << MDIO_PHYXS_STATUS2_RX_FAULT_LBN)); 200 + } 200 201 201 202 while (mmd_mask) { 202 203 if (mmd_mask & 1) { ··· 266 263 } 267 264 } 268 265 269 - static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr, u32 xnp) 266 + static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr) 270 267 { 271 268 int phy_id = efx->mii.phy_id; 272 269 u32 result = 0; ··· 281 278 result |= ADVERTISED_100baseT_Half; 282 279 if (reg & ADVERTISE_100FULL) 283 280 result |= ADVERTISED_100baseT_Full; 284 - if (reg & LPA_RESV) 285 - result |= xnp; 286 - 287 281 return result; 288 282 } 289 283 ··· 310 310 */ 311 311 void mdio_clause45_get_settings_ext(struct efx_nic *efx, 312 312 struct ethtool_cmd *ecmd, 313 - u32 xnp, u32 xnp_lpa) 313 + u32 npage_adv, u32 npage_lpa) 314 314 { 315 315 int phy_id = efx->mii.phy_id; 316 316 int reg; ··· 361 361 ecmd->autoneg = AUTONEG_ENABLE; 362 362 ecmd->advertising |= 363 363 ADVERTISED_Autoneg | 364 - mdio_clause45_get_an(efx, 365 - MDIO_AN_ADVERTISE, xnp); 364 + mdio_clause45_get_an(efx, MDIO_AN_ADVERTISE) | 365 + npage_adv; 366 366 } else 367 367 ecmd->autoneg = AUTONEG_DISABLE; 368 368 } else ··· 371 371 if (ecmd->autoneg) { 372 372 /* If AN is complete, report best common mode, 373 373 * otherwise report best advertised mode. */ 374 - u32 common = ecmd->advertising; 374 + u32 modes = 0; 375 375 if (mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 376 376 MDIO_MMDREG_STAT1) & 377 - (1 << MDIO_AN_STATUS_AN_DONE_LBN)) { 378 - common &= mdio_clause45_get_an(efx, MDIO_AN_LPA, 379 - xnp_lpa); 380 - } 381 - if (common & ADVERTISED_10000baseT_Full) { 377 + (1 << MDIO_AN_STATUS_AN_DONE_LBN)) 378 + modes = (ecmd->advertising & 379 + (mdio_clause45_get_an(efx, MDIO_AN_LPA) | 380 + npage_lpa)); 381 + if (modes == 0) 382 + modes = ecmd->advertising; 383 + 384 + if (modes & ADVERTISED_10000baseT_Full) { 382 385 ecmd->speed = SPEED_10000; 383 386 ecmd->duplex = DUPLEX_FULL; 384 - } else if (common & (ADVERTISED_1000baseT_Full | 385 - ADVERTISED_1000baseT_Half)) { 387 + } else if (modes & (ADVERTISED_1000baseT_Full | 388 + ADVERTISED_1000baseT_Half)) { 386 389 ecmd->speed = SPEED_1000; 387 - ecmd->duplex = !!(common & ADVERTISED_1000baseT_Full); 388 - } else if (common & (ADVERTISED_100baseT_Full | 389 - ADVERTISED_100baseT_Half)) { 390 + ecmd->duplex = !!(modes & ADVERTISED_1000baseT_Full); 391 + } else if (modes & (ADVERTISED_100baseT_Full | 392 + ADVERTISED_100baseT_Half)) { 390 393 ecmd->speed = SPEED_100; 391 - ecmd->duplex = !!(common & ADVERTISED_100baseT_Full); 394 + ecmd->duplex = !!(modes & ADVERTISED_100baseT_Full); 392 395 } else { 393 396 ecmd->speed = SPEED_10; 394 - ecmd->duplex = !!(common & ADVERTISED_10baseT_Full); 397 + ecmd->duplex = !!(modes & ADVERTISED_10baseT_Full); 395 398 } 396 399 } else { 397 400 /* Report forced settings */ ··· 418 415 int phy_id = efx->mii.phy_id; 419 416 struct ethtool_cmd prev; 420 417 u32 required; 421 - int ctrl1_bits, reg; 418 + int reg; 422 419 423 420 efx->phy_op->get_settings(efx, &prev); 424 421 ··· 433 430 if (prev.port != PORT_TP || ecmd->port != PORT_TP) 434 431 return -EINVAL; 435 432 436 - /* Check that PHY supports these settings and work out the 437 - * basic control bits */ 438 - if (ecmd->duplex) { 433 + /* Check that PHY supports these settings */ 434 + if (ecmd->autoneg) { 435 + required = SUPPORTED_Autoneg; 436 + } else if (ecmd->duplex) { 439 437 switch (ecmd->speed) { 440 - case SPEED_10: 441 - ctrl1_bits = BMCR_FULLDPLX; 442 - required = SUPPORTED_10baseT_Full; 443 - break; 444 - case SPEED_100: 445 - ctrl1_bits = BMCR_SPEED100 | BMCR_FULLDPLX; 446 - required = SUPPORTED_100baseT_Full; 447 - break; 448 - case SPEED_1000: 449 - ctrl1_bits = BMCR_SPEED1000 | BMCR_FULLDPLX; 450 - required = SUPPORTED_1000baseT_Full; 451 - break; 452 - case SPEED_10000: 453 - ctrl1_bits = (BMCR_SPEED1000 | BMCR_SPEED100 | 454 - BMCR_FULLDPLX); 455 - required = SUPPORTED_10000baseT_Full; 456 - break; 457 - default: 458 - return -EINVAL; 438 + case SPEED_10: required = SUPPORTED_10baseT_Full; break; 439 + case SPEED_100: required = SUPPORTED_100baseT_Full; break; 440 + default: return -EINVAL; 459 441 } 460 442 } else { 461 443 switch (ecmd->speed) { 462 - case SPEED_10: 463 - ctrl1_bits = 0; 464 - required = SUPPORTED_10baseT_Half; 465 - break; 466 - case SPEED_100: 467 - ctrl1_bits = BMCR_SPEED100; 468 - required = SUPPORTED_100baseT_Half; 469 - break; 470 - case SPEED_1000: 471 - ctrl1_bits = BMCR_SPEED1000; 472 - required = SUPPORTED_1000baseT_Half; 473 - break; 474 - default: 475 - return -EINVAL; 444 + case SPEED_10: required = SUPPORTED_10baseT_Half; break; 445 + case SPEED_100: required = SUPPORTED_100baseT_Half; break; 446 + default: return -EINVAL; 476 447 } 477 448 } 478 - if (ecmd->autoneg) 479 - required |= SUPPORTED_Autoneg; 480 449 required |= ecmd->advertising; 481 450 if (required & ~prev.supported) 482 451 return -EINVAL; 483 452 484 - /* Set the basic control bits */ 485 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 486 - MDIO_MMDREG_CTRL1); 487 - reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | 0x003c); 488 - reg |= ctrl1_bits; 489 - mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, MDIO_MMDREG_CTRL1, 490 - reg); 453 + if (ecmd->autoneg) { 454 + bool xnp = (ecmd->advertising & ADVERTISED_10000baseT_Full 455 + || EFX_WORKAROUND_13204(efx)); 491 456 492 - /* Set the AN registers */ 493 - if (ecmd->autoneg != prev.autoneg || 494 - ecmd->advertising != prev.advertising) { 495 - bool xnp = false; 457 + /* Set up the base page */ 458 + reg = ADVERTISE_CSMA; 459 + if (ecmd->advertising & ADVERTISED_10baseT_Half) 460 + reg |= ADVERTISE_10HALF; 461 + if (ecmd->advertising & ADVERTISED_10baseT_Full) 462 + reg |= ADVERTISE_10FULL; 463 + if (ecmd->advertising & ADVERTISED_100baseT_Half) 464 + reg |= ADVERTISE_100HALF; 465 + if (ecmd->advertising & ADVERTISED_100baseT_Full) 466 + reg |= ADVERTISE_100FULL; 467 + if (xnp) 468 + reg |= ADVERTISE_RESV; 469 + else if (ecmd->advertising & (ADVERTISED_1000baseT_Half | 470 + ADVERTISED_1000baseT_Full)) 471 + reg |= ADVERTISE_NPAGE; 472 + reg |= efx_fc_advertise(efx->wanted_fc); 473 + mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 474 + MDIO_AN_ADVERTISE, reg); 496 475 497 - if (efx->phy_op->set_xnp_advertise) 498 - xnp = efx->phy_op->set_xnp_advertise(efx, 499 - ecmd->advertising); 476 + /* Set up the (extended) next page if necessary */ 477 + if (efx->phy_op->set_npage_adv) 478 + efx->phy_op->set_npage_adv(efx, ecmd->advertising); 500 479 501 - if (ecmd->autoneg) { 502 - reg = 0; 503 - if (ecmd->advertising & ADVERTISED_10baseT_Half) 504 - reg |= ADVERTISE_10HALF; 505 - if (ecmd->advertising & ADVERTISED_10baseT_Full) 506 - reg |= ADVERTISE_10FULL; 507 - if (ecmd->advertising & ADVERTISED_100baseT_Half) 508 - reg |= ADVERTISE_100HALF; 509 - if (ecmd->advertising & ADVERTISED_100baseT_Full) 510 - reg |= ADVERTISE_100FULL; 511 - if (xnp) 512 - reg |= ADVERTISE_RESV; 513 - mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 514 - MDIO_AN_ADVERTISE, reg); 515 - } 516 - 480 + /* Enable and restart AN */ 517 481 reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 518 482 MDIO_MMDREG_CTRL1); 519 - if (ecmd->autoneg) 520 - reg |= BMCR_ANENABLE | BMCR_ANRESTART; 521 - else 522 - reg &= ~BMCR_ANENABLE; 483 + reg |= BMCR_ANENABLE; 484 + if (!(EFX_WORKAROUND_15195(efx) && 485 + LOOPBACK_MASK(efx) & efx->phy_op->loopbacks)) 486 + reg |= BMCR_ANRESTART; 523 487 if (xnp) 524 488 reg |= 1 << MDIO_AN_CTRL_XNP_LBN; 525 489 else 526 490 reg &= ~(1 << MDIO_AN_CTRL_XNP_LBN); 527 491 mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, 492 + MDIO_MMDREG_CTRL1, reg); 493 + } else { 494 + /* Disable AN */ 495 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, 496 + MDIO_MMDREG_CTRL1, 497 + __ffs(BMCR_ANENABLE), false); 498 + 499 + /* Set the basic control bits */ 500 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 501 + MDIO_MMDREG_CTRL1); 502 + reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | 503 + 0x003c); 504 + if (ecmd->speed == SPEED_100) 505 + reg |= BMCR_SPEED100; 506 + if (ecmd->duplex) 507 + reg |= BMCR_FULLDPLX; 508 + mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, 528 509 MDIO_MMDREG_CTRL1, reg); 529 510 } 530 511
+2 -1
drivers/net/sfc/mdio_10g.h
··· 155 155 #define MDIO_AN_XNP 22 156 156 #define MDIO_AN_LPA_XNP 25 157 157 158 - #define MDIO_AN_10GBT_ADVERTISE 32 158 + #define MDIO_AN_10GBT_CTRL 32 159 + #define MDIO_AN_10GBT_CTRL_ADV_10G_LBN 12 159 160 #define MDIO_AN_10GBT_STATUS (33) 160 161 #define MDIO_AN_10GBT_STATUS_MS_FLT_LBN (15) /* MASTER/SLAVE config fault */ 161 162 #define MDIO_AN_10GBT_STATUS_MS_LBN (14) /* MASTER/SLAVE config */
+4 -5
drivers/net/sfc/net_driver.h
··· 566 566 * @poll: Poll for hardware state. Serialised by the mac_lock. 567 567 * @get_settings: Get ethtool settings. Serialised by the mac_lock. 568 568 * @set_settings: Set ethtool settings. Serialised by the mac_lock. 569 - * @set_xnp_advertise: Set abilities advertised in Extended Next Page 569 + * @set_npage_adv: Set abilities advertised in (Extended) Next Page 570 570 * (only needed where AN bit is set in mmds) 571 571 * @num_tests: Number of PHY-specific tests/results 572 572 * @test_names: Names of the tests/results ··· 586 586 struct ethtool_cmd *ecmd); 587 587 int (*set_settings) (struct efx_nic *efx, 588 588 struct ethtool_cmd *ecmd); 589 - bool (*set_xnp_advertise) (struct efx_nic *efx, u32); 589 + void (*set_npage_adv) (struct efx_nic *efx, u32); 590 590 u32 num_tests; 591 591 const char *const *test_names; 592 592 int (*run_tests) (struct efx_nic *efx, int *results, unsigned flags); ··· 754 754 * &struct net_device_stats. 755 755 * @stats_buffer: DMA buffer for statistics 756 756 * @stats_lock: Statistics update lock. Serialises statistics fetches 757 - * @stats_enabled: Temporarily disable statistics fetches. 758 - * Serialised by @stats_lock 757 + * @stats_disable_count: Nest count for disabling statistics fetches 759 758 * @mac_op: MAC interface 760 759 * @mac_address: Permanent MAC address 761 760 * @phy_type: PHY type ··· 836 837 struct efx_mac_stats mac_stats; 837 838 struct efx_buffer stats_buffer; 838 839 spinlock_t stats_lock; 839 - bool stats_enabled; 840 + unsigned int stats_disable_count; 840 841 841 842 struct efx_mac_operations *mac_op; 842 843 unsigned char mac_address[ETH_ALEN];
-1
drivers/net/sfc/phy.h
··· 17 17 extern struct efx_phy_operations falcon_sft9001_phy_ops; 18 18 19 19 extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink); 20 - extern void tenxpress_crc_err(struct efx_nic *efx); 21 20 22 21 /**************************************************************************** 23 22 * Exported functions from the driver for XFP optical PHYs
+4 -3
drivers/net/sfc/selftest.c
··· 665 665 { 666 666 enum efx_loopback_mode loopback_mode = efx->loopback_mode; 667 667 int phy_mode = efx->phy_mode; 668 + enum reset_type reset_method = RESET_TYPE_INVISIBLE; 668 669 struct ethtool_cmd ecmd; 669 670 struct efx_channel *channel; 670 671 int rc_test = 0, rc_reset = 0, rc; ··· 719 718 mutex_unlock(&efx->mac_lock); 720 719 721 720 /* free up all consumers of SRAM (including all the queues) */ 722 - efx_reset_down(efx, &ecmd); 721 + efx_reset_down(efx, reset_method, &ecmd); 723 722 724 723 rc = efx_test_chip(efx, tests); 725 724 if (rc && !rc_test) 726 725 rc_test = rc; 727 726 728 727 /* reset the chip to recover from the register test */ 729 - rc_reset = falcon_reset_hw(efx, RESET_TYPE_ALL); 728 + rc_reset = falcon_reset_hw(efx, reset_method); 730 729 731 730 /* Ensure that the phy is powered and out of loopback 732 731 * for the bist and loopback tests */ 733 732 efx->phy_mode &= ~PHY_MODE_LOW_POWER; 734 733 efx->loopback_mode = LOOPBACK_NONE; 735 734 736 - rc = efx_reset_up(efx, &ecmd, rc_reset == 0); 735 + rc = efx_reset_up(efx, reset_method, &ecmd, rc_reset == 0); 737 736 if (rc && !rc_reset) 738 737 rc_reset = rc; 739 738
+33 -9
drivers/net/sfc/sfe4001.c
··· 186 186 { 187 187 efx_oword_t reg; 188 188 189 - /* GPIO pins are also used for I2C, so block that temporarily */ 189 + /* GPIO 3 and the GPIO register are shared with I2C, so block that */ 190 190 mutex_lock(&efx->i2c_adap.bus_lock); 191 191 192 + /* Pull RST_N (GPIO 2) low then let it up again, setting the 193 + * FLASH_CFG_1 strap (GPIO 3) appropriately. Only change the 194 + * output enables; the output levels should always be 0 (low) 195 + * and we rely on external pull-ups. */ 192 196 falcon_read(efx, &reg, GPIO_CTL_REG_KER); 193 197 EFX_SET_OWORD_FIELD(reg, GPIO2_OEN, true); 194 - EFX_SET_OWORD_FIELD(reg, GPIO2_OUT, false); 195 198 falcon_write(efx, &reg, GPIO_CTL_REG_KER); 196 199 msleep(1000); 197 - EFX_SET_OWORD_FIELD(reg, GPIO2_OUT, true); 198 - EFX_SET_OWORD_FIELD(reg, GPIO3_OEN, true); 199 - EFX_SET_OWORD_FIELD(reg, GPIO3_OUT, 200 - !(efx->phy_mode & PHY_MODE_SPECIAL)); 200 + EFX_SET_OWORD_FIELD(reg, GPIO2_OEN, false); 201 + EFX_SET_OWORD_FIELD(reg, GPIO3_OEN, 202 + !!(efx->phy_mode & PHY_MODE_SPECIAL)); 201 203 falcon_write(efx, &reg, GPIO_CTL_REG_KER); 204 + msleep(1); 202 205 203 206 mutex_unlock(&efx->i2c_adap.bus_lock); 204 207 ··· 235 232 } else if (efx->state != STATE_RUNNING || netif_running(efx->net_dev)) { 236 233 err = -EBUSY; 237 234 } else { 235 + /* Reset the PHY, reconfigure the MAC and enable/disable 236 + * MAC stats accordingly. */ 238 237 efx->phy_mode = new_mode; 238 + if (new_mode & PHY_MODE_SPECIAL) 239 + efx_stats_disable(efx); 239 240 if (efx->board_info.type == EFX_BOARD_SFE4001) 240 241 err = sfe4001_poweron(efx); 241 242 else 242 243 err = sfn4111t_reset(efx); 243 244 efx_reconfigure_port(efx); 245 + if (!(new_mode & PHY_MODE_SPECIAL)) 246 + efx_stats_enable(efx); 244 247 } 245 248 rtnl_unlock(); 246 249 ··· 335 326 efx->board_info.monitor = sfe4001_check_hw; 336 327 efx->board_info.fini = sfe4001_fini; 337 328 329 + if (efx->phy_mode & PHY_MODE_SPECIAL) { 330 + /* PHY won't generate a 156.25 MHz clock and MAC stats fetch 331 + * will fail. */ 332 + efx_stats_disable(efx); 333 + } 338 334 rc = sfe4001_poweron(efx); 339 335 if (rc) 340 336 goto fail_ioexp; ··· 386 372 i2c_unregister_device(efx->board_info.hwmon_client); 387 373 } 388 374 389 - static struct i2c_board_info sfn4111t_hwmon_info = { 375 + static struct i2c_board_info sfn4111t_a0_hwmon_info = { 390 376 I2C_BOARD_INFO("max6647", 0x4e), 377 + .irq = -1, 378 + }; 379 + 380 + static struct i2c_board_info sfn4111t_r5_hwmon_info = { 381 + I2C_BOARD_INFO("max6646", 0x4d), 391 382 .irq = -1, 392 383 }; 393 384 ··· 401 382 int rc; 402 383 403 384 efx->board_info.hwmon_client = 404 - i2c_new_device(&efx->i2c_adap, &sfn4111t_hwmon_info); 385 + i2c_new_device(&efx->i2c_adap, 386 + (efx->board_info.minor < 5) ? 387 + &sfn4111t_a0_hwmon_info : 388 + &sfn4111t_r5_hwmon_info); 405 389 if (!efx->board_info.hwmon_client) 406 390 return -EIO; 407 391 ··· 416 394 if (rc) 417 395 goto fail_hwmon; 418 396 419 - if (efx->phy_mode & PHY_MODE_SPECIAL) 397 + if (efx->phy_mode & PHY_MODE_SPECIAL) { 398 + efx_stats_disable(efx); 420 399 sfn4111t_reset(efx); 400 + } 421 401 422 402 return 0; 423 403
+77 -136
drivers/net/sfc/tenxpress.c
··· 67 67 #define PMA_PMD_EXT_CLK312_WIDTH 1 68 68 #define PMA_PMD_EXT_LPOWER_LBN 12 69 69 #define PMA_PMD_EXT_LPOWER_WIDTH 1 70 + #define PMA_PMD_EXT_ROBUST_LBN 14 71 + #define PMA_PMD_EXT_ROBUST_WIDTH 1 70 72 #define PMA_PMD_EXT_SSR_LBN 15 71 73 #define PMA_PMD_EXT_SSR_WIDTH 1 72 74 ··· 179 177 #define C22EXT_STATUS_LINK_LBN 2 180 178 #define C22EXT_STATUS_LINK_WIDTH 1 181 179 182 - #define C22EXT_MSTSLV_REG 49162 183 - #define C22EXT_MSTSLV_1000_HD_LBN 10 184 - #define C22EXT_MSTSLV_1000_HD_WIDTH 1 185 - #define C22EXT_MSTSLV_1000_FD_LBN 11 186 - #define C22EXT_MSTSLV_1000_FD_WIDTH 1 180 + #define C22EXT_MSTSLV_CTRL 49161 181 + #define C22EXT_MSTSLV_CTRL_ADV_1000_HD_LBN 8 182 + #define C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN 9 183 + 184 + #define C22EXT_MSTSLV_STATUS 49162 185 + #define C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN 10 186 + #define C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN 11 187 187 188 188 /* Time to wait between powering down the LNPGA and turning off the power 189 189 * rails */ 190 190 #define LNPGA_PDOWN_WAIT (HZ / 5) 191 191 192 - static int crc_error_reset_threshold = 100; 193 - module_param(crc_error_reset_threshold, int, 0644); 194 - MODULE_PARM_DESC(crc_error_reset_threshold, 195 - "Max number of CRC errors before XAUI reset"); 196 - 197 192 struct tenxpress_phy_data { 198 193 enum efx_loopback_mode loopback_mode; 199 - atomic_t bad_crc_count; 200 194 enum efx_phy_mode phy_mode; 201 195 int bad_lp_tries; 202 196 }; 203 - 204 - void tenxpress_crc_err(struct efx_nic *efx) 205 - { 206 - struct tenxpress_phy_data *phy_data = efx->phy_data; 207 - if (phy_data != NULL) 208 - atomic_inc(&phy_data->bad_crc_count); 209 - } 210 197 211 198 static ssize_t show_phy_short_reach(struct device *dev, 212 199 struct device_attribute *attr, char *buf) ··· 275 284 PMA_PMD_XCONTROL_REG); 276 285 reg |= ((1 << PMA_PMD_EXT_GMII_EN_LBN) | 277 286 (1 << PMA_PMD_EXT_CLK_OUT_LBN) | 278 - (1 << PMA_PMD_EXT_CLK312_LBN)); 287 + (1 << PMA_PMD_EXT_CLK312_LBN) | 288 + (1 << PMA_PMD_EXT_ROBUST_LBN)); 289 + 279 290 mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, 280 291 PMA_PMD_XCONTROL_REG, reg); 281 292 mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, ··· 339 346 rc = tenxpress_init(efx); 340 347 if (rc < 0) 341 348 goto fail; 349 + mdio_clause45_set_pause(efx); 342 350 343 351 if (efx->phy_type == PHY_TYPE_SFT9001B) { 344 352 rc = device_create_file(&efx->pci_dev->dev, ··· 370 376 371 377 /* The XGMAC clock is driven from the SFC7101/SFT9001 312MHz clock, so 372 378 * a special software reset can glitch the XGMAC sufficiently for stats 373 - * requests to fail. Since we don't often special_reset, just lock. */ 374 - spin_lock(&efx->stats_lock); 379 + * requests to fail. */ 380 + efx_stats_disable(efx); 375 381 376 382 /* Initiate reset */ 377 383 reg = mdio_clause45_read(efx, efx->mii.phy_id, ··· 386 392 rc = mdio_clause45_wait_reset_mmds(efx, 387 393 TENXPRESS_REQUIRED_DEVS); 388 394 if (rc < 0) 389 - goto unlock; 395 + goto out; 390 396 391 397 /* Try and reconfigure the device */ 392 398 rc = tenxpress_init(efx); 393 399 if (rc < 0) 394 - goto unlock; 400 + goto out; 395 401 396 402 /* Wait for the XGXS state machine to churn */ 397 403 mdelay(10); 398 - unlock: 399 - spin_unlock(&efx->stats_lock); 404 + out: 405 + efx_stats_enable(efx); 400 406 return rc; 401 407 } 402 408 ··· 514 520 { 515 521 struct tenxpress_phy_data *phy_data = efx->phy_data; 516 522 struct ethtool_cmd ecmd; 517 - bool phy_mode_change, loop_reset, loop_toggle, loopback; 523 + bool phy_mode_change, loop_reset; 518 524 519 525 if (efx->phy_mode & (PHY_MODE_OFF | PHY_MODE_SPECIAL)) { 520 526 phy_data->phy_mode = efx->phy_mode; ··· 525 531 526 532 phy_mode_change = (efx->phy_mode == PHY_MODE_NORMAL && 527 533 phy_data->phy_mode != PHY_MODE_NORMAL); 528 - loopback = LOOPBACK_MASK(efx) & efx->phy_op->loopbacks; 529 - loop_toggle = LOOPBACK_CHANGED(phy_data, efx, efx->phy_op->loopbacks); 530 534 loop_reset = (LOOPBACK_OUT_OF(phy_data, efx, efx->phy_op->loopbacks) || 531 535 LOOPBACK_CHANGED(phy_data, efx, 1 << LOOPBACK_GPHY)); 532 536 533 - if (loop_reset || loop_toggle || loopback || phy_mode_change) { 537 + if (loop_reset || phy_mode_change) { 534 538 int rc; 535 539 536 540 efx->phy_op->get_settings(efx, &ecmd); ··· 541 549 * then xaui will be reset anyway */ 542 550 if (EFX_IS10G(efx)) 543 551 falcon_reset_xaui(efx); 544 - } 545 - 546 - if (efx->phy_type != PHY_TYPE_SFX7101) { 547 - /* Only change autoneg once, on coming out or 548 - * going into loopback */ 549 - if (loop_toggle) 550 - ecmd.autoneg = !loopback; 551 - if (loopback) { 552 - ecmd.duplex = DUPLEX_FULL; 553 - if (efx->loopback_mode == LOOPBACK_GPHY) 554 - ecmd.speed = SPEED_1000; 555 - else 556 - ecmd.speed = SPEED_10000; 557 - } 558 552 } 559 553 560 554 rc = efx->phy_op->set_settings(efx, &ecmd); ··· 601 623 602 624 if (phy_data->phy_mode != PHY_MODE_NORMAL) 603 625 return; 604 - 605 - if (EFX_WORKAROUND_10750(efx) && 606 - atomic_read(&phy_data->bad_crc_count) > crc_error_reset_threshold) { 607 - EFX_ERR(efx, "Resetting XAUI due to too many CRC errors\n"); 608 - falcon_reset_xaui(efx); 609 - atomic_set(&phy_data->bad_crc_count, 0); 610 - } 611 626 } 612 627 613 628 static void tenxpress_phy_fini(struct efx_nic *efx) ··· 743 772 return rc; 744 773 } 745 774 746 - static u32 tenxpress_get_xnp_lpa(struct efx_nic *efx) 775 + static void 776 + tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 747 777 { 748 - int phy = efx->mii.phy_id; 749 - u32 lpa = 0; 778 + int phy_id = efx->mii.phy_id; 779 + u32 adv = 0, lpa = 0; 750 780 int reg; 751 781 752 782 if (efx->phy_type != PHY_TYPE_SFX7101) { 753 - reg = mdio_clause45_read(efx, phy, MDIO_MMD_C22EXT, 754 - C22EXT_MSTSLV_REG); 755 - if (reg & (1 << C22EXT_MSTSLV_1000_HD_LBN)) 783 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 784 + C22EXT_MSTSLV_CTRL); 785 + if (reg & (1 << C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN)) 786 + adv |= ADVERTISED_1000baseT_Full; 787 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 788 + C22EXT_MSTSLV_STATUS); 789 + if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN)) 756 790 lpa |= ADVERTISED_1000baseT_Half; 757 - if (reg & (1 << C22EXT_MSTSLV_1000_FD_LBN)) 791 + if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN)) 758 792 lpa |= ADVERTISED_1000baseT_Full; 759 793 } 760 - reg = mdio_clause45_read(efx, phy, MDIO_MMD_AN, MDIO_AN_10GBT_STATUS); 794 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 795 + MDIO_AN_10GBT_CTRL); 796 + if (reg & (1 << MDIO_AN_10GBT_CTRL_ADV_10G_LBN)) 797 + adv |= ADVERTISED_10000baseT_Full; 798 + reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, 799 + MDIO_AN_10GBT_STATUS); 761 800 if (reg & (1 << MDIO_AN_10GBT_STATUS_LP_10G_LBN)) 762 801 lpa |= ADVERTISED_10000baseT_Full; 763 - return lpa; 802 + 803 + mdio_clause45_get_settings_ext(efx, ecmd, adv, lpa); 804 + 805 + if (efx->phy_type != PHY_TYPE_SFX7101) 806 + ecmd->supported |= (SUPPORTED_100baseT_Full | 807 + SUPPORTED_1000baseT_Full); 808 + 809 + /* In loopback, the PHY automatically brings up the correct interface, 810 + * but doesn't advertise the correct speed. So override it */ 811 + if (efx->loopback_mode == LOOPBACK_GPHY) 812 + ecmd->speed = SPEED_1000; 813 + else if (LOOPBACK_MASK(efx) & efx->phy_op->loopbacks) 814 + ecmd->speed = SPEED_10000; 764 815 } 765 816 766 - static void sfx7101_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 817 + static int tenxpress_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 767 818 { 768 - mdio_clause45_get_settings_ext(efx, ecmd, ADVERTISED_10000baseT_Full, 769 - tenxpress_get_xnp_lpa(efx)); 770 - ecmd->supported |= SUPPORTED_10000baseT_Full; 771 - ecmd->advertising |= ADVERTISED_10000baseT_Full; 819 + if (!ecmd->autoneg) 820 + return -EINVAL; 821 + 822 + return mdio_clause45_set_settings(efx, ecmd); 772 823 } 773 824 774 - static void sft9001_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 825 + static void sfx7101_set_npage_adv(struct efx_nic *efx, u32 advertising) 775 826 { 776 - int phy_id = efx->mii.phy_id; 777 - u32 xnp_adv = 0; 778 - int reg; 779 - 780 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, 781 - PMA_PMD_SPEED_ENABLE_REG); 782 - if (EFX_WORKAROUND_13204(efx) && (reg & (1 << PMA_PMD_100TX_ADV_LBN))) 783 - xnp_adv |= ADVERTISED_100baseT_Full; 784 - if (reg & (1 << PMA_PMD_1000T_ADV_LBN)) 785 - xnp_adv |= ADVERTISED_1000baseT_Full; 786 - if (reg & (1 << PMA_PMD_10000T_ADV_LBN)) 787 - xnp_adv |= ADVERTISED_10000baseT_Full; 788 - 789 - mdio_clause45_get_settings_ext(efx, ecmd, xnp_adv, 790 - tenxpress_get_xnp_lpa(efx)); 791 - 792 - ecmd->supported |= (SUPPORTED_100baseT_Half | 793 - SUPPORTED_100baseT_Full | 794 - SUPPORTED_1000baseT_Full); 795 - 796 - /* Use the vendor defined C22ext register for duplex settings */ 797 - if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) { 798 - reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, 799 - GPHY_XCONTROL_REG); 800 - ecmd->duplex = (reg & (1 << GPHY_DUPLEX_LBN) ? 801 - DUPLEX_FULL : DUPLEX_HALF); 802 - } 827 + mdio_clause45_set_flag(efx, efx->mii.phy_id, MDIO_MMD_AN, 828 + MDIO_AN_10GBT_CTRL, 829 + MDIO_AN_10GBT_CTRL_ADV_10G_LBN, 830 + advertising & ADVERTISED_10000baseT_Full); 803 831 } 804 832 805 - static int sft9001_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) 833 + static void sft9001_set_npage_adv(struct efx_nic *efx, u32 advertising) 806 834 { 807 835 int phy_id = efx->mii.phy_id; 808 - int rc; 809 836 810 - rc = mdio_clause45_set_settings(efx, ecmd); 811 - if (rc) 812 - return rc; 813 - 814 - if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) 815 - mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, 816 - GPHY_XCONTROL_REG, GPHY_DUPLEX_LBN, 817 - ecmd->duplex == DUPLEX_FULL); 818 - 819 - return rc; 820 - } 821 - 822 - static bool sft9001_set_xnp_advertise(struct efx_nic *efx, u32 advertising) 823 - { 824 - int phy = efx->mii.phy_id; 825 - int reg = mdio_clause45_read(efx, phy, MDIO_MMD_PMAPMD, 826 - PMA_PMD_SPEED_ENABLE_REG); 827 - bool enabled; 828 - 829 - reg &= ~((1 << 2) | (1 << 3)); 830 - if (EFX_WORKAROUND_13204(efx) && 831 - (advertising & ADVERTISED_100baseT_Full)) 832 - reg |= 1 << PMA_PMD_100TX_ADV_LBN; 833 - if (advertising & ADVERTISED_1000baseT_Full) 834 - reg |= 1 << PMA_PMD_1000T_ADV_LBN; 835 - if (advertising & ADVERTISED_10000baseT_Full) 836 - reg |= 1 << PMA_PMD_10000T_ADV_LBN; 837 - mdio_clause45_write(efx, phy, MDIO_MMD_PMAPMD, 838 - PMA_PMD_SPEED_ENABLE_REG, reg); 839 - 840 - enabled = (advertising & 841 - (ADVERTISED_1000baseT_Half | 842 - ADVERTISED_1000baseT_Full | 843 - ADVERTISED_10000baseT_Full)); 844 - if (EFX_WORKAROUND_13204(efx)) 845 - enabled |= (advertising & ADVERTISED_100baseT_Full); 846 - return enabled; 837 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, 838 + C22EXT_MSTSLV_CTRL, 839 + C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN, 840 + advertising & ADVERTISED_1000baseT_Full); 841 + mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, 842 + MDIO_AN_10GBT_CTRL, 843 + MDIO_AN_10GBT_CTRL_ADV_10G_LBN, 844 + advertising & ADVERTISED_10000baseT_Full); 847 845 } 848 846 849 847 struct efx_phy_operations falcon_sfx7101_phy_ops = { ··· 822 882 .poll = tenxpress_phy_poll, 823 883 .fini = tenxpress_phy_fini, 824 884 .clear_interrupt = efx_port_dummy_op_void, 825 - .get_settings = sfx7101_get_settings, 826 - .set_settings = mdio_clause45_set_settings, 885 + .get_settings = tenxpress_get_settings, 886 + .set_settings = tenxpress_set_settings, 887 + .set_npage_adv = sfx7101_set_npage_adv, 827 888 .num_tests = ARRAY_SIZE(sfx7101_test_names), 828 889 .test_names = sfx7101_test_names, 829 890 .run_tests = sfx7101_run_tests, ··· 839 898 .poll = tenxpress_phy_poll, 840 899 .fini = tenxpress_phy_fini, 841 900 .clear_interrupt = efx_port_dummy_op_void, 842 - .get_settings = sft9001_get_settings, 843 - .set_settings = sft9001_set_settings, 844 - .set_xnp_advertise = sft9001_set_xnp_advertise, 901 + .get_settings = tenxpress_get_settings, 902 + .set_settings = tenxpress_set_settings, 903 + .set_npage_adv = sft9001_set_npage_adv, 845 904 .num_tests = ARRAY_SIZE(sft9001_test_names), 846 905 .test_names = sft9001_test_names, 847 906 .run_tests = sft9001_run_tests,
+5 -7
drivers/net/sfc/workarounds.h
··· 18 18 #define EFX_WORKAROUND_ALWAYS(efx) 1 19 19 #define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) 20 20 #define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx) 21 - #define EFX_WORKAROUND_SFX7101(efx) ((efx)->phy_type == PHY_TYPE_SFX7101) 22 - #define EFX_WORKAROUND_SFT9001A(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A) 21 + #define EFX_WORKAROUND_SFT9001(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A || \ 22 + (efx)->phy_type == PHY_TYPE_SFT9001B) 23 23 24 24 /* XAUI resets if link not detected */ 25 25 #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS ··· 29 29 #define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G 30 30 /* TX pkt parser problem with <= 16 byte TXes */ 31 31 #define EFX_WORKAROUND_9141 EFX_WORKAROUND_ALWAYS 32 - /* Low rate CRC errors require XAUI reset */ 33 - #define EFX_WORKAROUND_10750 EFX_WORKAROUND_SFX7101 34 32 /* TX_EV_PKT_ERR can be caused by a dangling TX descriptor 35 33 * or a PCIe error (bug 11028) */ 36 34 #define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS ··· 53 55 #define EFX_WORKAROUND_8071 EFX_WORKAROUND_FALCON_A 54 56 55 57 /* Need to send XNP pages for 100BaseT */ 56 - #define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001A 57 - /* Need to keep AN enabled */ 58 - #define EFX_WORKAROUND_13963 EFX_WORKAROUND_SFT9001A 58 + #define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001 59 + /* Don't restart AN in near-side loopback */ 60 + #define EFX_WORKAROUND_15195 EFX_WORKAROUND_SFT9001 59 61 60 62 #endif /* EFX_WORKAROUNDS_H */
+2 -2
drivers/net/skfp/skfddi.c
··· 1003 1003 break; 1004 1004 case SKFP_CLR_STATS: /* Zero out the driver statistics */ 1005 1005 if (!capable(CAP_NET_ADMIN)) { 1006 - memset(&lp->MacStat, 0, sizeof(lp->MacStat)); 1007 - } else { 1008 1006 status = -EPERM; 1007 + } else { 1008 + memset(&lp->MacStat, 0, sizeof(lp->MacStat)); 1009 1009 } 1010 1010 break; 1011 1011 default:
+3 -3
drivers/net/sky2.c
··· 1403 1403 1404 1404 } 1405 1405 1406 - if (netif_msg_ifup(sky2)) 1407 - printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); 1408 - 1409 1406 netif_carrier_off(dev); 1410 1407 1411 1408 /* must be power of 2 */ ··· 1481 1484 sky2_write32(hw, B0_IMSK, imask); 1482 1485 1483 1486 sky2_set_multicast(dev); 1487 + 1488 + if (netif_msg_ifup(sky2)) 1489 + printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); 1484 1490 return 0; 1485 1491 1486 1492 err_out:
+1 -1
drivers/net/smsc911x.c
··· 953 953 do { 954 954 udelay(1); 955 955 val = smsc911x_reg_read(pdata, RX_DP_CTRL); 956 - } while (timeout-- && (val & RX_DP_CTRL_RX_FFWD_)); 956 + } while (--timeout && (val & RX_DP_CTRL_RX_FFWD_)); 957 957 958 958 if (unlikely(timeout == 0)) 959 959 SMSC_WARNING(HW, "Timed out waiting for "
+1 -2
drivers/net/smsc9420.c
··· 1378 1378 1379 1379 /* test the IRQ connection to the ISR */ 1380 1380 smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); 1381 + pd->software_irq_signal = false; 1381 1382 1382 1383 spin_lock_irqsave(&pd->int_lock, flags); 1383 1384 /* configure interrupt deassertion timer and enable interrupts */ ··· 1394 1393 smsc9420_pci_flush_write(pd); 1395 1394 1396 1395 timeout = 1000; 1397 - pd->software_irq_signal = false; 1398 - smp_wmb(); 1399 1396 while (timeout--) { 1400 1397 if (pd->software_irq_signal) 1401 1398 break;
+19 -4
drivers/net/tulip/21142.c
··· 9 9 10 10 Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} 11 11 for more information on this driver. 12 + 13 + DC21143 manual "21143 PCI/CardBus 10/100Mb/s Ethernet LAN Controller 14 + Hardware Reference Manual" is currently available at : 15 + http://developer.intel.com/design/network/manuals/278074.htm 16 + 12 17 Please submit bugs to http://bugzilla.kernel.org/ . 13 18 */ 14 19 ··· 37 32 int csr12 = ioread32(ioaddr + CSR12); 38 33 int next_tick = 60*HZ; 39 34 int new_csr6 = 0; 35 + int csr14 = ioread32(ioaddr + CSR14); 40 36 37 + /* CSR12[LS10,LS100] are not reliable during autonegotiation */ 38 + if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) 39 + csr12 |= 6; 41 40 if (tulip_debug > 2) 42 41 printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", 43 42 dev->name, csr12, medianame[dev->if_port]); ··· 85 76 new_csr6 = 0x83860000; 86 77 dev->if_port = 3; 87 78 iowrite32(0, ioaddr + CSR13); 88 - iowrite32(0x0003FF7F, ioaddr + CSR14); 79 + iowrite32(0x0003FFFF, ioaddr + CSR14); 89 80 iowrite16(8, ioaddr + CSR15); 90 81 iowrite32(1, ioaddr + CSR13); 91 82 } ··· 141 132 struct tulip_private *tp = netdev_priv(dev); 142 133 void __iomem *ioaddr = tp->base_addr; 143 134 int csr12 = ioread32(ioaddr + CSR12); 135 + int csr14 = ioread32(ioaddr + CSR14); 144 136 137 + /* CSR12[LS10,LS100] are not reliable during autonegotiation */ 138 + if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) 139 + csr12 |= 6; 145 140 if (tulip_debug > 1) 146 141 printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " 147 - "%8.8x.\n", dev->name, csr12, csr5, ioread32(ioaddr + CSR14)); 142 + "%8.8x.\n", dev->name, csr12, csr5, csr14); 148 143 149 144 /* If NWay finished and we have a negotiated partner capability. */ 150 145 if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { ··· 156 143 int negotiated = tp->sym_advertise & (csr12 >> 16); 157 144 tp->lpar = csr12 >> 16; 158 145 tp->nwayset = 1; 159 - if (negotiated & 0x0100) dev->if_port = 5; 146 + /* If partner cannot negotiate, it is 10Mbps Half Duplex */ 147 + if (!(csr12 & 0x8000)) dev->if_port = 0; 148 + else if (negotiated & 0x0100) dev->if_port = 5; 160 149 else if (negotiated & 0x0080) dev->if_port = 3; 161 150 else if (negotiated & 0x0040) dev->if_port = 4; 162 151 else if (negotiated & 0x0020) dev->if_port = 0; ··· 229 214 tp->timer.expires = RUN_AT(3*HZ); 230 215 add_timer(&tp->timer); 231 216 } else if (dev->if_port == 5) 232 - iowrite32(ioread32(ioaddr + CSR14) & ~0x080, ioaddr + CSR14); 217 + iowrite32(csr14 & ~0x080, ioaddr + CSR14); 233 218 } else if (dev->if_port == 0 || dev->if_port == 4) { 234 219 if ((csr12 & 4) == 0) 235 220 printk(KERN_INFO"%s: 21143 10baseT link beat good.\n",
+18 -2
drivers/net/ucc_geth.c
··· 1536 1536 static int init_phy(struct net_device *dev) 1537 1537 { 1538 1538 struct ucc_geth_private *priv = netdev_priv(dev); 1539 + struct device_node *np = priv->node; 1540 + struct device_node *phy, *mdio; 1541 + const phandle *ph; 1542 + char bus_name[MII_BUS_ID_SIZE]; 1543 + const unsigned int *id; 1539 1544 struct phy_device *phydev; 1540 1545 char phy_id[BUS_ID_SIZE]; 1541 1546 ··· 1548 1543 priv->oldspeed = 0; 1549 1544 priv->oldduplex = -1; 1550 1545 1551 - snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, priv->ug_info->mdio_bus, 1552 - priv->ug_info->phy_address); 1546 + ph = of_get_property(np, "phy-handle", NULL); 1547 + phy = of_find_node_by_phandle(*ph); 1548 + mdio = of_get_parent(phy); 1549 + 1550 + id = of_get_property(phy, "reg", NULL); 1551 + 1552 + of_node_put(phy); 1553 + of_node_put(mdio); 1554 + 1555 + uec_mdio_bus_name(bus_name, mdio); 1556 + snprintf(phy_id, sizeof(phy_id), "%s:%02x", 1557 + bus_name, *id); 1553 1558 1554 1559 phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); 1555 1560 ··· 3763 3748 3764 3749 ugeth->ug_info = ug_info; 3765 3750 ugeth->dev = dev; 3751 + ugeth->node = np; 3766 3752 3767 3753 return 0; 3768 3754 }
+2
drivers/net/ucc_geth.h
··· 1186 1186 int oldspeed; 1187 1187 int oldduplex; 1188 1188 int oldlink; 1189 + 1190 + struct device_node *node; 1189 1191 }; 1190 1192 1191 1193 void uec_set_ethtool_ops(struct net_device *netdev);
+11 -1
drivers/net/ucc_geth_mii.c
··· 156 156 if (err) 157 157 goto reg_map_fail; 158 158 159 - snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); 159 + uec_mdio_bus_name(new_bus->id, np); 160 160 161 161 new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); 162 162 ··· 283 283 { 284 284 of_unregister_platform_driver(&uec_mdio_driver); 285 285 } 286 + 287 + void uec_mdio_bus_name(char *name, struct device_node *np) 288 + { 289 + const u32 *reg; 290 + 291 + reg = of_get_property(np, "reg", NULL); 292 + 293 + snprintf(name, MII_BUS_ID_SIZE, "%s@%x", np->name, reg ? *reg : 0); 294 + } 295 +
+1
drivers/net/ucc_geth_mii.h
··· 97 97 int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); 98 98 int __init uec_mdio_init(void); 99 99 void uec_mdio_exit(void); 100 + void uec_mdio_bus_name(char *name, struct device_node *np); 100 101 #endif /* __UEC_MII_H */
+3 -3
drivers/net/virtio_net.c
··· 287 287 skb_put(skb, MAX_PACKET_LEN); 288 288 289 289 hdr = skb_vnet_hdr(skb); 290 - sg_init_one(sg, hdr, sizeof(*hdr)); 290 + sg_set_buf(sg, hdr, sizeof(*hdr)); 291 291 292 292 if (vi->big_packets) { 293 293 for (i = 0; i < MAX_SKB_FRAGS; i++) { ··· 488 488 489 489 /* Encode metadata header at front. */ 490 490 if (vi->mergeable_rx_bufs) 491 - sg_init_one(sg, mhdr, sizeof(*mhdr)); 491 + sg_set_buf(sg, mhdr, sizeof(*mhdr)); 492 492 else 493 - sg_init_one(sg, hdr, sizeof(*hdr)); 493 + sg_set_buf(sg, hdr, sizeof(*hdr)); 494 494 495 495 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; 496 496
-14
drivers/net/wimax/i2400m/debugfs.c
··· 234 234 &fops_i2400m_reset); 235 235 } 236 236 237 - /* 238 - * Debug levels control; see debug.h 239 - */ 240 - struct d_level D_LEVEL[] = { 241 - D_SUBMODULE_DEFINE(control), 242 - D_SUBMODULE_DEFINE(driver), 243 - D_SUBMODULE_DEFINE(debugfs), 244 - D_SUBMODULE_DEFINE(fw), 245 - D_SUBMODULE_DEFINE(netdev), 246 - D_SUBMODULE_DEFINE(rfkill), 247 - D_SUBMODULE_DEFINE(rx), 248 - D_SUBMODULE_DEFINE(tx), 249 - }; 250 - size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); 251 237 252 238 #define __debugfs_register(prefix, name, parent) \ 253 239 do { \
+16
drivers/net/wimax/i2400m/driver.c
··· 707 707 EXPORT_SYMBOL_GPL(i2400m_release); 708 708 709 709 710 + /* 711 + * Debug levels control; see debug.h 712 + */ 713 + struct d_level D_LEVEL[] = { 714 + D_SUBMODULE_DEFINE(control), 715 + D_SUBMODULE_DEFINE(driver), 716 + D_SUBMODULE_DEFINE(debugfs), 717 + D_SUBMODULE_DEFINE(fw), 718 + D_SUBMODULE_DEFINE(netdev), 719 + D_SUBMODULE_DEFINE(rfkill), 720 + D_SUBMODULE_DEFINE(rx), 721 + D_SUBMODULE_DEFINE(tx), 722 + }; 723 + size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); 724 + 725 + 710 726 static 711 727 int __init i2400m_driver_init(void) 712 728 {
+9 -1
drivers/net/wireless/ath5k/base.c
··· 1028 1028 * it's done by reseting the chip. To accomplish this we must 1029 1029 * first cleanup any pending DMA, then restart stuff after a la 1030 1030 * ath5k_init. 1031 + * 1032 + * Called with sc->lock. 1031 1033 */ 1032 1034 static int 1033 1035 ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) ··· 2816 2814 { 2817 2815 struct ath5k_softc *sc = hw->priv; 2818 2816 struct ieee80211_conf *conf = &hw->conf; 2817 + int ret; 2818 + 2819 + mutex_lock(&sc->lock); 2819 2820 2820 2821 sc->bintval = conf->beacon_int; 2821 2822 sc->power_level = conf->power_level; 2822 2823 2823 - return ath5k_chan_set(sc, conf->channel); 2824 + ret = ath5k_chan_set(sc, conf->channel); 2825 + 2826 + mutex_unlock(&sc->lock); 2827 + return ret; 2824 2828 } 2825 2829 2826 2830 static int
+4
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 1719 1719 priv->ucode_data_backup.len = data_size; 1720 1720 iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); 1721 1721 1722 + if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || 1723 + !priv->ucode_data_backup.v_addr) 1724 + goto err_pci_alloc; 1725 + 1722 1726 /* Initialization instructions and data */ 1723 1727 if (init_size && init_data_size) { 1724 1728 priv->ucode_init.len = init_size;
+8 -2
drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
··· 285 285 ofdm_power = priv->channels[channel - 1].hw_value >> 4; 286 286 287 287 cck_power = min(cck_power, (u8)11); 288 - ofdm_power = min(ofdm_power, (u8)35); 288 + if (ofdm_power > (u8)15) 289 + ofdm_power = 25; 290 + else 291 + ofdm_power += 10; 289 292 290 293 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, 291 294 rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); ··· 539 536 cck_power += priv->txpwr_base & 0xF; 540 537 cck_power = min(cck_power, (u8)35); 541 538 542 - ofdm_power = min(ofdm_power, (u8)15); 539 + if (ofdm_power > (u8)15) 540 + ofdm_power = 25; 541 + else 542 + ofdm_power += 10; 543 543 ofdm_power += priv->txpwr_base >> 4; 544 544 ofdm_power = min(ofdm_power, (u8)35); 545 545
+5 -1
drivers/pci/hotplug/Makefile
··· 5 5 obj-$(CONFIG_HOTPLUG_PCI) += pci_hotplug.o 6 6 obj-$(CONFIG_HOTPLUG_PCI_COMPAQ) += cpqphp.o 7 7 obj-$(CONFIG_HOTPLUG_PCI_IBM) += ibmphp.o 8 + 9 + # pciehp should be linked before acpiphp in order to allow the native driver 10 + # to attempt to bind first. We can then fall back to generic support. 11 + 12 + obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o 8 13 obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o 9 14 obj-$(CONFIG_HOTPLUG_PCI_ACPI_IBM) += acpiphp_ibm.o 10 15 obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o 11 16 obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o 12 - obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o 13 17 obj-$(CONFIG_HOTPLUG_PCI_SHPC) += shpchp.o 14 18 obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o 15 19 obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o
+26 -16
drivers/pci/hotplug/fakephp.c
··· 195 195 * Tries hard not to re-enable already existing devices; 196 196 * also handles scanning of subfunctions. 197 197 */ 198 - static void pci_rescan_slot(struct pci_dev *temp) 198 + static int pci_rescan_slot(struct pci_dev *temp) 199 199 { 200 200 struct pci_bus *bus = temp->bus; 201 201 struct pci_dev *dev; 202 202 int func; 203 - int retval; 204 203 u8 hdr_type; 204 + int count = 0; 205 205 206 206 if (!pci_read_config_byte(temp, PCI_HEADER_TYPE, &hdr_type)) { 207 207 temp->hdr_type = hdr_type & 0x7f; ··· 213 213 dbg("New device on %s function %x:%x\n", 214 214 bus->name, temp->devfn >> 3, 215 215 temp->devfn & 7); 216 - retval = pci_bus_add_device(dev); 217 - if (retval) 218 - dev_err(&dev->dev, "error adding " 219 - "device, continuing.\n"); 220 - else 221 - add_slot(dev); 216 + count++; 222 217 } 223 218 } 224 219 /* multifunction device? */ 225 220 if (!(hdr_type & 0x80)) 226 - return; 221 + return count; 227 222 228 223 /* continue scanning for other functions */ 229 224 for (func = 1, temp->devfn++; func < 8; func++, temp->devfn++) { ··· 234 239 dbg("New device on %s function %x:%x\n", 235 240 bus->name, temp->devfn >> 3, 236 241 temp->devfn & 7); 237 - retval = pci_bus_add_device(dev); 238 - if (retval) 239 - dev_err(&dev->dev, "error adding " 240 - "device, continuing.\n"); 241 - else 242 - add_slot(dev); 242 + count++; 243 243 } 244 244 } 245 245 } 246 246 } 247 + 248 + return count; 247 249 } 248 250 249 251 ··· 254 262 { 255 263 unsigned int devfn; 256 264 struct pci_dev *dev; 265 + int retval; 266 + int found = 0; 257 267 dev = alloc_pci_dev(); 258 268 if (!dev) 259 269 return; ··· 264 270 dev->sysdata = bus->sysdata; 265 271 for (devfn = 0; devfn < 0x100; devfn += 8) { 266 272 dev->devfn = devfn; 267 - pci_rescan_slot(dev); 273 + found += pci_rescan_slot(dev); 274 + } 275 + 276 + if (found) { 277 + pci_bus_assign_resources(bus); 278 + list_for_each_entry(dev, &bus->devices, bus_list) { 279 + /* Skip already-added devices */ 280 + if (dev->is_added) 281 + continue; 282 + retval = pci_bus_add_device(dev); 283 + if (retval) 284 + dev_err(&dev->dev, 285 + "Error adding device, continuing\n"); 286 + else 287 + add_slot(dev); 288 + } 289 + pci_bus_add_devices(bus); 268 290 } 269 291 kfree(dev); 270 292 }
+11 -2
drivers/pci/msi.c
··· 103 103 } 104 104 } 105 105 106 + /* 107 + * Essentially, this is ((1 << (1 << x)) - 1), but without the 108 + * undefinedness of a << 32. 109 + */ 110 + static inline __attribute_const__ u32 msi_mask(unsigned x) 111 + { 112 + static const u32 mask[] = { 1, 2, 4, 0xf, 0xff, 0xffff, 0xffffffff }; 113 + return mask[x]; 114 + } 115 + 106 116 static void msix_flush_writes(struct irq_desc *desc) 107 117 { 108 118 struct msi_desc *entry; ··· 417 407 418 408 /* All MSIs are unmasked by default, Mask them all */ 419 409 pci_read_config_dword(dev, base, &maskbits); 420 - temp = (1 << multi_msi_capable(control)); 421 - temp = ((temp - 1) & ~temp); 410 + temp = msi_mask((control & PCI_MSI_FLAGS_QMASK) >> 1); 422 411 maskbits |= temp; 423 412 pci_write_config_dword(dev, base, maskbits); 424 413 entry->msi_attrib.maskbits_mask = temp;
+20 -1
drivers/pci/pci-driver.c
··· 370 370 } 371 371 372 372 pci_save_state(pci_dev); 373 + pci_dev->state_saved = true; 373 374 /* 374 375 * This is for compatibility with existing code with legacy PM support. 375 376 */ ··· 420 419 static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev) 421 420 { 422 421 pci_restore_standard_config(pci_dev); 422 + pci_dev->state_saved = false; 423 423 pci_fixup_device(pci_fixup_resume_early, pci_dev); 424 424 } 425 425 ··· 557 555 struct device_driver *drv = dev->driver; 558 556 int error = 0; 559 557 558 + /* 559 + * This is necessary for the suspend error path in which resume is 560 + * called without restoring the standard config registers of the device. 561 + */ 562 + if (pci_dev->state_saved) 563 + pci_restore_standard_config(pci_dev); 564 + 560 565 if (pci_has_legacy_pm_support(pci_dev)) 561 566 return pci_legacy_resume(dev); 562 567 ··· 669 660 if (pci_has_legacy_pm_support(pci_dev)) 670 661 return pci_legacy_suspend(dev, PMSG_HIBERNATE); 671 662 672 - if (drv && drv->pm && drv->pm->poweroff) { 663 + if (!drv || !drv->pm) 664 + return 0; 665 + 666 + if (drv->pm->poweroff) { 673 667 error = drv->pm->poweroff(dev); 674 668 suspend_report_result(drv->pm->poweroff, error); 675 669 } ··· 721 709 struct pci_dev *pci_dev = to_pci_dev(dev); 722 710 struct device_driver *drv = dev->driver; 723 711 int error = 0; 712 + 713 + /* 714 + * This is necessary for the hibernation error path in which restore is 715 + * called without restoring the standard config registers of the device. 716 + */ 717 + if (pci_dev->state_saved) 718 + pci_restore_standard_config(pci_dev); 724 719 725 720 if (pci_has_legacy_pm_support(pci_dev)) 726 721 return pci_legacy_resume(dev);
+16 -16
drivers/pci/pci.c
··· 1393 1393 pci_power_t prev_state; 1394 1394 int error; 1395 1395 1396 - pci_restore_state(dev); 1397 1396 pci_update_current_state(dev, PCI_D0); 1398 1397 1399 1398 prev_state = dev->current_state; 1400 1399 if (prev_state == PCI_D0) 1401 - return 0; 1400 + goto Restore; 1402 1401 1403 1402 error = pci_raw_set_power_state(dev, PCI_D0, false); 1404 1403 if (error) 1405 1404 return error; 1406 1405 1407 - if (pci_is_bridge(dev)) { 1408 - if (prev_state > PCI_D1) 1409 - mdelay(PCI_PM_BUS_WAIT); 1410 - } else { 1411 - switch(prev_state) { 1412 - case PCI_D3cold: 1413 - case PCI_D3hot: 1414 - mdelay(pci_pm_d3_delay); 1415 - break; 1416 - case PCI_D2: 1417 - udelay(PCI_PM_D2_DELAY); 1418 - break; 1419 - } 1406 + /* 1407 + * This assumes that we won't get a bus in B2 or B3 from the BIOS, but 1408 + * we've made this assumption forever and it appears to be universally 1409 + * satisfied. 1410 + */ 1411 + switch(prev_state) { 1412 + case PCI_D3cold: 1413 + case PCI_D3hot: 1414 + mdelay(pci_pm_d3_delay); 1415 + break; 1416 + case PCI_D2: 1417 + udelay(PCI_PM_D2_DELAY); 1418 + break; 1420 1419 } 1421 1420 1422 1421 dev->current_state = PCI_D0; 1423 1422 1424 - return 0; 1423 + Restore: 1424 + return pci_restore_state(dev); 1425 1425 } 1426 1426 1427 1427 /**
+1 -5
drivers/regulator/bq24022.c
··· 152 152 platform_driver_unregister(&bq24022_driver); 153 153 } 154 154 155 - /* 156 - * make sure this is probed before gpio_vbus and pda_power, 157 - * but after asic3 or other GPIO expander drivers. 158 - */ 159 - subsys_initcall(bq24022_init); 155 + module_init(bq24022_init); 160 156 module_exit(bq24022_exit); 161 157 162 158 MODULE_AUTHOR("Philipp Zabel");
+1 -1
drivers/regulator/wm8350-regulator.c
··· 1435 1435 struct platform_device *pdev; 1436 1436 int ret; 1437 1437 1438 - if (lednum > ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { 1438 + if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { 1439 1439 dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); 1440 1440 return -ENODEV; 1441 1441 }
+6
drivers/serial/jsm/jsm_tty.c
··· 161 161 channel->ch_bd->bd_ops->disable_receiver(channel); 162 162 } 163 163 164 + static void jsm_tty_enable_ms(struct uart_port *port) 165 + { 166 + /* Nothing needed */ 167 + } 168 + 164 169 static void jsm_tty_break(struct uart_port *port, int break_state) 165 170 { 166 171 unsigned long lock_flags; ··· 350 345 .start_tx = jsm_tty_start_tx, 351 346 .send_xchar = jsm_tty_send_xchar, 352 347 .stop_rx = jsm_tty_stop_rx, 348 + .enable_ms = jsm_tty_enable_ms, 353 349 .break_ctl = jsm_tty_break, 354 350 .startup = jsm_tty_open, 355 351 .shutdown = jsm_tty_close,
+7 -2
drivers/usb/host/whci/asl.c
··· 170 170 void asl_update(struct whc *whc, uint32_t wusbcmd) 171 171 { 172 172 struct wusbhc *wusbhc = &whc->wusbhc; 173 + long t; 173 174 174 175 mutex_lock(&wusbhc->mutex); 175 176 if (wusbhc->active) { 176 177 whc_write_wusbcmd(whc, wusbcmd, wusbcmd); 177 - wait_event(whc->async_list_wq, 178 - (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0); 178 + t = wait_event_timeout( 179 + whc->async_list_wq, 180 + (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0, 181 + msecs_to_jiffies(1000)); 182 + if (t == 0) 183 + whc_hw_error(whc, "ASL update timeout"); 179 184 } 180 185 mutex_unlock(&wusbhc->mutex); 181 186 }
+15
drivers/usb/host/whci/hw.c
··· 87 87 88 88 return ret; 89 89 } 90 + 91 + /** 92 + * whc_hw_error - recover from a hardware error 93 + * @whc: the WHCI HC that broke. 94 + * @reason: a description of the failure. 95 + * 96 + * Recover from broken hardware with a full reset. 97 + */ 98 + void whc_hw_error(struct whc *whc, const char *reason) 99 + { 100 + struct wusbhc *wusbhc = &whc->wusbhc; 101 + 102 + dev_err(&whc->umc->dev, "hardware error: %s\n", reason); 103 + wusbhc_reset_all(wusbhc); 104 + }
+7 -2
drivers/usb/host/whci/pzl.c
··· 183 183 void pzl_update(struct whc *whc, uint32_t wusbcmd) 184 184 { 185 185 struct wusbhc *wusbhc = &whc->wusbhc; 186 + long t; 186 187 187 188 mutex_lock(&wusbhc->mutex); 188 189 if (wusbhc->active) { 189 190 whc_write_wusbcmd(whc, wusbcmd, wusbcmd); 190 - wait_event(whc->periodic_list_wq, 191 - (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0); 191 + t = wait_event_timeout( 192 + whc->periodic_list_wq, 193 + (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0, 194 + msecs_to_jiffies(1000)); 195 + if (t == 0) 196 + whc_hw_error(whc, "PZL update timeout"); 192 197 } 193 198 mutex_unlock(&wusbhc->mutex); 194 199 }
+1
drivers/usb/host/whci/whcd.h
··· 137 137 /* hw.c */ 138 138 void whc_write_wusbcmd(struct whc *whc, u32 mask, u32 val); 139 139 int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len); 140 + void whc_hw_error(struct whc *whc, const char *reason); 140 141 141 142 /* wusb.c */ 142 143 int whc_wusbhc_start(struct wusbhc *wusbhc);
+1
drivers/usb/wusbcore/devconnect.c
··· 386 386 | USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED); 387 387 port->change |= USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE; 388 388 if (wusb_dev) { 389 + dev_dbg(wusbhc->dev, "disconnecting device from port %d\n", wusb_dev->port_idx); 389 390 if (!list_empty(&wusb_dev->cack_node)) 390 391 list_del_init(&wusb_dev->cack_node); 391 392 /* For the one in cack_add() */
+3
drivers/usb/wusbcore/rh.c
··· 100 100 struct wusb_port *port = wusb_port_by_idx(wusbhc, port_idx); 101 101 struct wusb_dev *wusb_dev = port->wusb_dev; 102 102 103 + if (wusb_dev == NULL) 104 + return -ENOTCONN; 105 + 103 106 port->status |= USB_PORT_STAT_RESET; 104 107 port->change |= USB_PORT_STAT_C_RESET; 105 108
-1
drivers/uwb/allocator.c
··· 15 15 * You should have received a copy of the GNU General Public License 16 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 17 */ 18 - #include <linux/version.h> 19 18 #include <linux/kernel.h> 20 19 #include <linux/uwb.h> 21 20
+2 -2
drivers/uwb/drp.c
··· 66 66 } else 67 67 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); 68 68 69 - spin_lock(&rc->rsvs_lock); 69 + spin_lock_bh(&rc->rsvs_lock); 70 70 if (rc->set_drp_ie_pending > 1) { 71 71 rc->set_drp_ie_pending = 0; 72 72 uwb_rsv_queue_update(rc); 73 73 } else { 74 74 rc->set_drp_ie_pending = 0; 75 75 } 76 - spin_unlock(&rc->rsvs_lock); 76 + spin_unlock_bh(&rc->rsvs_lock); 77 77 } 78 78 79 79 /**
+15 -6
drivers/uwb/rsv.c
··· 114 114 devaddr = rsv->target.devaddr; 115 115 uwb_dev_addr_print(target, sizeof(target), &devaddr); 116 116 117 - dev_dbg(dev, "rsv %s -> %s: %s\n", owner, target, uwb_rsv_state_str(rsv->state)); 117 + dev_dbg(dev, "rsv %s %s -> %s: %s\n", 118 + text, owner, target, uwb_rsv_state_str(rsv->state)); 118 119 } 119 120 120 121 static void uwb_rsv_release(struct kref *kref) ··· 512 511 513 512 if (uwb_rsv_is_owner(rsv)) 514 513 uwb_rsv_put_stream(rsv); 515 - 516 - del_timer_sync(&rsv->timer); 514 + 517 515 uwb_dev_put(rsv->owner); 518 516 if (rsv->target.type == UWB_RSV_TARGET_DEV) 519 517 uwb_dev_put(rsv->target.dev); ··· 870 870 */ 871 871 void uwb_rsv_sched_update(struct uwb_rc *rc) 872 872 { 873 - spin_lock(&rc->rsvs_lock); 873 + spin_lock_bh(&rc->rsvs_lock); 874 874 if (!delayed_work_pending(&rc->rsv_update_work)) { 875 875 if (rc->set_drp_ie_pending > 0) { 876 876 rc->set_drp_ie_pending++; ··· 879 879 uwb_rsv_queue_update(rc); 880 880 } 881 881 unlock: 882 - spin_unlock(&rc->rsvs_lock); 882 + spin_unlock_bh(&rc->rsvs_lock); 883 883 } 884 884 885 885 /* ··· 943 943 944 944 mutex_lock(&rc->rsvs_mutex); 945 945 list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) { 946 - uwb_rsv_remove(rsv); 946 + if (rsv->state != UWB_RSV_STATE_NONE) 947 + uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE); 948 + del_timer_sync(&rsv->timer); 947 949 } 948 950 /* Cancel any postponed update. */ 949 951 rc->set_drp_ie_pending = 0; 950 952 mutex_unlock(&rc->rsvs_mutex); 951 953 952 954 cancel_delayed_work_sync(&rc->rsv_update_work); 955 + flush_workqueue(rc->rsv_workq); 956 + 957 + mutex_lock(&rc->rsvs_mutex); 958 + list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) { 959 + uwb_rsv_remove(rsv); 960 + } 961 + mutex_unlock(&rc->rsvs_mutex); 953 962 } 954 963 955 964 void uwb_rsv_init(struct uwb_rc *rc)
+11
drivers/video/aty/mach64_ct.c
··· 8 8 #include <asm/io.h> 9 9 #include <video/mach64.h> 10 10 #include "atyfb.h" 11 + #ifdef CONFIG_PPC 12 + #include <asm/machdep.h> 13 + #endif 11 14 12 15 #undef DEBUG 13 16 ··· 538 535 } 539 536 pll->ct.xclk_post_div_real = postdividers[xpost_div]; 540 537 pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; 538 + 539 + #ifdef CONFIG_PPC 540 + if (machine_is(powermac)) { 541 + /* Override PLL_EXT_CNTL & 0x07. */ 542 + pll->ct.xclk_post_div = xpost_div; 543 + pll->ct.xclk_ref_div = 1; 544 + } 545 + #endif 541 546 542 547 #ifdef DEBUG 543 548 pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
+1 -1
drivers/virtio/virtio_pci.c
··· 192 192 drv = container_of(vp_dev->vdev.dev.driver, 193 193 struct virtio_driver, driver); 194 194 195 - if (drv->config_changed) 195 + if (drv && drv->config_changed) 196 196 drv->config_changed(&vp_dev->vdev); 197 197 } 198 198
+32 -1
drivers/xen/balloon.c
··· 498 498 if (!capable(CAP_SYS_ADMIN)) 499 499 return -EPERM; 500 500 501 - target_bytes = memparse(buf, &endchar); 501 + target_bytes = simple_strtoull(buf, &endchar, 0) * 1024; 502 502 503 503 balloon_set_new_target(target_bytes >> PAGE_SHIFT); 504 504 ··· 508 508 static SYSDEV_ATTR(target_kb, S_IRUGO | S_IWUSR, 509 509 show_target_kb, store_target_kb); 510 510 511 + 512 + static ssize_t show_target(struct sys_device *dev, struct sysdev_attribute *attr, 513 + char *buf) 514 + { 515 + return sprintf(buf, "%llu\n", 516 + (u64)balloon_stats.target_pages << PAGE_SHIFT); 517 + } 518 + 519 + static ssize_t store_target(struct sys_device *dev, 520 + struct sysdev_attribute *attr, 521 + const char *buf, 522 + size_t count) 523 + { 524 + char *endchar; 525 + unsigned long long target_bytes; 526 + 527 + if (!capable(CAP_SYS_ADMIN)) 528 + return -EPERM; 529 + 530 + target_bytes = memparse(buf, &endchar); 531 + 532 + balloon_set_new_target(target_bytes >> PAGE_SHIFT); 533 + 534 + return count; 535 + } 536 + 537 + static SYSDEV_ATTR(target, S_IRUGO | S_IWUSR, 538 + show_target, store_target); 539 + 540 + 511 541 static struct sysdev_attribute *balloon_attrs[] = { 512 542 &attr_target_kb, 543 + &attr_target, 513 544 }; 514 545 515 546 static struct attribute *balloon_info_attrs[] = {
+15 -11
fs/bio-integrity.c
··· 140 140 141 141 iv = bip_vec_idx(bip, bip->bip_vcnt); 142 142 BUG_ON(iv == NULL); 143 - BUG_ON(iv->bv_page != NULL); 144 143 145 144 iv->bv_page = page; 146 145 iv->bv_len = len; ··· 464 465 465 466 if (ret) { 466 467 kunmap_atomic(kaddr, KM_USER0); 467 - break; 468 + return ret; 468 469 } 469 470 470 471 sectors = bv->bv_len / bi->sector_size; ··· 492 493 struct bio_integrity_payload *bip = 493 494 container_of(work, struct bio_integrity_payload, bip_work); 494 495 struct bio *bio = bip->bip_bio; 495 - int error = bip->bip_error; 496 + int error; 496 497 497 - if (bio_integrity_verify(bio)) { 498 - clear_bit(BIO_UPTODATE, &bio->bi_flags); 499 - error = -EIO; 500 - } 498 + error = bio_integrity_verify(bio); 501 499 502 500 /* Restore original bio completion handler */ 503 501 bio->bi_end_io = bip->bip_end_io; 504 - 505 - if (bio->bi_end_io) 506 - bio->bi_end_io(bio, error); 502 + bio_endio(bio, error); 507 503 } 508 504 509 505 /** ··· 519 525 520 526 BUG_ON(bip->bip_bio != bio); 521 527 522 - bip->bip_error = error; 528 + /* In case of an I/O error there is no point in verifying the 529 + * integrity metadata. Restore original bio end_io handler 530 + * and run it. 531 + */ 532 + if (error) { 533 + bio->bi_end_io = bip->bip_end_io; 534 + bio_endio(bio, error); 535 + 536 + return; 537 + } 538 + 523 539 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); 524 540 queue_work(kintegrityd_wq, &bip->bip_work); 525 541 }
+7
fs/compat_ioctl.c
··· 538 538 * cannot be fixed without breaking all existing apps. 539 539 */ 540 540 case TUNSETIFF: 541 + case TUNGETIFF: 541 542 case SIOCGIFFLAGS: 542 543 case SIOCGIFMETRIC: 543 544 case SIOCGIFMTU: ··· 1983 1982 COMPATIBLE_IOCTL(TUNSETDEBUG) 1984 1983 COMPATIBLE_IOCTL(TUNSETPERSIST) 1985 1984 COMPATIBLE_IOCTL(TUNSETOWNER) 1985 + COMPATIBLE_IOCTL(TUNSETLINK) 1986 + COMPATIBLE_IOCTL(TUNSETGROUP) 1987 + COMPATIBLE_IOCTL(TUNGETFEATURES) 1988 + COMPATIBLE_IOCTL(TUNSETOFFLOAD) 1989 + COMPATIBLE_IOCTL(TUNSETTXFILTER) 1986 1990 /* Big V */ 1987 1991 COMPATIBLE_IOCTL(VT_SETMODE) 1988 1992 COMPATIBLE_IOCTL(VT_GETMODE) ··· 2579 2573 HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc) 2580 2574 HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc) 2581 2575 HANDLE_IOCTL(TUNSETIFF, dev_ifsioc) 2576 + HANDLE_IOCTL(TUNGETIFF, dev_ifsioc) 2582 2577 HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl) 2583 2578 HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl) 2584 2579 HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
+14 -6
fs/ext3/namei.c
··· 1358 1358 struct fake_dirent *fde; 1359 1359 1360 1360 blocksize = dir->i_sb->s_blocksize; 1361 - dxtrace(printk("Creating index\n")); 1361 + dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); 1362 1362 retval = ext3_journal_get_write_access(handle, bh); 1363 1363 if (retval) { 1364 1364 ext3_std_error(dir->i_sb, retval); ··· 1366 1366 return retval; 1367 1367 } 1368 1368 root = (struct dx_root *) bh->b_data; 1369 + 1370 + /* The 0th block becomes the root, move the dirents out */ 1371 + fde = &root->dotdot; 1372 + de = (struct ext3_dir_entry_2 *)((char *)fde + 1373 + ext3_rec_len_from_disk(fde->rec_len)); 1374 + if ((char *) de >= (((char *) root) + blocksize)) { 1375 + ext3_error(dir->i_sb, __func__, 1376 + "invalid rec_len for '..' in inode %lu", 1377 + dir->i_ino); 1378 + brelse(bh); 1379 + return -EIO; 1380 + } 1381 + len = ((char *) root) + blocksize - (char *) de; 1369 1382 1370 1383 bh2 = ext3_append (handle, dir, &block, &retval); 1371 1384 if (!(bh2)) { ··· 1388 1375 EXT3_I(dir)->i_flags |= EXT3_INDEX_FL; 1389 1376 data1 = bh2->b_data; 1390 1377 1391 - /* The 0th block becomes the root, move the dirents out */ 1392 - fde = &root->dotdot; 1393 - de = (struct ext3_dir_entry_2 *)((char *)fde + 1394 - ext3_rec_len_from_disk(fde->rec_len)); 1395 - len = ((char *) root) + blocksize - (char *) de; 1396 1378 memcpy (data1, de, len); 1397 1379 de = (struct ext3_dir_entry_2 *) data1; 1398 1380 top = data1 + len;
+3 -3
fs/ext4/balloc.c
··· 684 684 gdp = ext4_get_group_desc(sb, i, NULL); 685 685 if (!gdp) 686 686 continue; 687 - desc_count += le16_to_cpu(gdp->bg_free_blocks_count); 687 + desc_count += ext4_free_blks_count(sb, gdp); 688 688 brelse(bitmap_bh); 689 689 bitmap_bh = ext4_read_block_bitmap(sb, i); 690 690 if (bitmap_bh == NULL) 691 691 continue; 692 692 693 693 x = ext4_count_free(bitmap_bh, sb->s_blocksize); 694 - printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n", 695 - i, le16_to_cpu(gdp->bg_free_blocks_count), x); 694 + printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n", 695 + i, ext4_free_blks_count(sb, gdp), x); 696 696 bitmap_count += x; 697 697 } 698 698 brelse(bitmap_bh);
+5 -2
fs/ext4/ext4.h
··· 1206 1206 1207 1207 static inline loff_t ext4_isize(struct ext4_inode *raw_inode) 1208 1208 { 1209 - return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | 1210 - le32_to_cpu(raw_inode->i_size_lo); 1209 + if (S_ISREG(le16_to_cpu(raw_inode->i_mode))) 1210 + return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | 1211 + le32_to_cpu(raw_inode->i_size_lo); 1212 + else 1213 + return (loff_t) le32_to_cpu(raw_inode->i_size_lo); 1211 1214 } 1212 1215 1213 1216 static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
+1 -1
fs/ext4/extents.c
··· 3048 3048 WARN_ON(ret <= 0); 3049 3049 printk(KERN_ERR "%s: ext4_ext_get_blocks " 3050 3050 "returned error inode#%lu, block=%u, " 3051 - "max_blocks=%lu", __func__, 3051 + "max_blocks=%u", __func__, 3052 3052 inode->i_ino, block, max_blocks); 3053 3053 #endif 3054 3054 ext4_mark_inode_dirty(handle, inode);
+3 -6
fs/ext4/inode.c
··· 360 360 final = ptrs; 361 361 } else { 362 362 ext4_warning(inode->i_sb, "ext4_block_to_path", 363 - "block %lu > max", 363 + "block %lu > max in inode %lu", 364 364 i_block + direct_blocks + 365 - indirect_blocks + double_blocks); 365 + indirect_blocks + double_blocks, inode->i_ino); 366 366 } 367 367 if (boundary) 368 368 *boundary = final - 1 - (i_block & (ptrs - 1)); ··· 2821 2821 filemap_write_and_wait(mapping); 2822 2822 } 2823 2823 2824 - BUG_ON(!EXT4_JOURNAL(inode) && 2825 - EXT4_I(inode)->i_state & EXT4_STATE_JDATA); 2826 - 2827 2824 if (EXT4_JOURNAL(inode) && EXT4_I(inode)->i_state & EXT4_STATE_JDATA) { 2828 2825 /* 2829 2826 * This is a REALLY heavyweight approach, but the use of ··· 3619 3622 * block pointed to itself, it would have been detached when 3620 3623 * the block was cleared. Check for this instead of OOPSing. 3621 3624 */ 3622 - if (bh2jh(this_bh)) 3625 + if ((EXT4_JOURNAL(inode) == NULL) || bh2jh(this_bh)) 3623 3626 ext4_handle_dirty_metadata(handle, inode, this_bh); 3624 3627 else 3625 3628 ext4_error(inode->i_sb, __func__,
+1 -1
fs/ext4/mballoc.c
··· 3025 3025 goto out_err; 3026 3026 3027 3027 ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, 3028 - gdp->bg_free_blocks_count); 3028 + ext4_free_blks_count(sb, gdp)); 3029 3029 3030 3030 err = ext4_journal_get_write_access(handle, gdp_bh); 3031 3031 if (err)
+15 -6
fs/ext4/namei.c
··· 1368 1368 struct fake_dirent *fde; 1369 1369 1370 1370 blocksize = dir->i_sb->s_blocksize; 1371 - dxtrace(printk(KERN_DEBUG "Creating index\n")); 1371 + dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); 1372 1372 retval = ext4_journal_get_write_access(handle, bh); 1373 1373 if (retval) { 1374 1374 ext4_std_error(dir->i_sb, retval); ··· 1377 1377 } 1378 1378 root = (struct dx_root *) bh->b_data; 1379 1379 1380 + /* The 0th block becomes the root, move the dirents out */ 1381 + fde = &root->dotdot; 1382 + de = (struct ext4_dir_entry_2 *)((char *)fde + 1383 + ext4_rec_len_from_disk(fde->rec_len)); 1384 + if ((char *) de >= (((char *) root) + blocksize)) { 1385 + ext4_error(dir->i_sb, __func__, 1386 + "invalid rec_len for '..' in inode %lu", 1387 + dir->i_ino); 1388 + brelse(bh); 1389 + return -EIO; 1390 + } 1391 + len = ((char *) root) + blocksize - (char *) de; 1392 + 1393 + /* Allocate new block for the 0th block's dirents */ 1380 1394 bh2 = ext4_append(handle, dir, &block, &retval); 1381 1395 if (!(bh2)) { 1382 1396 brelse(bh); ··· 1399 1385 EXT4_I(dir)->i_flags |= EXT4_INDEX_FL; 1400 1386 data1 = bh2->b_data; 1401 1387 1402 - /* The 0th block becomes the root, move the dirents out */ 1403 - fde = &root->dotdot; 1404 - de = (struct ext4_dir_entry_2 *)((char *)fde + 1405 - ext4_rec_len_from_disk(fde->rec_len)); 1406 - len = ((char *) root) + blocksize - (char *) de; 1407 1388 memcpy (data1, de, len); 1408 1389 de = (struct ext4_dir_entry_2 *) data1; 1409 1390 top = data1 + len;
+2 -1
fs/ext4/resize.c
··· 861 861 gdp = (struct ext4_group_desc *)((char *)primary->b_data + 862 862 gdb_off * EXT4_DESC_SIZE(sb)); 863 863 864 + memset(gdp, 0, EXT4_DESC_SIZE(sb)); 864 865 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ 865 866 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ 866 867 ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */ 867 868 ext4_free_blks_set(sb, gdp, input->free_blocks_count); 868 869 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); 869 - gdp->bg_flags |= cpu_to_le16(EXT4_BG_INODE_ZEROED); 870 + gdp->bg_flags = cpu_to_le16(EXT4_BG_INODE_ZEROED); 870 871 gdp->bg_checksum = ext4_group_desc_csum(sbi, input->group, gdp); 871 872 872 873 /*
+3 -3
fs/jbd2/journal.c
··· 37 37 #include <linux/proc_fs.h> 38 38 #include <linux/debugfs.h> 39 39 #include <linux/seq_file.h> 40 + #include <linux/math64.h> 40 41 41 42 #include <asm/uaccess.h> 42 43 #include <asm/page.h> 43 - #include <asm/div64.h> 44 44 45 45 EXPORT_SYMBOL(jbd2_journal_start); 46 46 EXPORT_SYMBOL(jbd2_journal_restart); ··· 846 846 jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid)); 847 847 seq_printf(seq, " %ums logging transaction\n", 848 848 jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid)); 849 - seq_printf(seq, " %luus average transaction commit time\n", 850 - do_div(s->journal->j_average_commit_time, 1000)); 849 + seq_printf(seq, " %lluus average transaction commit time\n", 850 + div_u64(s->journal->j_average_commit_time, 1000)); 851 851 seq_printf(seq, " %lu handles per transaction\n", 852 852 s->stats->u.run.rs_handle_count / s->stats->ts_tid); 853 853 seq_printf(seq, " %lu blocks per transaction\n",
+1
include/linux/Kbuild
··· 41 41 header-y += bfs_fs.h 42 42 header-y += blkpg.h 43 43 header-y += bpqether.h 44 + header-y += bsg.h 44 45 header-y += can.h 45 46 header-y += cdk.h 46 47 header-y += chio.h
+1
include/linux/aio_abi.h
··· 27 27 #ifndef __LINUX__AIO_ABI_H 28 28 #define __LINUX__AIO_ABI_H 29 29 30 + #include <linux/types.h> 30 31 #include <asm/byteorder.h> 31 32 32 33 typedef unsigned long aio_context_t;
+1
include/linux/atalk.h
··· 1 1 #ifndef __LINUX_ATALK_H__ 2 2 #define __LINUX_ATALK_H__ 3 3 4 + #include <linux/types.h> 4 5 #include <asm/byteorder.h> 5 6 6 7 /*
+1
include/linux/atmbr2684.h
··· 1 1 #ifndef _LINUX_ATMBR2684_H 2 2 #define _LINUX_ATMBR2684_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/atm.h> 5 6 #include <linux/if.h> /* For IFNAMSIZ */ 6 7
+1
include/linux/auto_fs4.h
··· 12 12 #define _LINUX_AUTO_FS4_H 13 13 14 14 /* Include common v3 definitions */ 15 + #include <linux/types.h> 15 16 #include <linux/auto_fs.h> 16 17 17 18 /* autofs v4 definitions */
+2 -1
include/linux/bfs_fs.h
··· 6 6 #ifndef _LINUX_BFS_FS_H 7 7 #define _LINUX_BFS_FS_H 8 8 9 + #include <linux/types.h> 10 + 9 11 #define BFS_BSIZE_BITS 9 10 12 #define BFS_BSIZE (1<<BFS_BSIZE_BITS) 11 13 ··· 18 16 /* SVR4 vnode type values (bfs_inode->i_vtype) */ 19 17 #define BFS_VDIR 2L 20 18 #define BFS_VREG 1L 21 - 22 19 23 20 /* BFS inode layout on disk */ 24 21 struct bfs_inode {
+34 -21
include/linux/bio.h
··· 144 144 * bit 1 -- rw-ahead when set 145 145 * bit 2 -- barrier 146 146 * Insert a serialization point in the IO queue, forcing previously 147 - * submitted IO to be completed before this oen is issued. 147 + * submitted IO to be completed before this one is issued. 148 148 * bit 3 -- synchronous I/O hint: the block layer will unplug immediately 149 149 * Note that this does NOT indicate that the IO itself is sync, just 150 150 * that the block layer will not postpone issue of this IO by plugging. ··· 163 163 #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ 164 164 #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ 165 165 #define BIO_RW_BARRIER 2 166 - #define BIO_RW_SYNC 3 167 - #define BIO_RW_META 4 168 - #define BIO_RW_DISCARD 5 169 - #define BIO_RW_FAILFAST_DEV 6 170 - #define BIO_RW_FAILFAST_TRANSPORT 7 171 - #define BIO_RW_FAILFAST_DRIVER 8 166 + #define BIO_RW_SYNCIO 3 167 + #define BIO_RW_UNPLUG 4 168 + #define BIO_RW_META 5 169 + #define BIO_RW_DISCARD 6 170 + #define BIO_RW_FAILFAST_DEV 7 171 + #define BIO_RW_FAILFAST_TRANSPORT 8 172 + #define BIO_RW_FAILFAST_DRIVER 9 173 + 174 + #define BIO_RW_SYNC (BIO_RW_SYNCIO | BIO_RW_UNPLUG) 175 + 176 + #define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) 177 + 178 + /* 179 + * Old defines, these should eventually be replaced by direct usage of 180 + * bio_rw_flagged() 181 + */ 182 + #define bio_barrier(bio) bio_rw_flagged(bio, BIO_RW_BARRIER) 183 + #define bio_sync(bio) bio_rw_flagged(bio, BIO_RW_SYNCIO) 184 + #define bio_unplug(bio) bio_rw_flagged(bio, BIO_RW_UNPLUG) 185 + #define bio_failfast_dev(bio) bio_rw_flagged(bio, BIO_RW_FAILFAST_DEV) 186 + #define bio_failfast_transport(bio) \ 187 + bio_rw_flagged(bio, BIO_RW_FAILFAST_TRANSPORT) 188 + #define bio_failfast_driver(bio) \ 189 + bio_rw_flagged(bio, BIO_RW_FAILFAST_DRIVER) 190 + #define bio_rw_ahead(bio) bio_rw_flagged(bio, BIO_RW_AHEAD) 191 + #define bio_rw_meta(bio) bio_rw_flagged(bio, BIO_RW_META) 192 + #define bio_discard(bio) bio_rw_flagged(bio, BIO_RW_DISCARD) 172 193 173 194 /* 174 195 * upper 16 bits of bi_rw define the io priority of this bio ··· 214 193 #define bio_offset(bio) bio_iovec((bio))->bv_offset 215 194 #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) 216 195 #define bio_sectors(bio) ((bio)->bi_size >> 9) 217 - #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) 218 - #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) 219 - #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) 220 - #define bio_failfast_transport(bio) \ 221 - ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) 222 - #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) 223 - #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) 224 - #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) 225 - #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) 226 196 #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) 227 197 228 198 static inline unsigned int bio_cur_sectors(struct bio *bio) ··· 324 312 void *bip_buf; /* generated integrity data */ 325 313 bio_end_io_t *bip_end_io; /* saved I/O completion fn */ 326 314 327 - int bip_error; /* saved I/O error */ 328 315 unsigned int bip_size; 329 316 330 317 unsigned short bip_pool; /* pool the ivec came from */ ··· 451 440 452 441 #ifdef CONFIG_HIGHMEM 453 442 /* 454 - * remember to add offset! and never ever reenable interrupts between a 455 - * bvec_kmap_irq and bvec_kunmap_irq!! 443 + * remember never ever reenable interrupts between a bvec_kmap_irq and 444 + * bvec_kunmap_irq! 456 445 * 457 446 * This function MUST be inlined - it plays with the CPU interrupt flags. 458 447 */ 459 - static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) 448 + static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec, 449 + unsigned long *flags) 460 450 { 461 451 unsigned long addr; 462 452 ··· 473 461 return (char *) addr + bvec->bv_offset; 474 462 } 475 463 476 - static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags) 464 + static __always_inline void bvec_kunmap_irq(char *buffer, 465 + unsigned long *flags) 477 466 { 478 467 unsigned long ptr = (unsigned long) buffer & PAGE_MASK; 479 468
+8
include/linux/blkdev.h
··· 108 108 __REQ_RW_META, /* metadata io request */ 109 109 __REQ_COPY_USER, /* contains copies of user pages */ 110 110 __REQ_INTEGRITY, /* integrity metadata has been remapped */ 111 + __REQ_UNPLUG, /* unplug queue on submission */ 111 112 __REQ_NR_BITS, /* stops here */ 112 113 }; 113 114 ··· 135 134 #define REQ_RW_META (1 << __REQ_RW_META) 136 135 #define REQ_COPY_USER (1 << __REQ_COPY_USER) 137 136 #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) 137 + #define REQ_UNPLUG (1 << __REQ_UNPLUG) 138 138 139 139 #define BLK_MAX_CDB 16 140 140 ··· 451 449 #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ 452 450 #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ 453 451 #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ 452 + #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ 453 + 454 + #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ 455 + (1 << QUEUE_FLAG_CLUSTER) | \ 456 + (1 << QUEUE_FLAG_STACKABLE)) 454 457 455 458 static inline int queue_is_locked(struct request_queue *q) 456 459 { ··· 572 565 #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) 573 566 #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) 574 567 #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) 568 + #define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags) 575 569 #define blk_queue_flushing(q) ((q)->ordseq) 576 570 #define blk_queue_stackable(q) \ 577 571 test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags)
+1
include/linux/blktrace_api.h
··· 1 1 #ifndef BLKTRACE_H 2 2 #define BLKTRACE_H 3 3 4 + #include <linux/types.h> 4 5 #ifdef __KERNEL__ 5 6 #include <linux/blkdev.h> 6 7 #include <linux/relay.h>
+2
include/linux/can/bcm.h
··· 14 14 #ifndef CAN_BCM_H 15 15 #define CAN_BCM_H 16 16 17 + #include <linux/types.h> 18 + 17 19 /** 18 20 * struct bcm_msg_head - head of messages to/from the broadcast manager 19 21 * @opcode: opcode, see enum below.
+4 -4
include/linux/capability.h
··· 69 69 #define VFS_CAP_U32 VFS_CAP_U32_2 70 70 #define VFS_CAP_REVISION VFS_CAP_REVISION_2 71 71 72 - #ifdef CONFIG_SECURITY_FILE_CAPABILITIES 73 - extern int file_caps_enabled; 74 - #endif 75 - 76 72 struct vfs_cap_data { 77 73 __le32 magic_etc; /* Little endian */ 78 74 struct { ··· 91 95 92 96 #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 93 97 #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 98 + 99 + #ifdef CONFIG_SECURITY_FILE_CAPABILITIES 100 + extern int file_caps_enabled; 101 + #endif 94 102 95 103 typedef struct kernel_cap_struct { 96 104 __u32 cap[_KERNEL_CAPABILITY_U32S];
+1
include/linux/cdrom.h
··· 11 11 #ifndef _LINUX_CDROM_H 12 12 #define _LINUX_CDROM_H 13 13 14 + #include <linux/types.h> 14 15 #include <asm/byteorder.h> 15 16 16 17 /*******************************************************
+1
include/linux/cgroupstats.h
··· 15 15 #ifndef _LINUX_CGROUPSTATS_H 16 16 #define _LINUX_CGROUPSTATS_H 17 17 18 + #include <linux/types.h> 18 19 #include <linux/taskstats.h> 19 20 20 21 /*
+1
include/linux/clockchips.h
··· 36 36 CLOCK_EVT_NOTIFY_BROADCAST_EXIT, 37 37 CLOCK_EVT_NOTIFY_SUSPEND, 38 38 CLOCK_EVT_NOTIFY_RESUME, 39 + CLOCK_EVT_NOTIFY_CPU_DYING, 39 40 CLOCK_EVT_NOTIFY_CPU_DEAD, 40 41 }; 41 42
+2
include/linux/dlm_plock.h
··· 9 9 #ifndef __DLM_PLOCK_DOT_H__ 10 10 #define __DLM_PLOCK_DOT_H__ 11 11 12 + #include <linux/types.h> 13 + 12 14 #define DLM_PLOCK_MISC_NAME "dlm_plock" 13 15 14 16 #define DLM_PLOCK_VERSION_MAJOR 1
+2
include/linux/dn.h
··· 1 1 #ifndef _LINUX_DN_H 2 2 #define _LINUX_DN_H 3 3 4 + #include <linux/types.h> 5 + 4 6 /* 5 7 6 8 DECnet Data Structures and Constants
-5
include/linux/dvb/audio.h
··· 24 24 #ifndef _DVBAUDIO_H_ 25 25 #define _DVBAUDIO_H_ 26 26 27 - #ifdef __KERNEL__ 28 27 #include <linux/types.h> 29 - #else 30 - #include <stdint.h> 31 - #endif 32 - 33 28 34 29 typedef enum { 35 30 AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
+1 -1
include/linux/dvb/dmx.h
··· 24 24 #ifndef _DVBDMX_H_ 25 25 #define _DVBDMX_H_ 26 26 27 - #include <asm/types.h> 27 + #include <linux/types.h> 28 28 #ifdef __KERNEL__ 29 29 #include <linux/time.h> 30 30 #else
+1 -2
include/linux/dvb/frontend.h
··· 26 26 #ifndef _DVBFRONTEND_H_ 27 27 #define _DVBFRONTEND_H_ 28 28 29 - #include <asm/types.h> 30 - 29 + #include <linux/types.h> 31 30 32 31 typedef enum fe_type { 33 32 FE_QPSK,
+1 -2
include/linux/dvb/net.h
··· 24 24 #ifndef _DVBNET_H_ 25 25 #define _DVBNET_H_ 26 26 27 - #include <asm/types.h> 28 - 27 + #include <linux/types.h> 29 28 30 29 struct dvb_net_if { 31 30 __u16 pid;
+2 -5
include/linux/dvb/video.h
··· 24 24 #ifndef _DVBVIDEO_H_ 25 25 #define _DVBVIDEO_H_ 26 26 27 - #include <linux/compiler.h> 28 - 29 - #ifdef __KERNEL__ 30 27 #include <linux/types.h> 28 + #ifdef __KERNEL__ 29 + #include <linux/compiler.h> 31 30 #else 32 - #include <asm/types.h> 33 31 #include <stdint.h> 34 32 #include <time.h> 35 33 #endif 36 - 37 34 38 35 typedef enum { 39 36 VIDEO_FORMAT_4_3, /* Select 4:3 format */
+2
include/linux/edd.h
··· 30 30 #ifndef _LINUX_EDD_H 31 31 #define _LINUX_EDD_H 32 32 33 + #include <linux/types.h> 34 + 33 35 #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF 34 36 in boot_params - treat this as 1 byte */ 35 37 #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */
+1
include/linux/efs_fs_sb.h
··· 9 9 #ifndef __EFS_FS_SB_H__ 10 10 #define __EFS_FS_SB_H__ 11 11 12 + #include <linux/types.h> 12 13 #include <linux/magic.h> 13 14 14 15 /* EFS superblock magic numbers */
+2
include/linux/elf-fdpic.h
··· 58 58 #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ 59 59 }; 60 60 61 + #ifdef __KERNEL__ 61 62 #ifdef CONFIG_MMU 62 63 extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, 63 64 struct elf_fdpic_params *interp_params, 64 65 unsigned long *start_stack, 65 66 unsigned long *start_brk); 66 67 #endif 68 + #endif /* __KERNEL__ */ 67 69 68 70 #endif /* _LINUX_ELF_FDPIC_H */
+2 -1
include/linux/elf.h
··· 377 377 Elf64_Word n_type; /* Content type */ 378 378 } Elf64_Nhdr; 379 379 380 + #ifdef __KERNEL__ 380 381 #if ELF_CLASS == ELFCLASS32 381 382 382 383 extern Elf32_Dyn _DYNAMIC []; ··· 405 404 extern int elf_coredump_extra_notes_size(void); 406 405 extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); 407 406 #endif 408 - 407 + #endif /* __KERNEL__ */ 409 408 #endif /* _LINUX_ELF_H */
+2
include/linux/errqueue.h
··· 1 1 #ifndef _LINUX_ERRQUEUE_H 2 2 #define _LINUX_ERRQUEUE_H 1 3 3 4 + #include <linux/types.h> 5 + 4 6 struct sock_extended_err 5 7 { 6 8 __u32 ee_errno;
+1
include/linux/genetlink.h
··· 1 1 #ifndef __LINUX_GENERIC_NETLINK_H 2 2 #define __LINUX_GENERIC_NETLINK_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/netlink.h> 5 6 6 7 #define GENL_NAMSIZ 16 /* length of family name */
+2
include/linux/gfs2_ondisk.h
··· 10 10 #ifndef __GFS2_ONDISK_DOT_H__ 11 11 #define __GFS2_ONDISK_DOT_H__ 12 12 13 + #include <linux/types.h> 14 + 13 15 #define GFS2_MAGIC 0x01161970 14 16 #define GFS2_BASIC_BLOCK 512 15 17 #define GFS2_BASIC_BLOCK_SHIFT 9
+2
include/linux/hid.h
··· 791 791 __FILE__ , ## arg) 792 792 #endif /* HID_FF */ 793 793 794 + #ifdef __KERNEL__ 794 795 #ifdef CONFIG_HID_COMPAT 795 796 #define HID_COMPAT_LOAD_DRIVER(name) \ 796 797 /* prototype to avoid sparse warning */ \ ··· 805 804 extern void hid_compat_##name(void); \ 806 805 hid_compat_##name(); \ 807 806 } while (0) 807 + #endif /* __KERNEL__ */ 808 808 809 809 #endif 810 810
+2
include/linux/hiddev.h
··· 27 27 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic 28 28 */ 29 29 30 + #include <linux/types.h> 31 + 30 32 /* 31 33 * The event structure itself 32 34 */
+1
include/linux/icmpv6.h
··· 1 1 #ifndef _LINUX_ICMPV6_H 2 2 #define _LINUX_ICMPV6_H 3 3 4 + #include <linux/types.h> 4 5 #include <asm/byteorder.h> 5 6 6 7 struct icmp6hdr {
+1
include/linux/if_addr.h
··· 1 1 #ifndef __LINUX_IF_ADDR_H 2 2 #define __LINUX_IF_ADDR_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/netlink.h> 5 6 6 7 struct ifaddrmsg
+2
include/linux/if_addrlabel.h
··· 10 10 #ifndef __LINUX_IF_ADDRLABEL_H 11 11 #define __LINUX_IF_ADDRLABEL_H 12 12 13 + #include <linux/types.h> 14 + 13 15 struct ifaddrlblmsg 14 16 { 15 17 __u8 ifal_family; /* Address family */
+1
include/linux/if_fc.h
··· 20 20 #ifndef _LINUX_IF_FC_H 21 21 #define _LINUX_IF_FC_H 22 22 23 + #include <linux/types.h> 23 24 24 25 #define FC_ALEN 6 /* Octets in one ethernet addr */ 25 26 #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
+1
include/linux/if_hippi.h
··· 22 22 #ifndef _LINUX_IF_HIPPI_H 23 23 #define _LINUX_IF_HIPPI_H 24 24 25 + #include <linux/types.h> 25 26 #include <asm/byteorder.h> 26 27 27 28 /*
+1
include/linux/if_link.h
··· 1 1 #ifndef _LINUX_IF_LINK_H 2 2 #define _LINUX_IF_LINK_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/netlink.h> 5 6 6 7 /* The struct should be in sync with struct net_device_stats */
+1
include/linux/if_ppp.h
··· 33 33 #ifndef _IF_PPP_H_ 34 34 #define _IF_PPP_H_ 35 35 36 + #include <linux/types.h> 36 37 #include <linux/compiler.h> 37 38 38 39 /*
+2
include/linux/if_strip.h
··· 18 18 #ifndef __LINUX_STRIP_H 19 19 #define __LINUX_STRIP_H 20 20 21 + #include <linux/types.h> 22 + 21 23 typedef struct { 22 24 __u8 c[6]; 23 25 } MetricomAddress;
+1
include/linux/if_tr.h
··· 19 19 #ifndef _LINUX_IF_TR_H 20 20 #define _LINUX_IF_TR_H 21 21 22 + #include <linux/types.h> 22 23 #include <asm/byteorder.h> /* For __be16 */ 23 24 24 25 /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble
+1
include/linux/igmp.h
··· 16 16 #ifndef _LINUX_IGMP_H 17 17 #define _LINUX_IGMP_H 18 18 19 + #include <linux/types.h> 19 20 #include <asm/byteorder.h> 20 21 21 22 /*
+2
include/linux/inet_diag.h
··· 1 1 #ifndef _INET_DIAG_H_ 2 2 #define _INET_DIAG_H_ 1 3 3 4 + #include <linux/types.h> 5 + 4 6 /* Just some random number */ 5 7 #define TCPDIAG_GETSOCK 18 6 8 #define DCCPDIAG_GETSOCK 19
+2
include/linux/ip6_tunnel.h
··· 1 1 #ifndef _IP6_TUNNEL_H 2 2 #define _IP6_TUNNEL_H 3 3 4 + #include <linux/types.h> 5 + 4 6 #define IPV6_TLV_TNL_ENCAP_LIMIT 4 5 7 #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 6 8
+1
include/linux/ipv6.h
··· 1 1 #ifndef _IPV6_H 2 2 #define _IPV6_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/in6.h> 5 6 #include <asm/byteorder.h> 6 7
+2
include/linux/ipv6_route.h
··· 13 13 #ifndef _LINUX_IPV6_ROUTE_H 14 14 #define _LINUX_IPV6_ROUTE_H 15 15 16 + #include <linux/types.h> 17 + 16 18 #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ 17 19 #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) 18 20 fallback, no routers on link */
+1
include/linux/ipx.h
··· 1 1 #ifndef _IPX_H_ 2 2 #define _IPX_H_ 3 + #include <linux/types.h> 3 4 #include <linux/sockios.h> 4 5 #include <linux/socket.h> 5 6 #define IPX_NODE_LEN 6
+2
include/linux/irda.h
··· 25 25 #ifndef KERNEL_IRDA_H 26 26 #define KERNEL_IRDA_H 27 27 28 + #include <linux/types.h> 29 + 28 30 /* Please do *not* add any #include in this file, this file is 29 31 * included as-is in user space. 30 32 * Please fix the calling file to properly included needed files before
+2 -1
include/linux/jbd2.h
··· 308 308 int val = (expr); \ 309 309 if (!val) { \ 310 310 printk(KERN_ERR \ 311 - "EXT3-fs unexpected failure: %s;\n",# expr); \ 311 + "JBD2 unexpected failure: %s: %s;\n", \ 312 + __func__, #expr); \ 312 313 printk(KERN_ERR why "\n"); \ 313 314 } \ 314 315 val; \
+1
include/linux/minix_fs.h
··· 1 1 #ifndef _LINUX_MINIX_FS_H 2 2 #define _LINUX_MINIX_FS_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/magic.h> 5 6 6 7 /*
+16 -9
include/linux/module.h
··· 219 219 220 220 #endif 221 221 222 - struct module_ref 223 - { 224 - local_t count; 225 - } ____cacheline_aligned; 226 - 227 222 enum module_state 228 223 { 229 224 MODULE_STATE_LIVE, ··· 339 344 /* Destruction function. */ 340 345 void (*exit)(void); 341 346 342 - /* Reference counts */ 343 - struct module_ref ref[NR_CPUS]; 347 + #ifdef CONFIG_SMP 348 + char *refptr; 349 + #else 350 + local_t ref; 351 + #endif 344 352 #endif 345 353 }; 346 354 #ifndef MODULE_ARCH_INIT ··· 393 395 #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) 394 396 void symbol_put_addr(void *addr); 395 397 398 + static inline local_t *__module_ref_addr(struct module *mod, int cpu) 399 + { 400 + #ifdef CONFIG_SMP 401 + return (local_t *) (mod->refptr + per_cpu_offset(cpu)); 402 + #else 403 + return &mod->ref; 404 + #endif 405 + } 406 + 396 407 /* Sometimes we know we already have a refcount, and it's easier not 397 408 to handle the error case (which only happens with rmmod --wait). */ 398 409 static inline void __module_get(struct module *module) 399 410 { 400 411 if (module) { 401 412 BUG_ON(module_refcount(module) == 0); 402 - local_inc(&module->ref[get_cpu()].count); 413 + local_inc(__module_ref_addr(module, get_cpu())); 403 414 put_cpu(); 404 415 } 405 416 } ··· 420 413 if (module) { 421 414 unsigned int cpu = get_cpu(); 422 415 if (likely(module_is_live(module))) 423 - local_inc(&module->ref[cpu].count); 416 + local_inc(__module_ref_addr(module, cpu)); 424 417 else 425 418 ret = 0; 426 419 put_cpu();
+1
include/linux/msdos_fs.h
··· 1 1 #ifndef _LINUX_MSDOS_FS_H 2 2 #define _LINUX_MSDOS_FS_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/magic.h> 5 6 #include <asm/byteorder.h> 6 7
+1
include/linux/neighbour.h
··· 1 1 #ifndef __LINUX_NEIGHBOUR_H 2 2 #define __LINUX_NEIGHBOUR_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/netlink.h> 5 6 6 7 struct ndmsg
+1
include/linux/netfilter/xt_conntrack.h
··· 5 5 #ifndef _XT_CONNTRACK_H 6 6 #define _XT_CONNTRACK_H 7 7 8 + #include <linux/types.h> 8 9 #include <linux/netfilter/nf_conntrack_tuple_common.h> 9 10 10 11 #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
+2
include/linux/nfs_idmap.h
··· 37 37 #ifndef NFS_IDMAP_H 38 38 #define NFS_IDMAP_H 39 39 40 + #include <linux/types.h> 41 + 40 42 /* XXX from bits/utmp.h */ 41 43 #define IDMAP_NAMESZ 128 42 44
+1 -2
include/linux/nfsd/export.h
··· 10 10 #ifndef NFSD_EXPORT_H 11 11 #define NFSD_EXPORT_H 12 12 13 - #include <asm/types.h> 14 - #ifdef __KERNEL__ 15 13 # include <linux/types.h> 14 + #ifdef __KERNEL__ 16 15 # include <linux/in.h> 17 16 #endif 18 17
+1 -2
include/linux/nfsd/nfsfh.h
··· 14 14 #ifndef _LINUX_NFSD_FH_H 15 15 #define _LINUX_NFSD_FH_H 16 16 17 - #include <asm/types.h> 18 - #ifdef __KERNEL__ 19 17 # include <linux/types.h> 18 + #ifdef __KERNEL__ 20 19 # include <linux/string.h> 21 20 # include <linux/fs.h> 22 21 #endif
+1 -2
include/linux/nfsd/syscall.h
··· 9 9 #ifndef NFSD_SYSCALL_H 10 10 #define NFSD_SYSCALL_H 11 11 12 - #include <asm/types.h> 13 - #ifdef __KERNEL__ 14 12 # include <linux/types.h> 13 + #ifdef __KERNEL__ 15 14 # include <linux/in.h> 16 15 #endif 17 16 #include <linux/posix_types.h>
+1
include/linux/nubus.h
··· 12 12 #ifndef LINUX_NUBUS_H 13 13 #define LINUX_NUBUS_H 14 14 15 + #include <linux/types.h> 15 16 #ifdef __KERNEL__ 16 17 #include <asm/nubus.h> 17 18 #endif
+1
include/linux/pci_ids.h
··· 2425 2425 #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 2426 2426 #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 2427 2427 #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 2428 + #define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc 2428 2429 #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd 2429 2430 #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da 2430 2431 #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
+2
include/linux/phonet.h
··· 23 23 #ifndef LINUX_PHONET_H 24 24 #define LINUX_PHONET_H 25 25 26 + #include <linux/types.h> 27 + 26 28 /* Automatic protocol selection */ 27 29 #define PN_PROTO_TRANSPORT 0 28 30 /* Phonet datagram socket */
+1
include/linux/pkt_cls.h
··· 1 1 #ifndef __LINUX_PKT_CLS_H 2 2 #define __LINUX_PKT_CLS_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_sched.h> 5 6 6 7 /* I think i could have done better macros ; for now this is stolen from
+2
include/linux/pkt_sched.h
··· 1 1 #ifndef __LINUX_PKT_SCHED_H 2 2 #define __LINUX_PKT_SCHED_H 3 3 4 + #include <linux/types.h> 5 + 4 6 /* Logical priority bands not depending on specific packet scheduler. 5 7 Every scheduler will map them to real traffic classes, if it has 6 8 no more precise mechanism to classify packets.
+2
include/linux/ppp_defs.h
··· 25 25 * OR MODIFICATIONS. 26 26 */ 27 27 28 + #include <linux/types.h> 29 + 28 30 /* 29 31 * ==FILEVERSION 20000114== 30 32 *
+2
include/linux/raid/md_p.h
··· 15 15 #ifndef _MD_P_H 16 16 #define _MD_P_H 17 17 18 + #include <linux/types.h> 19 + 18 20 /* 19 21 * RAID superblock. 20 22 *
+1
include/linux/random.h
··· 7 7 #ifndef _LINUX_RANDOM_H 8 8 #define _LINUX_RANDOM_H 9 9 10 + #include <linux/types.h> 10 11 #include <linux/ioctl.h> 11 12 #include <linux/irqnr.h> 12 13
+1
include/linux/rtnetlink.h
··· 1 1 #ifndef __LINUX_RTNETLINK_H 2 2 #define __LINUX_RTNETLINK_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/netlink.h> 5 6 #include <linux/if_link.h> 6 7 #include <linux/if_addr.h>
+1
include/linux/signalfd.h
··· 8 8 #ifndef _LINUX_SIGNALFD_H 9 9 #define _LINUX_SIGNALFD_H 10 10 11 + #include <linux/types.h> 11 12 /* For O_CLOEXEC and O_NONBLOCK */ 12 13 #include <linux/fcntl.h> 13 14
+2 -8
include/linux/slab_def.h
··· 43 43 i++; 44 44 #include <linux/kmalloc_sizes.h> 45 45 #undef CACHE 46 - { 47 - extern void __you_cannot_kmalloc_that_much(void); 48 - __you_cannot_kmalloc_that_much(); 49 - } 46 + return NULL; 50 47 found: 51 48 #ifdef CONFIG_ZONE_DMA 52 49 if (flags & GFP_DMA) ··· 74 77 i++; 75 78 #include <linux/kmalloc_sizes.h> 76 79 #undef CACHE 77 - { 78 - extern void __you_cannot_kmalloc_that_much(void); 79 - __you_cannot_kmalloc_that_much(); 80 - } 80 + return NULL; 81 81 found: 82 82 #ifdef CONFIG_ZONE_DMA 83 83 if (flags & GFP_DMA)
+2
include/linux/sound.h
··· 25 25 #define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ 26 26 #define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ 27 27 28 + #ifdef __KERNEL__ 28 29 /* 29 30 * Sound core interface functions 30 31 */ ··· 41 40 extern void unregister_sound_mixer(int unit); 42 41 extern void unregister_sound_midi(int unit); 43 42 extern void unregister_sound_dsp(int unit); 43 + #endif /* __KERNEL__ */
+1
include/linux/spi/spidev.h
··· 22 22 #ifndef SPIDEV_H 23 23 #define SPIDEV_H 24 24 25 + #include <linux/types.h> 25 26 26 27 /* User space versions of kernel symbols for SPI clocking modes, 27 28 * matching <linux/spi/spi.h>
+2
include/linux/synclink.h
··· 13 13 #define _SYNCLINK_H_ 14 14 #define SYNCLINK_H_VERSION 3.6 15 15 16 + #include <linux/types.h> 17 + 16 18 #define BIT0 0x0001 17 19 #define BIT1 0x0002 18 20 #define BIT2 0x0004
+2
include/linux/taskstats.h
··· 16 16 #ifndef _LINUX_TASKSTATS_H 17 17 #define _LINUX_TASKSTATS_H 18 18 19 + #include <linux/types.h> 20 + 19 21 /* Format for per-task data returned to userland when 20 22 * - a task exits 21 23 * - listener requests stats for a task
+1
include/linux/tc_act/tc_gact.h
··· 1 1 #ifndef __LINUX_TC_GACT_H 2 2 #define __LINUX_TC_GACT_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 #define TCA_ACT_GACT 5
+1
include/linux/tc_act/tc_mirred.h
··· 1 1 #ifndef __LINUX_TC_MIR_H 2 2 #define __LINUX_TC_MIR_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 #define TCA_ACT_MIRRED 8
+1
include/linux/tc_act/tc_pedit.h
··· 1 1 #ifndef __LINUX_TC_PED_H 2 2 #define __LINUX_TC_PED_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 #define TCA_ACT_PEDIT 7
+1
include/linux/tc_ematch/tc_em_cmp.h
··· 1 1 #ifndef __LINUX_TC_EM_CMP_H 2 2 #define __LINUX_TC_EM_CMP_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 struct tcf_em_cmp
+1
include/linux/tc_ematch/tc_em_meta.h
··· 1 1 #ifndef __LINUX_TC_EM_META_H 2 2 #define __LINUX_TC_EM_META_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 enum
+1
include/linux/tc_ematch/tc_em_nbyte.h
··· 1 1 #ifndef __LINUX_TC_EM_NBYTE_H 2 2 #define __LINUX_TC_EM_NBYTE_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 struct tcf_em_nbyte
+1
include/linux/tc_ematch/tc_em_text.h
··· 1 1 #ifndef __LINUX_TC_EM_TEXT_H 2 2 #define __LINUX_TC_EM_TEXT_H 3 3 4 + #include <linux/types.h> 4 5 #include <linux/pkt_cls.h> 5 6 6 7 #define TC_EM_TEXT_ALGOSIZ 16
+2
include/linux/usb/cdc.h
··· 9 9 #ifndef __LINUX_USB_CDC_H 10 10 #define __LINUX_USB_CDC_H 11 11 12 + #include <linux/types.h> 13 + 12 14 #define USB_CDC_SUBCLASS_ACM 0x02 13 15 #define USB_CDC_SUBCLASS_ETHERNET 0x06 14 16 #define USB_CDC_SUBCLASS_WHCM 0x08
+1 -1
include/linux/usb/gadgetfs.h
··· 18 18 #ifndef __LINUX_USB_GADGETFS_H 19 19 #define __LINUX_USB_GADGETFS_H 20 20 21 - #include <asm/types.h> 21 + #include <linux/types.h> 22 22 #include <asm/ioctl.h> 23 23 24 24 #include <linux/usb/ch9.h>
+2
include/linux/video_decoder.h
··· 1 1 #ifndef _LINUX_VIDEO_DECODER_H 2 2 #define _LINUX_VIDEO_DECODER_H 3 3 4 + #include <linux/types.h> 5 + 4 6 #define HAVE_VIDEO_DECODER 1 5 7 6 8 struct video_decoder_capability { /* this name is too long */
+2
include/linux/video_encoder.h
··· 1 1 #ifndef _LINUX_VIDEO_ENCODER_H 2 2 #define _LINUX_VIDEO_ENCODER_H 3 3 4 + #include <linux/types.h> 5 + 4 6 struct video_encoder_capability { /* this name is too long */ 5 7 __u32 flags; 6 8 #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */
+1
include/linux/videodev.h
··· 12 12 #ifndef __LINUX_VIDEODEV_H 13 13 #define __LINUX_VIDEODEV_H 14 14 15 + #include <linux/types.h> 15 16 #include <linux/ioctl.h> 16 17 #include <linux/videodev2.h> 17 18
+1
include/linux/virtio_blk.h
··· 2 2 #define _LINUX_VIRTIO_BLK_H 3 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 4 * compatible drivers/servers. */ 5 + #include <linux/types.h> 5 6 #include <linux/virtio_config.h> 6 7 7 8 /* The ID for virtio_block */
+1
include/linux/virtio_console.h
··· 1 1 #ifndef _LINUX_VIRTIO_CONSOLE_H 2 2 #define _LINUX_VIRTIO_CONSOLE_H 3 + #include <linux/types.h> 3 4 #include <linux/virtio_config.h> 4 5 /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 5 6 * anyone can use the definitions to implement compatible drivers/servers. */
+1
include/linux/virtio_net.h
··· 2 2 #define _LINUX_VIRTIO_NET_H 3 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 4 * compatible drivers/servers. */ 5 + #include <linux/types.h> 5 6 #include <linux/virtio_config.h> 6 7 7 8 /* The ID for virtio_net */
+4 -4
include/media/v4l2-device.h
··· 94 94 /* Call the specified callback for all subdevs matching grp_id (if 0, then 95 95 match them all). Ignore any errors. Note that you cannot add or delete 96 96 a subdev while walking the subdevs list. */ 97 - #define v4l2_device_call_all(dev, grp_id, o, f, args...) \ 97 + #define v4l2_device_call_all(dev, grpid, o, f, args...) \ 98 98 __v4l2_device_call_subdevs(dev, \ 99 - !(grp_id) || sd->grp_id == (grp_id), o, f , ##args) 99 + !(grpid) || sd->grp_id == (grpid), o, f , ##args) 100 100 101 101 /* Call the specified callback for all subdevs matching grp_id (if 0, then 102 102 match them all). If the callback returns an error other than 0 or 103 103 -ENOIOCTLCMD, then return with that error code. Note that you cannot 104 104 add or delete a subdev while walking the subdevs list. */ 105 - #define v4l2_device_call_until_err(dev, grp_id, o, f, args...) \ 105 + #define v4l2_device_call_until_err(dev, grpid, o, f, args...) \ 106 106 __v4l2_device_call_subdevs_until_err(dev, \ 107 - !(grp_id) || sd->grp_id == (grp_id), o, f , ##args) 107 + !(grpid) || sd->grp_id == (grpid), o, f , ##args) 108 108 109 109 #endif
+2
include/mtd/inftl-user.h
··· 6 6 #ifndef __MTD_INFTL_USER_H__ 7 7 #define __MTD_INFTL_USER_H__ 8 8 9 + #include <linux/types.h> 10 + 9 11 #define OSAK_VERSION 0x5120 10 12 #define PERCENTUSED 98 11 13
+1 -1
include/net/inet_hashtables.h
··· 182 182 size = 2048; 183 183 if (nr_pcpus >= 32) 184 184 size = 4096; 185 - if (sizeof(rwlock_t) != 0) { 185 + if (sizeof(spinlock_t) != 0) { 186 186 #ifdef CONFIG_NUMA 187 187 if (size * sizeof(spinlock_t) > PAGE_SIZE) 188 188 hashinfo->ehash_locks = vmalloc(size * sizeof(spinlock_t));
+2
include/sound/hdsp.h
··· 19 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 20 */ 21 21 22 + #include <linux/types.h> 23 + 22 24 #define HDSP_MATRIX_MIXER_SIZE 2048 23 25 24 26 enum HDSP_IO_Type {
+1 -1
include/video/sisfb.h
··· 21 21 #ifndef _LINUX_SISFB_H_ 22 22 #define _LINUX_SISFB_H_ 23 23 24 + #include <linux/types.h> 24 25 #include <asm/ioctl.h> 25 - #include <asm/types.h> 26 26 27 27 /**********************************************/ 28 28 /* PUBLIC */
+2
include/video/uvesafb.h
··· 1 1 #ifndef _UVESAFB_H 2 2 #define _UVESAFB_H 3 3 4 + #include <linux/types.h> 5 + 4 6 struct v86_regs { 5 7 __u32 ebx; 6 8 __u32 ecx;
+2 -2
ipc/shm.c
··· 368 368 file = hugetlb_file_setup(name, size); 369 369 shp->mlock_user = current_user(); 370 370 } else { 371 - int acctflag = VM_ACCOUNT; 371 + int acctflag = 0; 372 372 /* 373 373 * Do not allow no accounting for OVERCOMMIT_NEVER, even 374 374 * if it's asked for. 375 375 */ 376 376 if ((shmflg & SHM_NORESERVE) && 377 377 sysctl_overcommit_memory != OVERCOMMIT_NEVER) 378 - acctflag = 0; 378 + acctflag = VM_NORESERVE; 379 379 file = shmem_file_setup(name, size, acctflag); 380 380 } 381 381 error = PTR_ERR(file);
+12 -1
kernel/cpuset.c
··· 61 61 #include <linux/cgroup.h> 62 62 63 63 /* 64 + * Workqueue for cpuset related tasks. 65 + * 66 + * Using kevent workqueue may cause deadlock when memory_migrate 67 + * is set. So we create a separate workqueue thread for cpuset. 68 + */ 69 + static struct workqueue_struct *cpuset_wq; 70 + 71 + /* 64 72 * Tracks how many cpusets are currently defined in system. 65 73 * When there is only one cpuset (the root cpuset) we can 66 74 * short circuit some hooks. ··· 839 831 */ 840 832 static void async_rebuild_sched_domains(void) 841 833 { 842 - schedule_work(&rebuild_sched_domains_work); 834 + queue_work(cpuset_wq, &rebuild_sched_domains_work); 843 835 } 844 836 845 837 /* ··· 2119 2111 2120 2112 hotcpu_notifier(cpuset_track_online_cpus, 0); 2121 2113 hotplug_memory_notifier(cpuset_track_online_nodes, 10); 2114 + 2115 + cpuset_wq = create_singlethread_workqueue("cpuset"); 2116 + BUG_ON(!cpuset_wq); 2122 2117 } 2123 2118 2124 2119 /**
+40 -1
kernel/hrtimer.c
··· 501 501 continue; 502 502 timer = rb_entry(base->first, struct hrtimer, node); 503 503 expires = ktime_sub(hrtimer_get_expires(timer), base->offset); 504 + /* 505 + * clock_was_set() has changed base->offset so the 506 + * result might be negative. Fix it up to prevent a 507 + * false positive in clockevents_program_event() 508 + */ 509 + if (expires.tv64 < 0) 510 + expires.tv64 = 0; 504 511 if (expires.tv64 < cpu_base->expires_next.tv64) 505 512 cpu_base->expires_next = expires; 506 513 } ··· 1165 1158 1166 1159 #ifdef CONFIG_HIGH_RES_TIMERS 1167 1160 1161 + static int force_clock_reprogram; 1162 + 1163 + /* 1164 + * After 5 iteration's attempts, we consider that hrtimer_interrupt() 1165 + * is hanging, which could happen with something that slows the interrupt 1166 + * such as the tracing. Then we force the clock reprogramming for each future 1167 + * hrtimer interrupts to avoid infinite loops and use the min_delta_ns 1168 + * threshold that we will overwrite. 1169 + * The next tick event will be scheduled to 3 times we currently spend on 1170 + * hrtimer_interrupt(). This gives a good compromise, the cpus will spend 1171 + * 1/4 of their time to process the hrtimer interrupts. This is enough to 1172 + * let it running without serious starvation. 1173 + */ 1174 + 1175 + static inline void 1176 + hrtimer_interrupt_hanging(struct clock_event_device *dev, 1177 + ktime_t try_time) 1178 + { 1179 + force_clock_reprogram = 1; 1180 + dev->min_delta_ns = (unsigned long)try_time.tv64 * 3; 1181 + printk(KERN_WARNING "hrtimer: interrupt too slow, " 1182 + "forcing clock min delta to %lu ns\n", dev->min_delta_ns); 1183 + } 1168 1184 /* 1169 1185 * High resolution timer interrupt 1170 1186 * Called with interrupts disabled ··· 1197 1167 struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); 1198 1168 struct hrtimer_clock_base *base; 1199 1169 ktime_t expires_next, now; 1170 + int nr_retries = 0; 1200 1171 int i; 1201 1172 1202 1173 BUG_ON(!cpu_base->hres_active); ··· 1205 1174 dev->next_event.tv64 = KTIME_MAX; 1206 1175 1207 1176 retry: 1177 + /* 5 retries is enough to notice a hang */ 1178 + if (!(++nr_retries % 5)) 1179 + hrtimer_interrupt_hanging(dev, ktime_sub(ktime_get(), now)); 1180 + 1208 1181 now = ktime_get(); 1209 1182 1210 1183 expires_next.tv64 = KTIME_MAX; ··· 1261 1226 1262 1227 /* Reprogramming necessary ? */ 1263 1228 if (expires_next.tv64 != KTIME_MAX) { 1264 - if (tick_program_event(expires_next, 0)) 1229 + if (tick_program_event(expires_next, force_clock_reprogram)) 1265 1230 goto retry; 1266 1231 } 1267 1232 } ··· 1615 1580 break; 1616 1581 1617 1582 #ifdef CONFIG_HOTPLUG_CPU 1583 + case CPU_DYING: 1584 + case CPU_DYING_FROZEN: 1585 + clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DYING, &scpu); 1586 + break; 1618 1587 case CPU_DEAD: 1619 1588 case CPU_DEAD_FROZEN: 1620 1589 {
+2
kernel/irq/chip.c
··· 383 383 out_unlock: 384 384 spin_unlock(&desc->lock); 385 385 } 386 + EXPORT_SYMBOL_GPL(handle_level_irq); 386 387 387 388 /** 388 389 * handle_fasteoi_irq - irq handler for transparent controllers ··· 594 593 } 595 594 spin_unlock_irqrestore(&desc->lock, flags); 596 595 } 596 + EXPORT_SYMBOL_GPL(__set_irq_handler); 597 597 598 598 void 599 599 set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
+25 -10
kernel/module.c
··· 573 573 /* Init the unload section of the module. */ 574 574 static void module_unload_init(struct module *mod) 575 575 { 576 - unsigned int i; 576 + int cpu; 577 577 578 578 INIT_LIST_HEAD(&mod->modules_which_use_me); 579 - for (i = 0; i < NR_CPUS; i++) 580 - local_set(&mod->ref[i].count, 0); 579 + for_each_possible_cpu(cpu) 580 + local_set(__module_ref_addr(mod, cpu), 0); 581 581 /* Hold reference count during initialization. */ 582 - local_set(&mod->ref[raw_smp_processor_id()].count, 1); 582 + local_set(__module_ref_addr(mod, raw_smp_processor_id()), 1); 583 583 /* Backwards compatibility macros put refcount during init. */ 584 584 mod->waiter = current; 585 585 } ··· 717 717 718 718 unsigned int module_refcount(struct module *mod) 719 719 { 720 - unsigned int i, total = 0; 720 + unsigned int total = 0; 721 + int cpu; 721 722 722 - for (i = 0; i < NR_CPUS; i++) 723 - total += local_read(&mod->ref[i].count); 723 + for_each_possible_cpu(cpu) 724 + total += local_read(__module_ref_addr(mod, cpu)); 724 725 return total; 725 726 } 726 727 EXPORT_SYMBOL(module_refcount); ··· 895 894 { 896 895 if (module) { 897 896 unsigned int cpu = get_cpu(); 898 - local_dec(&module->ref[cpu].count); 897 + local_dec(__module_ref_addr(module, cpu)); 899 898 /* Maybe they're waiting for us to drop reference? */ 900 899 if (unlikely(!module_is_live(module))) 901 900 wake_up_process(module->waiter); ··· 1465 1464 kfree(mod->args); 1466 1465 if (mod->percpu) 1467 1466 percpu_modfree(mod->percpu); 1468 - 1467 + #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) 1468 + if (mod->refptr) 1469 + percpu_modfree(mod->refptr); 1470 + #endif 1469 1471 /* Free lock-classes: */ 1470 1472 lockdep_free_key_range(mod->module_core, mod->core_size); 1471 1473 ··· 2015 2011 if (err < 0) 2016 2012 goto free_mod; 2017 2013 2014 + #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) 2015 + mod->refptr = percpu_modalloc(sizeof(local_t), __alignof__(local_t), 2016 + mod->name); 2017 + if (!mod->refptr) { 2018 + err = -ENOMEM; 2019 + goto free_mod; 2020 + } 2021 + #endif 2018 2022 if (pcpuindex) { 2019 2023 /* We have a special allocation for this section. */ 2020 2024 percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, ··· 2030 2018 mod->name); 2031 2019 if (!percpu) { 2032 2020 err = -ENOMEM; 2033 - goto free_mod; 2021 + goto free_percpu; 2034 2022 } 2035 2023 sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; 2036 2024 mod->percpu = percpu; ··· 2294 2282 free_percpu: 2295 2283 if (percpu) 2296 2284 percpu_modfree(percpu); 2285 + #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) 2286 + percpu_modfree(mod->refptr); 2287 + #endif 2297 2288 free_mod: 2298 2289 kfree(args); 2299 2290 free_hdr:
+10
kernel/sched.c
··· 2266 2266 if (!sched_feat(SYNC_WAKEUPS)) 2267 2267 sync = 0; 2268 2268 2269 + if (!sync) { 2270 + if (current->se.avg_overlap < sysctl_sched_migration_cost && 2271 + p->se.avg_overlap < sysctl_sched_migration_cost) 2272 + sync = 1; 2273 + } else { 2274 + if (current->se.avg_overlap >= sysctl_sched_migration_cost || 2275 + p->se.avg_overlap >= sysctl_sched_migration_cost) 2276 + sync = 0; 2277 + } 2278 + 2269 2279 #ifdef CONFIG_SMP 2270 2280 if (sched_feat(LB_WAKEUP_UPDATE)) { 2271 2281 struct sched_domain *sd;
+21 -11
kernel/sched_fair.c
··· 719 719 __enqueue_entity(cfs_rq, se); 720 720 } 721 721 722 - static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) 722 + static void __clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) 723 723 { 724 724 if (cfs_rq->last == se) 725 725 cfs_rq->last = NULL; 726 726 727 727 if (cfs_rq->next == se) 728 728 cfs_rq->next = NULL; 729 + } 730 + 731 + static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) 732 + { 733 + for_each_sched_entity(se) 734 + __clear_buddies(cfs_rq_of(se), se); 729 735 } 730 736 731 737 static void ··· 774 768 775 769 ideal_runtime = sched_slice(cfs_rq, curr); 776 770 delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; 777 - if (delta_exec > ideal_runtime) 771 + if (delta_exec > ideal_runtime) { 778 772 resched_task(rq_of(cfs_rq)->curr); 773 + /* 774 + * The current task ran long enough, ensure it doesn't get 775 + * re-elected due to buddy favours. 776 + */ 777 + clear_buddies(cfs_rq, curr); 778 + } 779 779 } 780 780 781 781 static void ··· 1191 1179 int idx, unsigned long load, unsigned long this_load, 1192 1180 unsigned int imbalance) 1193 1181 { 1194 - struct task_struct *curr = this_rq->curr; 1195 - struct task_group *tg; 1196 1182 unsigned long tl = this_load; 1197 1183 unsigned long tl_per_task; 1184 + struct task_group *tg; 1198 1185 unsigned long weight; 1199 1186 int balanced; 1200 1187 1201 1188 if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) 1202 1189 return 0; 1203 - 1204 - if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || 1205 - p->se.avg_overlap > sysctl_sched_migration_cost)) 1206 - sync = 0; 1207 1190 1208 1191 /* 1209 1192 * If sync wakeup then subtract the (maximum possible) ··· 1426 1419 if (!sched_feat(WAKEUP_PREEMPT)) 1427 1420 return; 1428 1421 1429 - if (sched_feat(WAKEUP_OVERLAP) && (sync || 1430 - (se->avg_overlap < sysctl_sched_migration_cost && 1431 - pse->avg_overlap < sysctl_sched_migration_cost))) { 1422 + if (sched_feat(WAKEUP_OVERLAP) && sync) { 1432 1423 resched_task(curr); 1433 1424 return; 1434 1425 } ··· 1457 1452 1458 1453 do { 1459 1454 se = pick_next_entity(cfs_rq); 1455 + /* 1456 + * If se was a buddy, clear it so that it will have to earn 1457 + * the favour again. 1458 + */ 1459 + __clear_buddies(cfs_rq, se); 1460 1460 set_next_entity(cfs_rq, se); 1461 1461 cfs_rq = group_cfs_rq(se); 1462 1462 } while (cfs_rq);
+2 -2
kernel/sched_rt.c
··· 968 968 if ((this_cpu != -1) && cpu_isset(this_cpu, *mask)) 969 969 return this_cpu; 970 970 971 - first = first_cpu(*mask); 972 - if (first != NR_CPUS) 971 + first = cpumask_first(mask); 972 + if (first < nr_cpu_ids) 973 973 return first; 974 974 975 975 return -1;
+2
kernel/signal.c
··· 909 909 } 910 910 #endif 911 911 printk("\n"); 912 + preempt_disable(); 912 913 show_regs(regs); 914 + preempt_enable(); 913 915 } 914 916 915 917 static int __init setup_print_fatal_signals(char *str)
+33 -3
kernel/smp.c
··· 18 18 enum { 19 19 CSD_FLAG_WAIT = 0x01, 20 20 CSD_FLAG_ALLOC = 0x02, 21 + CSD_FLAG_LOCK = 0x04, 21 22 }; 22 23 23 24 struct call_function_data { ··· 187 186 if (data_flags & CSD_FLAG_WAIT) { 188 187 smp_wmb(); 189 188 data->flags &= ~CSD_FLAG_WAIT; 189 + } else if (data_flags & CSD_FLAG_LOCK) { 190 + smp_wmb(); 191 + data->flags &= ~CSD_FLAG_LOCK; 190 192 } else if (data_flags & CSD_FLAG_ALLOC) 191 193 kfree(data); 192 194 } ··· 199 195 smp_read_barrier_depends(); 200 196 } 201 197 } 198 + 199 + static DEFINE_PER_CPU(struct call_single_data, csd_data); 202 200 203 201 /* 204 202 * smp_call_function_single - Run a function on a specific CPU ··· 230 224 func(info); 231 225 local_irq_restore(flags); 232 226 } else if ((unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) { 233 - struct call_single_data *data = NULL; 227 + struct call_single_data *data; 234 228 235 229 if (!wait) { 230 + /* 231 + * We are calling a function on a single CPU 232 + * and we are not going to wait for it to finish. 233 + * We first try to allocate the data, but if we 234 + * fail, we fall back to use a per cpu data to pass 235 + * the information to that CPU. Since all callers 236 + * of this code will use the same data, we must 237 + * synchronize the callers to prevent a new caller 238 + * from corrupting the data before the callee 239 + * can access it. 240 + * 241 + * The CSD_FLAG_LOCK is used to let us know when 242 + * the IPI handler is done with the data. 243 + * The first caller will set it, and the callee 244 + * will clear it. The next caller must wait for 245 + * it to clear before we set it again. This 246 + * will make sure the callee is done with the 247 + * data before a new caller will use it. 248 + */ 236 249 data = kmalloc(sizeof(*data), GFP_ATOMIC); 237 250 if (data) 238 251 data->flags = CSD_FLAG_ALLOC; 239 - } 240 - if (!data) { 252 + else { 253 + data = &per_cpu(csd_data, me); 254 + while (data->flags & CSD_FLAG_LOCK) 255 + cpu_relax(); 256 + data->flags = CSD_FLAG_LOCK; 257 + } 258 + } else { 241 259 data = &d; 242 260 data->flags = CSD_FLAG_WAIT; 243 261 }
+19 -7
kernel/time/tick-common.c
··· 274 274 } 275 275 276 276 /* 277 + * Transfer the do_timer job away from a dying cpu. 278 + * 279 + * Called with interrupts disabled. 280 + */ 281 + static void tick_handover_do_timer(int *cpup) 282 + { 283 + if (*cpup == tick_do_timer_cpu) { 284 + int cpu = cpumask_first(cpu_online_mask); 285 + 286 + tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : 287 + TICK_DO_TIMER_NONE; 288 + } 289 + } 290 + 291 + /* 277 292 * Shutdown an event device on a given cpu: 278 293 * 279 294 * This is called on a life CPU, when a CPU is dead. So we cannot ··· 311 296 dev->mode = CLOCK_EVT_MODE_UNUSED; 312 297 clockevents_exchange_device(dev, NULL); 313 298 td->evtdev = NULL; 314 - } 315 - /* Transfer the do_timer job away from this cpu */ 316 - if (*cpup == tick_do_timer_cpu) { 317 - int cpu = cpumask_first(cpu_online_mask); 318 - 319 - tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : 320 - TICK_DO_TIMER_NONE; 321 299 } 322 300 spin_unlock_irqrestore(&tick_device_lock, flags); 323 301 } ··· 363 355 case CLOCK_EVT_NOTIFY_BROADCAST_ENTER: 364 356 case CLOCK_EVT_NOTIFY_BROADCAST_EXIT: 365 357 tick_broadcast_oneshot_control(reason); 358 + break; 359 + 360 + case CLOCK_EVT_NOTIFY_CPU_DYING: 361 + tick_handover_do_timer(dev); 366 362 break; 367 363 368 364 case CLOCK_EVT_NOTIFY_CPU_DEAD:
+27
kernel/trace/ftrace.c
··· 17 17 #include <linux/clocksource.h> 18 18 #include <linux/kallsyms.h> 19 19 #include <linux/seq_file.h> 20 + #include <linux/suspend.h> 20 21 #include <linux/debugfs.h> 21 22 #include <linux/hardirq.h> 22 23 #include <linux/kthread.h> ··· 1966 1965 #ifdef CONFIG_FUNCTION_GRAPH_TRACER 1967 1966 1968 1967 static atomic_t ftrace_graph_active; 1968 + static struct notifier_block ftrace_suspend_notifier; 1969 1969 1970 1970 int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace) 1971 1971 { ··· 2045 2043 return ret; 2046 2044 } 2047 2045 2046 + /* 2047 + * Hibernation protection. 2048 + * The state of the current task is too much unstable during 2049 + * suspend/restore to disk. We want to protect against that. 2050 + */ 2051 + static int 2052 + ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state, 2053 + void *unused) 2054 + { 2055 + switch (state) { 2056 + case PM_HIBERNATION_PREPARE: 2057 + pause_graph_tracing(); 2058 + break; 2059 + 2060 + case PM_POST_HIBERNATION: 2061 + unpause_graph_tracing(); 2062 + break; 2063 + } 2064 + return NOTIFY_DONE; 2065 + } 2066 + 2048 2067 int register_ftrace_graph(trace_func_graph_ret_t retfunc, 2049 2068 trace_func_graph_ent_t entryfunc) 2050 2069 { 2051 2070 int ret = 0; 2052 2071 2053 2072 mutex_lock(&ftrace_sysctl_lock); 2073 + 2074 + ftrace_suspend_notifier.notifier_call = ftrace_suspend_notifier_call; 2075 + register_pm_notifier(&ftrace_suspend_notifier); 2054 2076 2055 2077 atomic_inc(&ftrace_graph_active); 2056 2078 ret = start_graph_tracing(); ··· 2101 2075 ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; 2102 2076 ftrace_graph_entry = ftrace_graph_entry_stub; 2103 2077 ftrace_shutdown(FTRACE_STOP_FUNC_RET); 2078 + unregister_pm_notifier(&ftrace_suspend_notifier); 2104 2079 2105 2080 mutex_unlock(&ftrace_sysctl_lock); 2106 2081 }
+9 -6
kernel/trace/ring_buffer.c
··· 246 246 return 0; 247 247 } 248 248 249 - #define BUF_PAGE_SIZE (PAGE_SIZE - sizeof(struct buffer_data_page)) 249 + #define BUF_PAGE_SIZE (PAGE_SIZE - offsetof(struct buffer_data_page, data)) 250 250 251 251 /* 252 252 * head_page == tail_page && head == tail then buffer is empty. ··· 1025 1025 } 1026 1026 1027 1027 if (next_page == head_page) { 1028 - if (!(buffer->flags & RB_FL_OVERWRITE)) { 1029 - /* reset write */ 1030 - if (tail <= BUF_PAGE_SIZE) 1031 - local_set(&tail_page->write, tail); 1028 + if (!(buffer->flags & RB_FL_OVERWRITE)) 1032 1029 goto out_unlock; 1033 - } 1034 1030 1035 1031 /* tail_page has not moved yet? */ 1036 1032 if (tail_page == cpu_buffer->tail_page) { ··· 1101 1105 return event; 1102 1106 1103 1107 out_unlock: 1108 + /* reset write */ 1109 + if (tail <= BUF_PAGE_SIZE) 1110 + local_set(&tail_page->write, tail); 1111 + 1104 1112 __raw_spin_unlock(&cpu_buffer->lock); 1105 1113 local_irq_restore(flags); 1106 1114 return NULL; ··· 2174 2174 2175 2175 cpu_buffer->overrun = 0; 2176 2176 cpu_buffer->entries = 0; 2177 + 2178 + cpu_buffer->write_stamp = 0; 2179 + cpu_buffer->read_stamp = 0; 2177 2180 } 2178 2181 2179 2182 /**
+3 -2
kernel/trace/trace.c
··· 40 40 41 41 #define TRACE_BUFFER_FLAGS (RB_FL_OVERWRITE) 42 42 43 - unsigned long __read_mostly tracing_max_latency = (cycle_t)ULONG_MAX; 43 + unsigned long __read_mostly tracing_max_latency; 44 44 unsigned long __read_mostly tracing_thresh; 45 45 46 46 /* ··· 3736 3736 * it if we decide to change what log level the ftrace dump 3737 3737 * should be at. 3738 3738 */ 3739 - #define KERN_TRACE KERN_INFO 3739 + #define KERN_TRACE KERN_EMERG 3740 3740 3741 3741 static void 3742 3742 trace_printk_seq(struct trace_seq *s) ··· 3770 3770 dump_ran = 1; 3771 3771 3772 3772 /* No turning back! */ 3773 + tracing_off(); 3773 3774 ftrace_kill(); 3774 3775 3775 3776 for_each_tracing_cpu(cpu) {
+1
kernel/trace/trace_irqsoff.c
··· 380 380 381 381 static void __irqsoff_tracer_init(struct trace_array *tr) 382 382 { 383 + tracing_max_latency = 0; 383 384 irqsoff_trace = tr; 384 385 /* make sure that the tracer is visible */ 385 386 smp_wmb();
+1
kernel/trace/trace_sched_wakeup.c
··· 333 333 334 334 static int wakeup_tracer_init(struct trace_array *tr) 335 335 { 336 + tracing_max_latency = 0; 336 337 wakeup_trace = tr; 337 338 start_wakeup_tracer(tr); 338 339 return 0;
+1 -1
lib/smp_processor_id.c
··· 22 22 * Kernel threads bound to a single CPU can safely use 23 23 * smp_processor_id(): 24 24 */ 25 - if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu))) 25 + if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu))) 26 26 goto out; 27 27 28 28 /*
+2 -45
mm/mlock.c
··· 294 294 * 295 295 * return number of pages [> 0] to be removed from locked_vm on success 296 296 * of "special" vmas. 297 - * 298 - * return negative error if vma spanning @start-@range disappears while 299 - * mmap semaphore is dropped. Unlikely? 300 297 */ 301 298 long mlock_vma_pages_range(struct vm_area_struct *vma, 302 299 unsigned long start, unsigned long end) 303 300 { 304 - struct mm_struct *mm = vma->vm_mm; 305 301 int nr_pages = (end - start) / PAGE_SIZE; 306 302 BUG_ON(!(vma->vm_flags & VM_LOCKED)); 307 303 ··· 310 314 if (!((vma->vm_flags & (VM_DONTEXPAND | VM_RESERVED)) || 311 315 is_vm_hugetlb_page(vma) || 312 316 vma == get_gate_vma(current))) { 313 - long error; 314 - downgrade_write(&mm->mmap_sem); 315 317 316 - error = __mlock_vma_pages_range(vma, start, end, 1); 317 - 318 - up_read(&mm->mmap_sem); 319 - /* vma can change or disappear */ 320 - down_write(&mm->mmap_sem); 321 - vma = find_vma(mm, start); 322 - /* non-NULL vma must contain @start, but need to check @end */ 323 - if (!vma || end > vma->vm_end) 324 - return -ENOMEM; 325 - 326 - return 0; /* hide other errors from mmap(), et al */ 318 + return __mlock_vma_pages_range(vma, start, end, 1); 327 319 } 328 320 329 321 /* ··· 422 438 vma->vm_flags = newflags; 423 439 424 440 if (lock) { 425 - /* 426 - * mmap_sem is currently held for write. Downgrade the write 427 - * lock to a read lock so that other faults, mmap scans, ... 428 - * while we fault in all pages. 429 - */ 430 - downgrade_write(&mm->mmap_sem); 431 - 432 441 ret = __mlock_vma_pages_range(vma, start, end, 1); 433 442 434 - /* 435 - * Need to reacquire mmap sem in write mode, as our callers 436 - * expect this. We have no support for atomically upgrading 437 - * a sem to write, so we need to check for ranges while sem 438 - * is unlocked. 439 - */ 440 - up_read(&mm->mmap_sem); 441 - /* vma can change or disappear */ 442 - down_write(&mm->mmap_sem); 443 - *prev = find_vma(mm, start); 444 - /* non-NULL *prev must contain @start, but need to check @end */ 445 - if (!(*prev) || end > (*prev)->vm_end) 446 - ret = -ENOMEM; 447 - else if (ret > 0) { 443 + if (ret > 0) { 448 444 mm->locked_vm -= ret; 449 445 ret = 0; 450 446 } else 451 447 ret = __mlock_posix_error_return(ret); /* translate if needed */ 452 448 } else { 453 - /* 454 - * TODO: for unlocking, pages will already be resident, so 455 - * we don't need to wait for allocations/reclaim/pagein, ... 456 - * However, unlocking a very large region can still take a 457 - * while. Should we downgrade the semaphore for both lock 458 - * AND unlock ? 459 - */ 460 449 __mlock_vma_pages_range(vma, start, end, 0); 461 450 } 462 451
+29 -24
mm/mmap.c
··· 658 658 validate_mm(mm); 659 659 } 660 660 661 + /* Flags that can be inherited from an existing mapping when merging */ 662 + #define VM_MERGEABLE_FLAGS (VM_CAN_NONLINEAR) 663 + 661 664 /* 662 665 * If the vma has a ->close operation then the driver probably needs to release 663 666 * per-vma resources, so we don't attempt to merge those. ··· 668 665 static inline int is_mergeable_vma(struct vm_area_struct *vma, 669 666 struct file *file, unsigned long vm_flags) 670 667 { 671 - if (vma->vm_flags != vm_flags) 668 + if ((vma->vm_flags ^ vm_flags) & ~VM_MERGEABLE_FLAGS) 672 669 return 0; 673 670 if (vma->vm_file != file) 674 671 return 0; ··· 1090 1087 mapping_cap_account_dirty(vma->vm_file->f_mapping); 1091 1088 } 1092 1089 1090 + /* 1091 + * We account for memory if it's a private writeable mapping, 1092 + * and VM_NORESERVE wasn't set. 1093 + */ 1094 + static inline int accountable_mapping(unsigned int vm_flags) 1095 + { 1096 + return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; 1097 + } 1098 + 1093 1099 unsigned long mmap_region(struct file *file, unsigned long addr, 1094 1100 unsigned long len, unsigned long flags, 1095 1101 unsigned int vm_flags, unsigned long pgoff, ··· 1126 1114 if (!may_expand_vm(mm, len >> PAGE_SHIFT)) 1127 1115 return -ENOMEM; 1128 1116 1129 - if (flags & MAP_NORESERVE) 1117 + /* 1118 + * Set 'VM_NORESERVE' if we should not account for the 1119 + * memory use of this mapping. We only honor MAP_NORESERVE 1120 + * if we're allowed to overcommit memory. 1121 + */ 1122 + if ((flags & MAP_NORESERVE) && sysctl_overcommit_memory != OVERCOMMIT_NEVER) 1123 + vm_flags |= VM_NORESERVE; 1124 + if (!accountable) 1130 1125 vm_flags |= VM_NORESERVE; 1131 1126 1132 - if (accountable && (!(flags & MAP_NORESERVE) || 1133 - sysctl_overcommit_memory == OVERCOMMIT_NEVER)) { 1134 - if (vm_flags & VM_SHARED) { 1135 - /* Check memory availability in shmem_file_setup? */ 1136 - vm_flags |= VM_ACCOUNT; 1137 - } else if (vm_flags & VM_WRITE) { 1138 - /* 1139 - * Private writable mapping: check memory availability 1140 - */ 1141 - charged = len >> PAGE_SHIFT; 1142 - if (security_vm_enough_memory(charged)) 1143 - return -ENOMEM; 1144 - vm_flags |= VM_ACCOUNT; 1145 - } 1127 + /* 1128 + * Private writable mapping: check memory availability 1129 + */ 1130 + if (accountable_mapping(vm_flags)) { 1131 + charged = len >> PAGE_SHIFT; 1132 + if (security_vm_enough_memory(charged)) 1133 + return -ENOMEM; 1134 + vm_flags |= VM_ACCOUNT; 1146 1135 } 1147 1136 1148 1137 /* ··· 1193 1180 if (error) 1194 1181 goto free_vma; 1195 1182 } 1196 - 1197 - /* We set VM_ACCOUNT in a shared mapping's vm_flags, to inform 1198 - * shmem_zero_setup (perhaps called through /dev/zero's ->mmap) 1199 - * that memory reservation must be checked; but that reservation 1200 - * belongs to shared memory object, not to vma: so now clear it. 1201 - */ 1202 - if ((vm_flags & (VM_SHARED|VM_ACCOUNT)) == (VM_SHARED|VM_ACCOUNT)) 1203 - vma->vm_flags &= ~VM_ACCOUNT; 1204 1183 1205 1184 /* Can addr have changed?? 1206 1185 *
+1 -1
mm/shmem.c
··· 2628 2628 goto close_file; 2629 2629 2630 2630 #ifdef CONFIG_SHMEM 2631 - SHMEM_I(inode)->flags = flags & VM_ACCOUNT; 2631 + SHMEM_I(inode)->flags = (flags & VM_NORESERVE) ? 0 : VM_ACCOUNT; 2632 2632 #endif 2633 2633 d_instantiate(dentry, inode); 2634 2634 inode->i_size = size;
+1 -1
mm/slub.c
··· 1996 1996 static void free_kmem_cache_cpu(struct kmem_cache_cpu *c, int cpu) 1997 1997 { 1998 1998 if (c < per_cpu(kmem_cache_cpu, cpu) || 1999 - c > per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { 1999 + c >= per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { 2000 2000 kfree(c); 2001 2001 return; 2002 2002 }
+8 -7
net/core/skbuff.c
··· 2212 2212 return 0; 2213 2213 2214 2214 next_skb: 2215 - block_limit = skb_headlen(st->cur_skb); 2215 + block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; 2216 2216 2217 2217 if (abs_offset < block_limit) { 2218 - *data = st->cur_skb->data + abs_offset; 2218 + *data = st->cur_skb->data + (abs_offset - st->stepped_offset); 2219 2219 return block_limit - abs_offset; 2220 2220 } 2221 2221 ··· 2250 2250 st->frag_data = NULL; 2251 2251 } 2252 2252 2253 - if (st->cur_skb->next) { 2254 - st->cur_skb = st->cur_skb->next; 2253 + if (st->root_skb == st->cur_skb && 2254 + skb_shinfo(st->root_skb)->frag_list) { 2255 + st->cur_skb = skb_shinfo(st->root_skb)->frag_list; 2255 2256 st->frag_idx = 0; 2256 2257 goto next_skb; 2257 - } else if (st->root_skb == st->cur_skb && 2258 - skb_shinfo(st->root_skb)->frag_list) { 2259 - st->cur_skb = skb_shinfo(st->root_skb)->frag_list; 2258 + } else if (st->cur_skb->next) { 2259 + st->cur_skb = st->cur_skb->next; 2260 + st->frag_idx = 0; 2260 2261 goto next_skb; 2261 2262 } 2262 2263
+3 -3
net/ipv4/ipconfig.c
··· 1268 1268 static int __init ip_auto_config(void) 1269 1269 { 1270 1270 __be32 addr; 1271 + #ifdef IPCONFIG_DYNAMIC 1272 + int retries = CONF_OPEN_RETRIES; 1273 + #endif 1271 1274 1272 1275 #ifdef CONFIG_PROC_FS 1273 1276 proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops); ··· 1307 1304 #endif 1308 1305 ic_first_dev->next) { 1309 1306 #ifdef IPCONFIG_DYNAMIC 1310 - 1311 - int retries = CONF_OPEN_RETRIES; 1312 - 1313 1307 if (ic_dynamic() < 0) { 1314 1308 ic_close_devs(); 1315 1309
+2 -1
net/ipv4/tcp.c
··· 524 524 struct tcp_splice_state *tss = rd_desc->arg.data; 525 525 int ret; 526 526 527 - ret = skb_splice_bits(skb, offset, tss->pipe, rd_desc->count, tss->flags); 527 + ret = skb_splice_bits(skb, offset, tss->pipe, min(rd_desc->count, len), 528 + tss->flags); 528 529 if (ret > 0) 529 530 rd_desc->count -= ret; 530 531 return ret;
+39 -16
net/ipv4/udp.c
··· 120 120 atomic_t udp_memory_allocated; 121 121 EXPORT_SYMBOL(udp_memory_allocated); 122 122 123 + #define PORTS_PER_CHAIN (65536 / UDP_HTABLE_SIZE) 124 + 123 125 static int udp_lib_lport_inuse(struct net *net, __u16 num, 124 126 const struct udp_hslot *hslot, 127 + unsigned long *bitmap, 125 128 struct sock *sk, 126 129 int (*saddr_comp)(const struct sock *sk1, 127 130 const struct sock *sk2)) ··· 135 132 sk_nulls_for_each(sk2, node, &hslot->head) 136 133 if (net_eq(sock_net(sk2), net) && 137 134 sk2 != sk && 138 - sk2->sk_hash == num && 135 + (bitmap || sk2->sk_hash == num) && 139 136 (!sk2->sk_reuse || !sk->sk_reuse) && 140 137 (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if 141 138 || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && 142 - (*saddr_comp)(sk, sk2)) 143 - return 1; 139 + (*saddr_comp)(sk, sk2)) { 140 + if (bitmap) 141 + __set_bit(sk2->sk_hash / UDP_HTABLE_SIZE, 142 + bitmap); 143 + else 144 + return 1; 145 + } 144 146 return 0; 145 147 } 146 148 ··· 168 160 if (!snum) { 169 161 int low, high, remaining; 170 162 unsigned rand; 171 - unsigned short first; 163 + unsigned short first, last; 164 + DECLARE_BITMAP(bitmap, PORTS_PER_CHAIN); 172 165 173 166 inet_get_local_port_range(&low, &high); 174 167 remaining = (high - low) + 1; 175 168 176 169 rand = net_random(); 177 - snum = first = rand % remaining + low; 178 - rand |= 1; 179 - for (;;) { 180 - hslot = &udptable->hash[udp_hashfn(net, snum)]; 170 + first = (((u64)rand * remaining) >> 32) + low; 171 + /* 172 + * force rand to be an odd multiple of UDP_HTABLE_SIZE 173 + */ 174 + rand = (rand | 1) * UDP_HTABLE_SIZE; 175 + for (last = first + UDP_HTABLE_SIZE; first != last; first++) { 176 + hslot = &udptable->hash[udp_hashfn(net, first)]; 177 + bitmap_zero(bitmap, PORTS_PER_CHAIN); 181 178 spin_lock_bh(&hslot->lock); 182 - if (!udp_lib_lport_inuse(net, snum, hslot, sk, saddr_comp)) 183 - break; 184 - spin_unlock_bh(&hslot->lock); 179 + udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, 180 + saddr_comp); 181 + 182 + snum = first; 183 + /* 184 + * Iterate on all possible values of snum for this hash. 185 + * Using steps of an odd multiple of UDP_HTABLE_SIZE 186 + * give us randomization and full range coverage. 187 + */ 185 188 do { 186 - snum = snum + rand; 187 - } while (snum < low || snum > high); 188 - if (snum == first) 189 - goto fail; 189 + if (low <= snum && snum <= high && 190 + !test_bit(snum / UDP_HTABLE_SIZE, bitmap)) 191 + goto found; 192 + snum += rand; 193 + } while (snum != first); 194 + spin_unlock_bh(&hslot->lock); 190 195 } 196 + goto fail; 191 197 } else { 192 198 hslot = &udptable->hash[udp_hashfn(net, snum)]; 193 199 spin_lock_bh(&hslot->lock); 194 - if (udp_lib_lport_inuse(net, snum, hslot, sk, saddr_comp)) 200 + if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, saddr_comp)) 195 201 goto fail_unlock; 196 202 } 203 + found: 197 204 inet_sk(sk)->num = snum; 198 205 sk->sk_hash = snum; 199 206 if (sk_unhashed(sk)) {
+1 -1
net/ipv6/addrconf.c
··· 4250 4250 .procname = "mc_forwarding", 4251 4251 .data = &ipv6_devconf.mc_forwarding, 4252 4252 .maxlen = sizeof(int), 4253 - .mode = 0644, 4253 + .mode = 0444, 4254 4254 .proc_handler = proc_dointvec, 4255 4255 }, 4256 4256 #endif
+2 -2
net/ipv6/icmp.c
··· 443 443 if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) 444 444 goto relookup_failed; 445 445 446 - if (ip6_dst_lookup(sk, &dst2, &fl)) 446 + if (ip6_dst_lookup(sk, &dst2, &fl2)) 447 447 goto relookup_failed; 448 448 449 - err = xfrm_lookup(net, &dst2, &fl, sk, XFRM_LOOKUP_ICMP); 449 + err = xfrm_lookup(net, &dst2, &fl2, sk, XFRM_LOOKUP_ICMP); 450 450 switch (err) { 451 451 case 0: 452 452 dst_release(dst);
+1 -1
net/ipv6/ip6_input.c
··· 255 255 * IPv6 multicast router mode is now supported ;) 256 256 */ 257 257 if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding && 258 + !(ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) && 258 259 likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) { 259 260 /* 260 261 * Okay, we try to forward - split and duplicate ··· 317 316 } 318 317 319 318 if (skb2) { 320 - skb2->dev = skb2->dst->dev; 321 319 ip6_mr_input(skb2); 322 320 } 323 321 }
+19 -5
net/ipv6/ip6mr.c
··· 48 48 #include <linux/pim.h> 49 49 #include <net/addrconf.h> 50 50 #include <linux/netfilter_ipv6.h> 51 + #include <net/ip6_checksum.h> 51 52 52 53 /* Big lock, protecting vif table, mrt cache and mroute socket state. 53 54 Note that the changes are semaphored via rtnl_lock. ··· 366 365 pim = (struct pimreghdr *)skb_transport_header(skb); 367 366 if (pim->type != ((PIM_VERSION << 4) | PIM_REGISTER) || 368 367 (pim->flags & PIM_NULL_REGISTER) || 369 - (ip_compute_csum((void *)pim, sizeof(*pim)) != 0 && 368 + (csum_ipv6_magic(&ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, 369 + sizeof(*pim), IPPROTO_PIM, 370 + csum_partial((void *)pim, sizeof(*pim), 0)) && 370 371 csum_fold(skb_checksum(skb, 0, skb->len, 0)))) 371 372 goto drop; 372 373 ··· 395 392 skb_pull(skb, (u8 *)encap - skb->data); 396 393 skb_reset_network_header(skb); 397 394 skb->dev = reg_dev; 398 - skb->protocol = htons(ETH_P_IP); 395 + skb->protocol = htons(ETH_P_IPV6); 399 396 skb->ip_summed = 0; 400 397 skb->pkt_type = PACKET_HOST; 401 398 dst_release(skb->dst); ··· 484 481 { 485 482 struct mif_device *v; 486 483 struct net_device *dev; 484 + struct inet6_dev *in6_dev; 487 485 if (vifi < 0 || vifi >= net->ipv6.maxvif) 488 486 return -EADDRNOTAVAIL; 489 487 ··· 516 512 write_unlock_bh(&mrt_lock); 517 513 518 514 dev_set_allmulti(dev, -1); 515 + 516 + in6_dev = __in6_dev_get(dev); 517 + if (in6_dev) 518 + in6_dev->cnf.mc_forwarding--; 519 519 520 520 if (v->flags & MIFF_REGISTER) 521 521 unregister_netdevice(dev); ··· 630 622 int vifi = vifc->mif6c_mifi; 631 623 struct mif_device *v = &net->ipv6.vif6_table[vifi]; 632 624 struct net_device *dev; 625 + struct inet6_dev *in6_dev; 633 626 int err; 634 627 635 628 /* Is vif busy ? */ ··· 670 661 default: 671 662 return -EINVAL; 672 663 } 664 + 665 + in6_dev = __in6_dev_get(dev); 666 + if (in6_dev) 667 + in6_dev->cnf.mc_forwarding++; 673 668 674 669 /* 675 670 * Fill in the VIF structures ··· 851 838 852 839 skb->dst = dst_clone(pkt->dst); 853 840 skb->ip_summed = CHECKSUM_UNNECESSARY; 854 - 855 - skb_pull(skb, sizeof(struct ipv6hdr)); 856 841 } 857 842 858 843 if (net->ipv6.mroute6_sk == NULL) { ··· 1233 1222 1234 1223 rtnl_lock(); 1235 1224 write_lock_bh(&mrt_lock); 1236 - if (likely(net->ipv6.mroute6_sk == NULL)) 1225 + if (likely(net->ipv6.mroute6_sk == NULL)) { 1237 1226 net->ipv6.mroute6_sk = sk; 1227 + net->ipv6.devconf_all->mc_forwarding++; 1228 + } 1238 1229 else 1239 1230 err = -EADDRINUSE; 1240 1231 write_unlock_bh(&mrt_lock); ··· 1255 1242 if (sk == net->ipv6.mroute6_sk) { 1256 1243 write_lock_bh(&mrt_lock); 1257 1244 net->ipv6.mroute6_sk = NULL; 1245 + net->ipv6.devconf_all->mc_forwarding--; 1258 1246 write_unlock_bh(&mrt_lock); 1259 1247 1260 1248 mroute_clean_tables(net);
+1 -1
net/ipv6/route.c
··· 794 794 .proto = iph->nexthdr, 795 795 }; 796 796 797 - if (rt6_need_strict(&iph->daddr)) 797 + if (rt6_need_strict(&iph->daddr) && skb->dev->type != ARPHRD_PIMREG) 798 798 flags |= RT6_LOOKUP_F_IFACE; 799 799 800 800 skb->dst = fib6_rule_lookup(net, &fl, flags, ip6_pol_route_input);
+7 -2
net/packet/af_packet.c
··· 77 77 #include <linux/poll.h> 78 78 #include <linux/module.h> 79 79 #include <linux/init.h> 80 + #include <linux/mutex.h> 80 81 81 82 #ifdef CONFIG_INET 82 83 #include <net/inet_common.h> ··· 176 175 #endif 177 176 struct packet_type prot_hook; 178 177 spinlock_t bind_lock; 178 + struct mutex pg_vec_lock; 179 179 unsigned int running:1, /* prot_hook is attached*/ 180 180 auxdata:1, 181 181 origdev:1; ··· 1071 1069 */ 1072 1070 1073 1071 spin_lock_init(&po->bind_lock); 1072 + mutex_init(&po->pg_vec_lock); 1074 1073 po->prot_hook.func = packet_rcv; 1075 1074 1076 1075 if (sock->type == SOCK_PACKET) ··· 1868 1865 synchronize_net(); 1869 1866 1870 1867 err = -EBUSY; 1868 + mutex_lock(&po->pg_vec_lock); 1871 1869 if (closing || atomic_read(&po->mapped) == 0) { 1872 1870 err = 0; 1873 1871 #define XC(a, b) ({ __typeof__ ((a)) __t; __t = (a); (a) = (b); __t; }) ··· 1890 1886 if (atomic_read(&po->mapped)) 1891 1887 printk(KERN_DEBUG "packet_mmap: vma is busy: %d\n", atomic_read(&po->mapped)); 1892 1888 } 1889 + mutex_unlock(&po->pg_vec_lock); 1893 1890 1894 1891 spin_lock(&po->bind_lock); 1895 1892 if (was_running && !po->running) { ··· 1923 1918 1924 1919 size = vma->vm_end - vma->vm_start; 1925 1920 1926 - lock_sock(sk); 1921 + mutex_lock(&po->pg_vec_lock); 1927 1922 if (po->pg_vec == NULL) 1928 1923 goto out; 1929 1924 if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE) ··· 1946 1941 err = 0; 1947 1942 1948 1943 out: 1949 - release_sock(sk); 1944 + mutex_unlock(&po->pg_vec_lock); 1950 1945 return err; 1951 1946 } 1952 1947 #endif
-11
net/wimax/debugfs.c
··· 28 28 #include "debug-levels.h" 29 29 30 30 31 - /* Debug framework control of debug levels */ 32 - struct d_level D_LEVEL[] = { 33 - D_SUBMODULE_DEFINE(debugfs), 34 - D_SUBMODULE_DEFINE(id_table), 35 - D_SUBMODULE_DEFINE(op_msg), 36 - D_SUBMODULE_DEFINE(op_reset), 37 - D_SUBMODULE_DEFINE(op_rfkill), 38 - D_SUBMODULE_DEFINE(stack), 39 - }; 40 - size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); 41 - 42 31 #define __debugfs_register(prefix, name, parent) \ 43 32 do { \ 44 33 result = d_level_register_debugfs(prefix, name, parent); \
+13
net/wimax/stack.c
··· 516 516 } 517 517 EXPORT_SYMBOL_GPL(wimax_dev_rm); 518 518 519 + 520 + /* Debug framework control of debug levels */ 521 + struct d_level D_LEVEL[] = { 522 + D_SUBMODULE_DEFINE(debugfs), 523 + D_SUBMODULE_DEFINE(id_table), 524 + D_SUBMODULE_DEFINE(op_msg), 525 + D_SUBMODULE_DEFINE(op_reset), 526 + D_SUBMODULE_DEFINE(op_rfkill), 527 + D_SUBMODULE_DEFINE(stack), 528 + }; 529 + size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); 530 + 531 + 519 532 struct genl_family wimax_gnl_family = { 520 533 .id = GENL_ID_GENERATE, 521 534 .name = "WiMAX",
+20 -12
net/wireless/reg.c
··· 498 498 * calculate the number of reg rules we will need. We will need one 499 499 * for each channel subband */ 500 500 while (country_ie_len >= 3) { 501 + int end_channel = 0; 501 502 struct ieee80211_country_ie_triplet *triplet = 502 503 (struct ieee80211_country_ie_triplet *) country_ie; 503 504 int cur_sub_max_channel = 0, cur_channel = 0; ··· 510 509 continue; 511 510 } 512 511 512 + /* 2 GHz */ 513 + if (triplet->chans.first_channel <= 14) 514 + end_channel = triplet->chans.first_channel + 515 + triplet->chans.num_channels; 516 + else 517 + /* 518 + * 5 GHz -- For example in country IEs if the first 519 + * channel given is 36 and the number of channels is 4 520 + * then the individual channel numbers defined for the 521 + * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 522 + * and not 36, 37, 38, 39. 523 + * 524 + * See: http://tinyurl.com/11d-clarification 525 + */ 526 + end_channel = triplet->chans.first_channel + 527 + (4 * (triplet->chans.num_channels - 1)); 528 + 513 529 cur_channel = triplet->chans.first_channel; 514 - cur_sub_max_channel = ieee80211_channel_to_frequency( 515 - cur_channel + triplet->chans.num_channels); 530 + cur_sub_max_channel = end_channel; 516 531 517 532 /* Basic sanity check */ 518 533 if (cur_sub_max_channel < cur_channel) ··· 607 590 end_channel = triplet->chans.first_channel + 608 591 triplet->chans.num_channels; 609 592 else 610 - /* 611 - * 5 GHz -- For example in country IEs if the first 612 - * channel given is 36 and the number of channels is 4 613 - * then the individual channel numbers defined for the 614 - * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 615 - * and not 36, 37, 38, 39. 616 - * 617 - * See: http://tinyurl.com/11d-clarification 618 - */ 619 593 end_channel = triplet->chans.first_channel + 620 594 (4 * (triplet->chans.num_channels - 1)); 621 595 ··· 1284 1276 if (intersected_rd) { 1285 1277 printk(KERN_DEBUG "cfg80211: We intersect both of these " 1286 1278 "and get:\n"); 1287 - print_regdomain_info(rd); 1279 + print_regdomain_info(intersected_rd); 1288 1280 return; 1289 1281 } 1290 1282 printk(KERN_DEBUG "cfg80211: Intersection between both failed\n");