···11Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters22===============================================================3344-September 26, 200655-44+Intel Gigabit Linux driver.55+Copyright(c) 1999 - 2010 Intel Corporation.6677Contents88========991010-- In This Release1110- Identifying Your Adapter1212-- Building and Installation1311- Command Line Parameters1412- Speed and Duplex Configuration1513- Additional Configurations1616-- Known Issues1714- Support1818-1919-2020-In This Release2121-===============2222-2323-This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family2424-of Adapters. This driver includes support for Itanium(R)2-based systems.2525-2626-For questions related to hardware requirements, refer to the documentation2727-supplied with your Intel PRO/1000 adapter. All hardware requirements listed2828-apply to use with Linux.2929-3030-The following features are now available in supported kernels:3131- - Native VLANs3232- - Channel Bonding (teaming)3333- - SNMP3434-3535-Channel Bonding documentation can be found in the Linux kernel source:3636-/Documentation/networking/bonding.txt3737-3838-The driver information previously displayed in the /proc filesystem is not3939-supported in this release. Alternatively, you can use ethtool (version 1.64040-or later), lspci, and ifconfig to obtain the same information.4141-4242-Instructions on updating ethtool can be found in the section "Additional4343-Configurations" later in this document.4444-4545-NOTE: The Intel(R) 82562v 10/100 Network Connection only provides 10/1004646-support.4747-48154916Identifying Your Adapter5017========================···1952For more information on how to identify your adapter, go to the Adapter &2053Driver ID Guide at:21542222- http://support.intel.com/support/network/adapter/pro100/21397.htm5555+ http://support.intel.com/support/go/network/adapter/idguide.htm23562457For the latest Intel network drivers for Linux, refer to the following2558website. In the search field, enter your adapter name or type, or use the2659networking link on the left to search for your adapter:27602828- http://downloadfinder.intel.com/scripts-df/support_intel.asp2929-6161+ http://support.intel.com/support/go/network/adapter/home.htm30623163Command Line Parameters3264=======================3333-3434-If the driver is built as a module, the following optional parameters3535-are used by entering them on the command line with the modprobe command3636-using this syntax:3737-3838- modprobe e1000 [<option>=<VAL1>,<VAL2>,...]3939-4040-For example, with two PRO/1000 PCI adapters, entering:4141-4242- modprobe e1000 TxDescriptors=80,1284343-4444-loads the e1000 driver with 80 TX descriptors for the first adapter and4545-128 TX descriptors for the second adapter.46654766The default value for each parameter is generally the recommended setting,4867unless otherwise noted.···4188 RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay4289 parameters, see the application note at:4390 http://www.intel.com/design/network/applnots/ap450.htm4444-4545- A descriptor describes a data buffer and attributes related to4646- the data buffer. This information is accessed by the hardware.4747-48914992AutoNeg5093-------···55106NOTE: Refer to the Speed and Duplex section of this readme for more56107 information on the AutoNeg parameter.571085858-59109Duplex60110------61111(Supported only on adapters with copper connections)···67119link partner is forced (either full or half), Duplex defaults to half-68120duplex.691217070-71122FlowControl72123-----------73124Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)···75128This parameter controls the automatic generation(Tx) and response(Rx)76129to Ethernet PAUSE frames.771307878-79131InterruptThrottleRate80132---------------------81133(not supported on Intel(R) 82542, 82543 or 82544-based adapters)8282-Valid Range: 0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative)134134+Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,135135+ 4=simplified balancing)83136Default Value: 38413785138The driver can limit the amount of interrupts per second that the adapter8686-will generate for incoming packets. It does this by writing a value to the 8787-adapter that is based on the maximum amount of interrupts that the adapter 139139+will generate for incoming packets. It does this by writing a value to the140140+adapter that is based on the maximum amount of interrupts that the adapter88141will generate per second.8914290143Setting InterruptThrottleRate to a value greater or equal to 100···93146load on the system and can lower CPU utilization under heavy load,94147but will increase latency as packets are not processed as quickly.951489696-The default behaviour of the driver previously assumed a static 9797-InterruptThrottleRate value of 8000, providing a good fallback value for 9898-all traffic types,but lacking in small packet performance and latency. 9999-The hardware can handle many more small packets per second however, and 149149+The default behaviour of the driver previously assumed a static150150+InterruptThrottleRate value of 8000, providing a good fallback value for151151+all traffic types,but lacking in small packet performance and latency.152152+The hardware can handle many more small packets per second however, and100153for this reason an adaptive interrupt moderation algorithm was implemented.101154102155Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which103103-it dynamically adjusts the InterruptThrottleRate value based on the traffic 156156+it dynamically adjusts the InterruptThrottleRate value based on the traffic104157that it receives. After determining the type of incoming traffic in the last105105-timeframe, it will adjust the InterruptThrottleRate to an appropriate value 158158+timeframe, it will adjust the InterruptThrottleRate to an appropriate value106159for that traffic.107160108161The algorithm classifies the incoming traffic every interval into109109-classes. Once the class is determined, the InterruptThrottleRate value is 110110-adjusted to suit that traffic type the best. There are three classes defined: 162162+classes. Once the class is determined, the InterruptThrottleRate value is163163+adjusted to suit that traffic type the best. There are three classes defined:111164"Bulk traffic", for large amounts of packets of normal size; "Low latency",112165for small amounts of traffic and/or a significant percentage of small113113-packets; and "Lowest latency", for almost completely small packets or 166166+packets; and "Lowest latency", for almost completely small packets or114167minimal traffic.115168116116-In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 117117-for traffic that falls in class "Bulk traffic". If traffic falls in the "Low 118118-latency" or "Lowest latency" class, the InterruptThrottleRate is increased 169169+In dynamic conservative mode, the InterruptThrottleRate value is set to 4000170170+for traffic that falls in class "Bulk traffic". If traffic falls in the "Low171171+latency" or "Lowest latency" class, the InterruptThrottleRate is increased119172stepwise to 20000. This default mode is suitable for most applications.120173121174For situations where low latency is vital such as cluster or122175grid computing, the algorithm can reduce latency even more when123176InterruptThrottleRate is set to mode 1. In this mode, which operates124124-the same as mode 3, the InterruptThrottleRate will be increased stepwise to 177177+the same as mode 3, the InterruptThrottleRate will be increased stepwise to12517870000 for traffic in class "Lowest latency".179179+180180+In simplified mode the interrupt rate is based on the ratio of Tx and181181+Rx traffic. If the bytes per second rate is approximately equal, the182182+interrupt rate will drop as low as 2000 interrupts per second. If the183183+traffic is mostly transmit or mostly receive, the interrupt rate could184184+be as high as 8000.126185127186Setting InterruptThrottleRate to 0 turns off any interrupt moderation128187and may improve small packet latency, but is generally not suitable···165212 be platform-specific. If CPU utilization is not a concern, use166213 RX_POLLING (NAPI) and default driver settings.167214168168-169169-170215RxDescriptors171216-------------172217Valid Range: 80-256 for 82542 and 82543-based adapters···176225incoming packets, at the expense of increased system memory utilization.177226178227Each descriptor is 16 bytes. A receive buffer is also allocated for each179179-descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 228228+descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending180229on the MTU setting. The maximum MTU size is 16110.181230182182-NOTE: MTU designates the frame size. It only needs to be set for Jumbo 183183- Frames. Depending on the available system resources, the request 184184- for a higher number of receive descriptors may be denied. In this 231231+NOTE: MTU designates the frame size. It only needs to be set for Jumbo232232+ Frames. Depending on the available system resources, the request233233+ for a higher number of receive descriptors may be denied. In this185234 case, use a lower number.186186-187235188236RxIntDelay189237----------···204254 restoring the network connection. To eliminate the potential205255 for the hang ensure that RxIntDelay is set to 0.206256207207-208257RxAbsIntDelay209258-------------210259(This parameter is supported only on 82540, 82545 and later adapters.)···217268along with RxIntDelay, may improve traffic throughput in specific network218269conditions.219270220220-221271Speed222272-----223273(This parameter is supported only on adapters with copper connections.)···227279(Mbps). If this parameter is not specified or is set to 0 and the link228280partner is set to auto-negotiate, the board will auto-detect the correct229281speed. Duplex should also be set when Speed is set to either 10 or 100.230230-231282232283TxDescriptors233284-------------···242295 higher number of transmit descriptors may be denied. In this case,243296 use a lower number.244297298298+TxDescriptorStep299299+----------------300300+Valid Range: 1 (use every Tx Descriptor)301301+ 4 (use every 4th Tx Descriptor)302302+303303+Default Value: 1 (use every Tx Descriptor)304304+305305+On certain non-Intel architectures, it has been observed that intense TX306306+traffic bursts of short packets may result in an improper descriptor307307+writeback. If this occurs, the driver will report a "TX Timeout" and reset308308+the adapter, after which the transmit flow will restart, though data may309309+have stalled for as much as 10 seconds before it resumes.310310+311311+The improper writeback does not occur on the first descriptor in a system312312+memory cache-line, which is typically 32 bytes, or 4 descriptors long.313313+314314+Setting TxDescriptorStep to a value of 4 will ensure that all TX descriptors315315+are aligned to the start of a system memory cache line, and so this problem316316+will not occur.317317+318318+NOTES: Setting TxDescriptorStep to 4 effectively reduces the number of319319+ TxDescriptors available for transmits to 1/4 of the normal allocation.320320+ This has a possible negative performance impact, which may be321321+ compensated for by allocating more descriptors using the TxDescriptors322322+ module parameter.323323+324324+ There are other conditions which may result in "TX Timeout", which will325325+ not be resolved by the use of the TxDescriptorStep parameter. As the326326+ issue addressed by this parameter has never been observed on Intel327327+ Architecture platforms, it should not be used on Intel platforms.245328246329TxIntDelay247330----------···283306efficiency if properly tuned for specific network traffic. If the284307system is reporting dropped transmits, this value may be set too high285308causing the driver to run out of available transmit descriptors.286286-287309288310TxAbsIntDelay289311-------------···306330A value of '1' indicates that the driver should enable IP checksum307331offload for received packets (both UDP and TCP) to the adapter hardware.308332333333+Copybreak334334+---------335335+Valid Range: 0-xxxxxxx (0=off)336336+Default Value: 256337337+Usage: insmod e1000.ko copybreak=128338338+339339+Driver copies all packets below or equaling this size to a fresh Rx340340+buffer before handing it up the stack.341341+342342+This parameter is different than other parameters, in that it is a343343+single (not 1,1,1 etc.) parameter applied to all driver instances and344344+it is also available during runtime at345345+/sys/module/e1000/parameters/copybreak346346+347347+SmartPowerDownEnable348348+--------------------349349+Valid Range: 0-1350350+Default Value: 0 (disabled)351351+352352+Allows PHY to turn off in lower power states. The user can turn off353353+this parameter in supported chipsets.354354+355355+KumeranLockLoss356356+---------------357357+Valid Range: 0-1358358+Default Value: 1 (enabled)359359+360360+This workaround skips resetting the PHY at shutdown for the initial361361+silicon releases of ICH8 systems.309362310363Speed and Duplex Configuration311364==============================···390385parameter should not be used. Instead, use the Speed and Duplex parameters391386previously mentioned to force the adapter to the same speed and duplex.392387393393-394388Additional Configurations395389=========================396396-397397- Configuring the Driver on Different Distributions398398- -------------------------------------------------399399- Configuring a network driver to load properly when the system is started400400- is distribution dependent. Typically, the configuration process involves401401- adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well402402- as editing other system startup scripts and/or configuration files. Many403403- popular Linux distributions ship with tools to make these changes for you.404404- To learn the proper way to configure a network device for your system,405405- refer to your distribution documentation. If during this process you are406406- asked for the driver or module name, the name for the Linux Base Driver407407- for the Intel(R) PRO/1000 Family of Adapters is e1000.408408-409409- As an example, if you install the e1000 driver for two PRO/1000 adapters410410- (eth0 and eth1) and set the speed and duplex to 10full and 100half, add411411- the following to modules.conf or or modprobe.conf:412412-413413- alias eth0 e1000414414- alias eth1 e1000415415- options e1000 Speed=10,100 Duplex=2,1416416-417417- Viewing Link Messages418418- ---------------------419419- Link messages will not be displayed to the console if the distribution is420420- restricting system messages. In order to see network driver link messages421421- on your console, set dmesg to eight by entering the following:422422-423423- dmesg -n 8424424-425425- NOTE: This setting is not saved across reboots.426390427391 Jumbo Frames428392 ------------···411437 setting in a different location.412438413439 Notes:414414-415415- - To enable Jumbo Frames, increase the MTU size on the interface beyond416416- 1500.440440+ Degradation in throughput performance may be observed in some Jumbo frames441441+ environments. If this is observed, increasing the application's socket buffer442442+ size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.443443+ See the specific application manual and /usr/src/linux*/Documentation/444444+ networking/ip-sysctl.txt for more details.417445418446 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides419447 with the maximum Jumbo Frames size of 16128.···423447 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or424448 loss of link.425449426426- - Some Intel gigabit adapters that support Jumbo Frames have a frame size427427- limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes.428428- The adapters with this limitation are based on the Intel(R) 82571EB,429429- 82572EI, 82573L and 80003ES2LAN controller. These correspond to the430430- following product names:431431- Intel(R) PRO/1000 PT Server Adapter432432- Intel(R) PRO/1000 PT Desktop Adapter433433- Intel(R) PRO/1000 PT Network Connection434434- Intel(R) PRO/1000 PT Dual Port Server Adapter435435- Intel(R) PRO/1000 PT Dual Port Network Connection436436- Intel(R) PRO/1000 PF Server Adapter437437- Intel(R) PRO/1000 PF Network Connection438438- Intel(R) PRO/1000 PF Dual Port Server Adapter439439- Intel(R) PRO/1000 PB Server Connection440440- Intel(R) PRO/1000 PL Network Connection441441- Intel(R) PRO/1000 EB Network Connection with I/O Acceleration442442- Intel(R) PRO/1000 EB Backplane Connection with I/O Acceleration443443- Intel(R) PRO/1000 PT Quad Port Server Adapter444444-445450 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not446451 support Jumbo Frames. These correspond to the following product names:447452 Intel(R) PRO/1000 Gigabit Server Adapter448453 Intel(R) PRO/1000 PM Network Connection449449-450450- - The following adapters do not support Jumbo Frames:451451- Intel(R) 82562V 10/100 Network Connection452452- Intel(R) 82566DM Gigabit Network Connection453453- Intel(R) 82566DC Gigabit Network Connection454454- Intel(R) 82566MM Gigabit Network Connection455455- Intel(R) 82566MC Gigabit Network Connection456456- Intel(R) 82562GT 10/100 Network Connection457457- Intel(R) 82562G 10/100 Network Connection458458-459454460455 Ethtool461456 -------···437490 The latest release of ethtool can be found from438491 http://sourceforge.net/projects/gkernel.439492440440- NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support441441- for a more complete ethtool feature set can be enabled by upgrading442442- ethtool to ethtool-1.8.1.443443-444493 Enabling Wake on LAN* (WoL)445494 ---------------------------446446- WoL is configured through the Ethtool* utility. Ethtool is included with447447- all versions of Red Hat after Red Hat 7.2. For other Linux distributions,448448- download and install Ethtool from the following website:449449- http://sourceforge.net/projects/gkernel.450450-451451- For instructions on enabling WoL with Ethtool, refer to the website listed452452- above.495495+ WoL is configured through the Ethtool* utility.453496454497 WoL will be enabled on the system during the next shut down or reboot.455498 For this driver version, in order to enable WoL, the e1000 driver must be456499 loaded when shutting down or rebooting the system.457457-458458- Wake On LAN is only supported on port A for the following devices:459459- Intel(R) PRO/1000 PT Dual Port Network Connection460460- Intel(R) PRO/1000 PT Dual Port Server Connection461461- Intel(R) PRO/1000 PT Dual Port Server Adapter462462- Intel(R) PRO/1000 PF Dual Port Server Adapter463463- Intel(R) PRO/1000 PT Quad Port Server Adapter464464-465465- NAPI466466- ----467467- NAPI (Rx polling mode) is enabled in the e1000 driver.468468-469469- See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.470470-471471-472472-Known Issues473473-============474474-475475-Dropped Receive Packets on Half-duplex 10/100 Networks476476-------------------------------------------------------477477-If you have an Intel PCI Express adapter running at 10mbps or 100mbps, half-478478-duplex, you may observe occasional dropped receive packets. There are no479479-workarounds for this problem in this network configuration. The network must480480-be updated to operate in full-duplex, and/or 1000mbps only.481481-482482-Jumbo Frames System Requirement483483--------------------------------484484-Memory allocation failures have been observed on Linux systems with 64 MB485485-of RAM or less that are running Jumbo Frames. If you are using Jumbo486486-Frames, your system may require more than the advertised minimum487487-requirement of 64 MB of system memory.488488-489489-Performance Degradation with Jumbo Frames490490------------------------------------------491491-Degradation in throughput performance may be observed in some Jumbo frames492492-environments. If this is observed, increasing the application's socket493493-buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values494494-may help. See the specific application manual and495495-/usr/src/linux*/Documentation/496496-networking/ip-sysctl.txt for more details.497497-498498-Jumbo Frames on Foundry BigIron 8000 switch499499--------------------------------------------500500-There is a known issue using Jumbo frames when connected to a Foundry501501-BigIron 8000 switch. This is a 3rd party limitation. If you experience502502-loss of packets, lower the MTU size.503503-504504-Allocating Rx Buffers when Using Jumbo Frames 505505----------------------------------------------506506-Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if 507507-the available memory is heavily fragmented. This issue may be seen with PCI-X 508508-adapters or with packet split disabled. This can be reduced or eliminated 509509-by changing the amount of available memory for receive buffer allocation, by510510-increasing /proc/sys/vm/min_free_kbytes. 511511-512512-Multiple Interfaces on Same Ethernet Broadcast Network513513-------------------------------------------------------514514-Due to the default ARP behavior on Linux, it is not possible to have515515-one system on two IP networks in the same Ethernet broadcast domain516516-(non-partitioned switch) behave as expected. All Ethernet interfaces517517-will respond to IP traffic for any IP address assigned to the system.518518-This results in unbalanced receive traffic.519519-520520-If you have multiple interfaces in a server, either turn on ARP521521-filtering by entering:522522-523523- echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter524524-(this only works if your kernel's version is higher than 2.4.5),525525-526526-NOTE: This setting is not saved across reboots. The configuration527527-change can be made permanent by adding the line:528528- net.ipv4.conf.all.arp_filter = 1529529-to the file /etc/sysctl.conf530530-531531- or,532532-533533-install the interfaces in separate broadcast domains (either in534534-different switches or in a switch partitioned to VLANs).535535-536536-82541/82547 can't link or are slow to link with some link partners537537------------------------------------------------------------------538538-There is a known compatibility issue with 82541/82547 and some539539-low-end switches where the link will not be established, or will540540-be slow to establish. In particular, these switches are known to541541-be incompatible with 82541/82547:542542-543543- Planex FXG-08TE544544- I-O Data ETG-SH8545545-546546-To workaround this issue, the driver can be compiled with an override547547-of the PHY's master/slave setting. Forcing master or forcing slave548548-mode will improve time-to-link.549549-550550- # make CFLAGS_EXTRA=-DE1000_MASTER_SLAVE=<n>551551-552552-Where <n> is:553553-554554- 0 = Hardware default555555- 1 = Master mode556556- 2 = Slave mode557557- 3 = Auto master/slave558558-559559-Disable rx flow control with ethtool560560-------------------------------------561561-In order to disable receive flow control using ethtool, you must turn562562-off auto-negotiation on the same command line.563563-564564-For example:565565-566566- ethtool -A eth? autoneg off rx off567567-568568-Unplugging network cable while ethtool -p is running569569-----------------------------------------------------570570-In kernel versions 2.5.50 and later (including 2.6 kernel), unplugging571571-the network cable while ethtool -p is running will cause the system to572572-become unresponsive to keyboard commands, except for control-alt-delete.573573-Restarting the system appears to be the only remedy.574574-575500576501Support577502=======
+302
Documentation/networking/e1000e.txt
···11+Linux* Driver for Intel(R) Network Connection22+===============================================================33+44+Intel Gigabit Linux driver.55+Copyright(c) 1999 - 2010 Intel Corporation.66+77+Contents88+========99+1010+- Identifying Your Adapter1111+- Command Line Parameters1212+- Additional Configurations1313+- Support1414+1515+Identifying Your Adapter1616+========================1717+1818+The e1000e driver supports all PCI Express Intel(R) Gigabit Network1919+Connections, except those that are 82575, 82576 and 82580-based*.2020+2121+* NOTE: The Intel(R) PRO/1000 P Dual Port Server Adapter is supported by2222+ the e1000 driver, not the e1000e driver due to the 82546 part being used2323+ behind a PCI Express bridge.2424+2525+For more information on how to identify your adapter, go to the Adapter &2626+Driver ID Guide at:2727+2828+ http://support.intel.com/support/go/network/adapter/idguide.htm2929+3030+For the latest Intel network drivers for Linux, refer to the following3131+website. In the search field, enter your adapter name or type, or use the3232+networking link on the left to search for your adapter:3333+3434+ http://support.intel.com/support/go/network/adapter/home.htm3535+3636+Command Line Parameters3737+=======================3838+3939+The default value for each parameter is generally the recommended setting,4040+unless otherwise noted.4141+4242+NOTES: For more information about the InterruptThrottleRate,4343+ RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay4444+ parameters, see the application note at:4545+ http://www.intel.com/design/network/applnots/ap450.htm4646+4747+InterruptThrottleRate4848+---------------------4949+Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,5050+ 4=simplified balancing)5151+Default Value: 35252+5353+The driver can limit the amount of interrupts per second that the adapter5454+will generate for incoming packets. It does this by writing a value to the5555+adapter that is based on the maximum amount of interrupts that the adapter5656+will generate per second.5757+5858+Setting InterruptThrottleRate to a value greater or equal to 1005959+will program the adapter to send out a maximum of that many interrupts6060+per second, even if more packets have come in. This reduces interrupt6161+load on the system and can lower CPU utilization under heavy load,6262+but will increase latency as packets are not processed as quickly.6363+6464+The driver has two adaptive modes (setting 1 or 3) in which6565+it dynamically adjusts the InterruptThrottleRate value based on the traffic6666+that it receives. After determining the type of incoming traffic in the last6767+timeframe, it will adjust the InterruptThrottleRate to an appropriate value6868+for that traffic.6969+7070+The algorithm classifies the incoming traffic every interval into7171+classes. Once the class is determined, the InterruptThrottleRate value is7272+adjusted to suit that traffic type the best. There are three classes defined:7373+"Bulk traffic", for large amounts of packets of normal size; "Low latency",7474+for small amounts of traffic and/or a significant percentage of small7575+packets; and "Lowest latency", for almost completely small packets or7676+minimal traffic.7777+7878+In dynamic conservative mode, the InterruptThrottleRate value is set to 40007979+for traffic that falls in class "Bulk traffic". If traffic falls in the "Low8080+latency" or "Lowest latency" class, the InterruptThrottleRate is increased8181+stepwise to 20000. This default mode is suitable for most applications.8282+8383+For situations where low latency is vital such as cluster or8484+grid computing, the algorithm can reduce latency even more when8585+InterruptThrottleRate is set to mode 1. In this mode, which operates8686+the same as mode 3, the InterruptThrottleRate will be increased stepwise to8787+70000 for traffic in class "Lowest latency".8888+8989+In simplified mode the interrupt rate is based on the ratio of Tx and9090+Rx traffic. If the bytes per second rate is approximately equal the9191+interrupt rate will drop as low as 2000 interrupts per second. If the9292+traffic is mostly transmit or mostly receive, the interrupt rate could9393+be as high as 8000.9494+9595+Setting InterruptThrottleRate to 0 turns off any interrupt moderation9696+and may improve small packet latency, but is generally not suitable9797+for bulk throughput traffic.9898+9999+NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and100100+ RxAbsIntDelay parameters. In other words, minimizing the receive101101+ and/or transmit absolute delays does not force the controller to102102+ generate more interrupts than what the Interrupt Throttle Rate103103+ allows.104104+105105+NOTE: When e1000e is loaded with default settings and multiple adapters106106+ are in use simultaneously, the CPU utilization may increase non-107107+ linearly. In order to limit the CPU utilization without impacting108108+ the overall throughput, we recommend that you load the driver as109109+ follows:110110+111111+ modprobe e1000e InterruptThrottleRate=3000,3000,3000112112+113113+ This sets the InterruptThrottleRate to 3000 interrupts/sec for114114+ the first, second, and third instances of the driver. The range115115+ of 2000 to 3000 interrupts per second works on a majority of116116+ systems and is a good starting point, but the optimal value will117117+ be platform-specific. If CPU utilization is not a concern, use118118+ RX_POLLING (NAPI) and default driver settings.119119+120120+RxIntDelay121121+----------122122+Valid Range: 0-65535 (0=off)123123+Default Value: 0124124+125125+This value delays the generation of receive interrupts in units of 1.024126126+microseconds. Receive interrupt reduction can improve CPU efficiency if127127+properly tuned for specific network traffic. Increasing this value adds128128+extra latency to frame reception and can end up decreasing the throughput129129+of TCP traffic. If the system is reporting dropped receives, this value130130+may be set too high, causing the driver to run out of available receive131131+descriptors.132132+133133+CAUTION: When setting RxIntDelay to a value other than 0, adapters may134134+ hang (stop transmitting) under certain network conditions. If135135+ this occurs a NETDEV WATCHDOG message is logged in the system136136+ event log. In addition, the controller is automatically reset,137137+ restoring the network connection. To eliminate the potential138138+ for the hang ensure that RxIntDelay is set to 0.139139+140140+RxAbsIntDelay141141+-------------142142+Valid Range: 0-65535 (0=off)143143+Default Value: 8144144+145145+This value, in units of 1.024 microseconds, limits the delay in which a146146+receive interrupt is generated. Useful only if RxIntDelay is non-zero,147147+this value ensures that an interrupt is generated after the initial148148+packet is received within the set amount of time. Proper tuning,149149+along with RxIntDelay, may improve traffic throughput in specific network150150+conditions.151151+152152+TxIntDelay153153+----------154154+Valid Range: 0-65535 (0=off)155155+Default Value: 8156156+157157+This value delays the generation of transmit interrupts in units of158158+1.024 microseconds. Transmit interrupt reduction can improve CPU159159+efficiency if properly tuned for specific network traffic. If the160160+system is reporting dropped transmits, this value may be set too high161161+causing the driver to run out of available transmit descriptors.162162+163163+TxAbsIntDelay164164+-------------165165+Valid Range: 0-65535 (0=off)166166+Default Value: 32167167+168168+This value, in units of 1.024 microseconds, limits the delay in which a169169+transmit interrupt is generated. Useful only if TxIntDelay is non-zero,170170+this value ensures that an interrupt is generated after the initial171171+packet is sent on the wire within the set amount of time. Proper tuning,172172+along with TxIntDelay, may improve traffic throughput in specific173173+network conditions.174174+175175+Copybreak176176+---------177177+Valid Range: 0-xxxxxxx (0=off)178178+Default Value: 256179179+180180+Driver copies all packets below or equaling this size to a fresh Rx181181+buffer before handing it up the stack.182182+183183+This parameter is different than other parameters, in that it is a184184+single (not 1,1,1 etc.) parameter applied to all driver instances and185185+it is also available during runtime at186186+/sys/module/e1000e/parameters/copybreak187187+188188+SmartPowerDownEnable189189+--------------------190190+Valid Range: 0-1191191+Default Value: 0 (disabled)192192+193193+Allows PHY to turn off in lower power states. The user can set this parameter194194+in supported chipsets.195195+196196+KumeranLockLoss197197+---------------198198+Valid Range: 0-1199199+Default Value: 1 (enabled)200200+201201+This workaround skips resetting the PHY at shutdown for the initial202202+silicon releases of ICH8 systems.203203+204204+IntMode205205+-------206206+Valid Range: 0-2 (0=legacy, 1=MSI, 2=MSI-X)207207+Default Value: 2208208+209209+Allows changing the interrupt mode at module load time, without requiring a210210+recompile. If the driver load fails to enable a specific interrupt mode, the211211+driver will try other interrupt modes, from least to most compatible. The212212+interrupt order is MSI-X, MSI, Legacy. If specifying MSI (IntMode=1)213213+interrupts, only MSI and Legacy will be attempted.214214+215215+CrcStripping216216+------------217217+Valid Range: 0-1218218+Default Value: 1 (enabled)219219+220220+Strip the CRC from received packets before sending up the network stack. If221221+you have a machine with a BMC enabled but cannot receive IPMI traffic after222222+loading or enabling the driver, try disabling this feature.223223+224224+WriteProtectNVM225225+---------------226226+Valid Range: 0-1227227+Default Value: 1 (enabled)228228+229229+Set the hardware to ignore all write/erase cycles to the GbE region in the230230+ICHx NVM (non-volatile memory). This feature can be disabled by the231231+WriteProtectNVM module parameter (enabled by default) only after a hardware232232+reset, but the machine must be power cycled before trying to enable writes.233233+234234+Note: the kernel boot option iomem=relaxed may need to be set if the kernel235235+config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the236236+NVM from user space via ethtool.237237+238238+Additional Configurations239239+=========================240240+241241+ Jumbo Frames242242+ ------------243243+ Jumbo Frames support is enabled by changing the MTU to a value larger than244244+ the default of 1500. Use the ifconfig command to increase the MTU size.245245+ For example:246246+247247+ ifconfig eth<x> mtu 9000 up248248+249249+ This setting is not saved across reboots.250250+251251+ Notes:252252+253253+ - The maximum MTU setting for Jumbo Frames is 9216. This value coincides254254+ with the maximum Jumbo Frames size of 9234 bytes.255255+256256+ - Using Jumbo Frames at 10 or 100 Mbps is not supported and may result in257257+ poor performance or loss of link.258258+259259+ - Some adapters limit Jumbo Frames sized packets to a maximum of260260+ 4096 bytes and some adapters do not support Jumbo Frames.261261+262262+263263+ Ethtool264264+ -------265265+ The driver utilizes the ethtool interface for driver configuration and266266+ diagnostics, as well as displaying statistical information. We267267+ strongly recommend downloading the latest version of Ethtool at:268268+269269+ http://sourceforge.net/projects/gkernel.270270+271271+ Speed and Duplex272272+ ----------------273273+ Speed and Duplex are configured through the Ethtool* utility. For274274+ instructions, refer to the Ethtool man page.275275+276276+ Enabling Wake on LAN* (WoL)277277+ ---------------------------278278+ WoL is configured through the Ethtool* utility. For instructions on279279+ enabling WoL with Ethtool, refer to the Ethtool man page.280280+281281+ WoL will be enabled on the system during the next shut down or reboot.282282+ For this driver version, in order to enable WoL, the e1000e driver must be283283+ loaded when shutting down or rebooting the system.284284+285285+ In most cases Wake On LAN is only supported on port A for multiple port286286+ adapters. To verify if a port supports Wake on LAN run ethtool eth<X>.287287+288288+289289+Support290290+=======291291+292292+For general information, go to the Intel support website at:293293+294294+ www.intel.com/support/295295+296296+or the Intel Wired Networking project hosted by Sourceforge at:297297+298298+ http://sourceforge.net/projects/e1000299299+300300+If an issue is identified with the released source code on the supported301301+kernel with a supported adapter, email the specific information related302302+to the issue to e1000-devel@lists.sf.net
+3-37
Documentation/networking/ixgbevf.txt
···11Linux* Base Driver for Intel(R) Network Connection22==================================================3344-November 24, 200944+Intel Gigabit Linux driver.55+Copyright(c) 1999 - 2010 Intel Corporation.5667Contents78========8999-- In This Release1010- Identifying Your Adapter1111- Known Issues/Troubleshooting1212- Support1313-1414-In This Release1515-===============16131714This file describes the ixgbevf Linux* Base Driver for Intel Network1815Connection.···3033For more information on how to identify your adapter, go to the Adapter &3134Driver ID Guide at:32353333- http://support.intel.com/support/network/sb/CS-008441.htm3636+ http://support.intel.com/support/go/network/adapter/idguide.htm34373538Known Issues/Troubleshooting3639============================···5457If an issue is identified with the released source code on the supported5558kernel with a supported adapter, email the specific information related5659to the issue to e1000-devel@lists.sf.net5757-5858-License5959-=======6060-6161-Intel 10 Gigabit Linux driver.6262-Copyright(c) 1999 - 2009 Intel Corporation.6363-6464-This program is free software; you can redistribute it and/or modify it6565-under the terms and conditions of the GNU General Public License,6666-version 2, as published by the Free Software Foundation.6767-6868-This program is distributed in the hope it will be useful, but WITHOUT6969-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or7070-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for7171-more details.7272-7373-You should have received a copy of the GNU General Public License along with7474-this program; if not, write to the Free Software Foundation, Inc.,7575-51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.7676-7777-The full GNU General Public License is included in this distribution in7878-the file called "COPYING".7979-8080-Trademarks8181-==========8282-8383-Intel, Itanium, and Pentium are trademarks or registered trademarks of8484-Intel Corporation or its subsidiaries in the United States and other8585-countries.8686-8787-* Other names and brands may be claimed as the property of others.
···969969S: Maintained970970F: arch/arm/mach-s5p*/971971972972+ARM/SAMSUNG S5P SERIES FIMC SUPPORT973973+M: Kyungmin Park <kyungmin.park@samsung.com>974974+M: Sylwester Nawrocki <s.nawrocki@samsung.com>975975+L: linux-arm-kernel@lists.infradead.org976976+L: linux-media@vger.kernel.org977977+S: Maintained978978+F: arch/arm/plat-s5p/dev-fimc*979979+F: arch/arm/plat-samsung/include/plat/*fimc*980980+F: drivers/media/video/s5p-fimc/981981+972982ARM/SHMOBILE ARM ARCHITECTURE973983M: Paul Mundt <lethal@linux-sh.org>974984M: Magnus Damm <magnus.damm@gmail.com>···25452535F: drivers/scsi/gdt*2546253625472537GENERIC GPIO I2C DRIVER25482548-M: Haavard Skinnemoen <hskinnemoen@atmel.com>25382538+M: Haavard Skinnemoen <hskinnemoen@gmail.com>25492539S: Supported25502540F: drivers/i2c/busses/i2c-gpio.c25512541F: include/linux/i2c-gpio.h···30733063S: Maintained30743064F: drivers/net/ixp2000/3075306530763076-INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe)30663066+INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe/ixgbevf)30773067M: Jeff Kirsher <jeffrey.t.kirsher@intel.com>30783068M: Jesse Brandeburg <jesse.brandeburg@intel.com>30793069M: Bruce Allan <bruce.w.allan@intel.com>30803080-M: Alex Duyck <alexander.h.duyck@intel.com>30703070+M: Carolyn Wyborny <carolyn.wyborny@intel.com>30713071+M: Don Skidmore <donald.c.skidmore@intel.com>30723072+M: Greg Rose <gregory.v.rose@intel.com>30813073M: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>30743074+M: Alex Duyck <alexander.h.duyck@intel.com>30823075M: John Ronciak <john.ronciak@intel.com>30833076L: e1000-devel@lists.sourceforge.net30843077W: http://e1000.sourceforge.net/30853078S: Supported30793079+F: Documentation/networking/e100.txt30803080+F: Documentation/networking/e1000.txt30813081+F: Documentation/networking/e1000e.txt30823082+F: Documentation/networking/igb.txt30833083+F: Documentation/networking/igbvf.txt30843084+F: Documentation/networking/ixgb.txt30853085+F: Documentation/networking/ixgbe.txt30863086+F: Documentation/networking/ixgbevf.txt30863087F: drivers/net/e100.c30873088F: drivers/net/e1000/30883089F: drivers/net/e1000e/···31013080F: drivers/net/igbvf/31023081F: drivers/net/ixgb/31033082F: drivers/net/ixgbe/30833083+F: drivers/net/ixgbevf/3104308431053085INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT31063086L: linux-wireless@vger.kernel.org···50305008F: drivers/media/video/*7146*50315009F: include/media/*7146*5032501050115011+SAMSUNG AUDIO (ASoC) DRIVERS50125012+M: Jassi Brar <jassi.brar@samsung.com>50135013+L: alsa-devel@alsa-project.org (moderated for non-subscribers)50145014+S: Supported50155015+F: sound/soc/s3c24xx50165016+50335017TLG2300 VIDEO4LINUX-2 DRIVER50345018M: Huang Shijie <shijie8@gmail.com>50355019M: Kang Yong <kangyong@telegent.com>···64786450WOLFSON MICROELECTRONICS DRIVERS64796451M: Mark Brown <broonie@opensource.wolfsonmicro.com>64806452M: Ian Lartey <ian@opensource.wolfsonmicro.com>64536453+M: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>64546454+T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc64816455T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus64826482-W: http://opensource.wolfsonmicro.com/node/864566456+W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices64836457S: Supported64846458F: Documentation/hwmon/wm83??64856459F: drivers/leds/leds-wm83*.c
+2-2
Makefile
···11VERSION = 222PATCHLEVEL = 633SUBLEVEL = 3644-EXTRAVERSION = -rc755-NAME = Sheep on Meth44+EXTRAVERSION = -rc855+NAME = Flesh-Eating Bats with Fangs6677# *DOCUMENTATION*88# To see a list of typical targets execute "make help"
+14
arch/arm/Kconfig
···11011101 invalidated are not, resulting in an incoherency in the system page11021102 tables. The workaround changes the TLB flushing routines to invalidate11031103 entries regardless of the ASID.11041104+11051105+config ARM_ERRATA_74362211061106+ bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"11071107+ depends on CPU_V711081108+ help11091109+ This option enables the workaround for the 743622 Cortex-A911101110+ (r2p0..r2p2) erratum. Under very rare conditions, a faulty11111111+ optimisation in the Cortex-A9 Store Buffer may lead to data11121112+ corruption. This workaround sets a specific bit in the diagnostic11131113+ register of the Cortex-A9 which disables the Store Buffer11141114+ optimisation, preventing the defect from occurring. This has no11151115+ visible impact on the overall performance or power consumption of the11161116+ processor.11171117+11041118endmenu1105111911061120source "arch/arm/common/Kconfig"
···28282929static inline void arch_idle(void)3030{3131-#ifndef CONFIG_DEBUG_KERNEL3231 /*3332 * Disable the processor clock. The processor will be automatically3433 * re-enabled by an interrupt or by a reset.3534 */3635 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);3737-#else3636+#ifndef CONFIG_CPU_ARM920T3837 /*3938 * Set the processor (CP15) into 'Wait for Interrupt' mode.4040- * Unlike disabling the processor clock via the PMC (above)4141- * this allows the processor to be woken via JTAG.3939+ * Post-RM9200 processors need this in conjunction with the above4040+ * to save power when idle.4241 */4342 cpu_do_idle();4443#endif
+1-1
arch/arm/mach-ep93xx/dma-m2p.c
···276276 v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN);277277 m2p_set_control(ch, v);278278279279- while (m2p_channel_state(ch) == STATE_ON)279279+ while (m2p_channel_state(ch) >= STATE_ON)280280 cpu_relax();281281282282 m2p_set_control(ch, 0x0);
+1
arch/arm/mach-imx/Kconfig
···122122 select IMX_HAVE_PLATFORM_IMX_I2C123123 select IMX_HAVE_PLATFORM_IMX_UART124124 select IMX_HAVE_PLATFORM_MXC_NAND125125+ select MXC_ULPI if USB_ULPI125126 help126127 Include support for Eukrea CPUIMX27 platform. This includes127128 specific configurations for the module and its peripherals.
···204204 /*205205 * Don't allow RAM to be mapped - this causes problems with ARMv6+206206 */207207- if (WARN_ON(pfn_valid(pfn)))208208- return NULL;207207+ if (pfn_valid(pfn)) {208208+ printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n"209209+ KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"210210+ KERN_WARNING "will fail in the next kernel release. Please fix your driver.\n");211211+ WARN_ON(1);212212+ }209213210214 type = get_mem_type(mtype);211215 if (!type)
···435435static int s3c_adc_resume(struct platform_device *pdev)436436{437437 struct adc_device *adc = platform_get_drvdata(pdev);438438- unsigned long flags;439438440439 clk_enable(adc->clk);441440 enable_irq(adc->irq);
+26-1
arch/arm/plat-samsung/clock.c
···4848#include <plat/clock.h>4949#include <plat/cpu.h>50505151+#include <linux/serial_core.h>5252+#include <plat/regs-serial.h> /* for s3c24xx_uart_devs */5353+5154/* clock information */52555356static LIST_HEAD(clocks);···6865 return 0;6966}70676868+static int dev_is_s3c_uart(struct device *dev)6969+{7070+ struct platform_device **pdev = s3c24xx_uart_devs;7171+ int i;7272+ for (i = 0; i < ARRAY_SIZE(s3c24xx_uart_devs); i++, pdev++)7373+ if (*pdev && dev == &(*pdev)->dev)7474+ return 1;7575+ return 0;7676+}7777+7878+/*7979+ * Serial drivers call get_clock() very early, before platform bus8080+ * has been set up, this requires a special check to let them get8181+ * a proper clock8282+ */8383+8484+static int dev_is_platform_device(struct device *dev)8585+{8686+ return dev->bus == &platform_bus_type ||8787+ (dev->bus == NULL && dev_is_s3c_uart(dev));8888+}8989+7190/* Clock API calls */72917392struct clk *clk_get(struct device *dev, const char *id)···9873 struct clk *clk = ERR_PTR(-ENOENT);9974 int idno;10075101101- if (dev == NULL || dev->bus != &platform_bus_type)7676+ if (dev == NULL || !dev_is_platform_device(dev))10277 idno = -1;10378 else10479 idno = to_platform_device(dev)->id;
···8282 * These are used to set parameters in the core dumps.8383 */8484#define ELF_CLASS ELFCLASS328585-#if defined(__LITTLE_ENDIAN)8585+#if defined(__LITTLE_ENDIAN__)8686#define ELF_DATA ELFDATA2LSB8787-#elif defined(__BIG_ENDIAN)8787+#elif defined(__BIG_ENDIAN__)8888#define ELF_DATA ELFDATA2MSB8989#else9090#error no endian defined
···28282929#define DEBUG_SIG 030303131+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))3232+3133asmlinkage int3234sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,3335 unsigned long r2, unsigned long r3, unsigned long r4,···256254static int prev_insn(struct pt_regs *regs)257255{258256 u16 inst;259259- if (get_user(&inst, (u16 __user *)(regs->bpc - 2)))257257+ if (get_user(inst, (u16 __user *)(regs->bpc - 2)))260258 return -EFAULT;261259 if ((inst & 0xfff0) == 0x10f0) /* trap ? */262260 regs->bpc -= 2;
+1
arch/mips/include/asm/siginfo.h
···8888#ifdef __ARCH_SI_TRAPNO8989 int _trapno; /* TRAP # which caused the signal */9090#endif9191+ short _addr_lsb;9192 } _sigfault;92939394 /* SIGPOLL, SIGXFSZ (To do ...) */
+5-9
arch/um/drivers/hostaudio_kern.c
···4040" This is used to specify the host mixer device to the hostaudio driver.\n"\4141" The default is \"" HOSTAUDIO_DEV_MIXER "\".\n\n"42424343+module_param(dsp, charp, 0644);4444+MODULE_PARM_DESC(dsp, DSP_HELP);4545+module_param(mixer, charp, 0644);4646+MODULE_PARM_DESC(mixer, MIXER_HELP);4747+4348#ifndef MODULE4449static int set_dsp(char *name, int *add)4550{···6156}62576358__uml_setup("mixer=", set_mixer, "mixer=<mixer device>\n" MIXER_HELP);6464-6565-#else /*MODULE*/6666-6767-module_param(dsp, charp, 0644);6868-MODULE_PARM_DESC(dsp, DSP_HELP);6969-7070-module_param(mixer, charp, 0644);7171-MODULE_PARM_DESC(mixer, MIXER_HELP);7272-7359#endif74607561/* /dev/dsp file operations */
···420420 return -1;421421 }422422423423- for_each_node_mask(i, nodes_parsed)424424- e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT,425425- nodes[i].end >> PAGE_SHIFT);423423+ for (i = 0; i < num_node_memblks; i++)424424+ e820_register_active_regions(memblk_nodeid[i],425425+ node_memblk_range[i].start >> PAGE_SHIFT,426426+ node_memblk_range[i].end >> PAGE_SHIFT);427427+426428 /* for out of order entries in SRAT */427429 sort_node_map();428430 if (!nodes_cover_memory(nodes)) {
+8-4
block/elevator.c
···938938 }939939 }940940 kobject_uevent(&e->kobj, KOBJ_ADD);941941+ e->registered = 1;941942 }942943 return error;943944}···948947{949948 kobject_uevent(&e->kobj, KOBJ_REMOVE);950949 kobject_del(&e->kobj);950950+ e->registered = 0;951951}952952953953void elv_unregister_queue(struct request_queue *q)···1044104210451043 spin_unlock_irq(q->queue_lock);1046104410471047- __elv_unregister_queue(old_elevator);10451045+ if (old_elevator->registered) {10461046+ __elv_unregister_queue(old_elevator);1048104710491049- err = elv_register_queue(q);10501050- if (err)10511051- goto fail_register;10481048+ err = elv_register_queue(q);10491049+ if (err)10501050+ goto fail_register;10511051+ }1052105210531053 /*10541054 * finally exit old elevator and turn off BYPASS.
+17
drivers/acpi/blacklist.c
···204204 },205205 },206206 {207207+ /*208208+ * There have a NVIF method in MSI GX723 DSDT need call by Nvidia209209+ * driver (e.g. nouveau) when user press brightness hotkey.210210+ * Currently, nouveau driver didn't do the job and it causes there211211+ * have a infinite while loop in DSDT when user press hotkey.212212+ * We add MSI GX723's dmi information to this table for workaround213213+ * this issue.214214+ * Will remove MSI GX723 from the table after nouveau grows support.215215+ */216216+ .callback = dmi_disable_osi_vista,217217+ .ident = "MSI GX723",218218+ .matches = {219219+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),220220+ DMI_MATCH(DMI_PRODUCT_NAME, "GX723"),221221+ },222222+ },223223+ {207224 .callback = dmi_disable_osi_vista,208225 .ident = "Sony VGN-NS10J_S",209226 .matches = {
···532532 memcpy(ptr + rdev->r600_blit.ps_offset, r6xx_ps, r6xx_ps_size * 4);533533 radeon_bo_kunmap(rdev->r600_blit.shader_obj);534534 radeon_bo_unreserve(rdev->r600_blit.shader_obj);535535+ rdev->mc.active_vram_size = rdev->mc.real_vram_size;535536 return 0;536537}537538···540539{541540 int r;542541542542+ rdev->mc.active_vram_size = rdev->mc.visible_vram_size;543543 if (rdev->r600_blit.shader_obj == NULL)544544 return;545545 /* If we can't reserve the bo, unref should be enough to destroy
+1
drivers/gpu/drm/radeon/radeon.h
···344344 * about vram size near mc fb location */345345 u64 mc_vram_size;346346 u64 visible_vram_size;347347+ u64 active_vram_size;347348 u64 gtt_size;348349 u64 gtt_start;349350 u64 gtt_end;
+9-9
drivers/gpu/drm/radeon/radeon_atombios.c
···15581558 switch (tv_info->ucTV_BootUpDefaultStandard) {15591559 case ATOM_TV_NTSC:15601560 tv_std = TV_STD_NTSC;15611561- DRM_INFO("Default TV standard: NTSC\n");15611561+ DRM_DEBUG_KMS("Default TV standard: NTSC\n");15621562 break;15631563 case ATOM_TV_NTSCJ:15641564 tv_std = TV_STD_NTSC_J;15651565- DRM_INFO("Default TV standard: NTSC-J\n");15651565+ DRM_DEBUG_KMS("Default TV standard: NTSC-J\n");15661566 break;15671567 case ATOM_TV_PAL:15681568 tv_std = TV_STD_PAL;15691569- DRM_INFO("Default TV standard: PAL\n");15691569+ DRM_DEBUG_KMS("Default TV standard: PAL\n");15701570 break;15711571 case ATOM_TV_PALM:15721572 tv_std = TV_STD_PAL_M;15731573- DRM_INFO("Default TV standard: PAL-M\n");15731573+ DRM_DEBUG_KMS("Default TV standard: PAL-M\n");15741574 break;15751575 case ATOM_TV_PALN:15761576 tv_std = TV_STD_PAL_N;15771577- DRM_INFO("Default TV standard: PAL-N\n");15771577+ DRM_DEBUG_KMS("Default TV standard: PAL-N\n");15781578 break;15791579 case ATOM_TV_PALCN:15801580 tv_std = TV_STD_PAL_CN;15811581- DRM_INFO("Default TV standard: PAL-CN\n");15811581+ DRM_DEBUG_KMS("Default TV standard: PAL-CN\n");15821582 break;15831583 case ATOM_TV_PAL60:15841584 tv_std = TV_STD_PAL_60;15851585- DRM_INFO("Default TV standard: PAL-60\n");15851585+ DRM_DEBUG_KMS("Default TV standard: PAL-60\n");15861586 break;15871587 case ATOM_TV_SECAM:15881588 tv_std = TV_STD_SECAM;15891589- DRM_INFO("Default TV standard: SECAM\n");15891589+ DRM_DEBUG_KMS("Default TV standard: SECAM\n");15901590 break;15911591 default:15921592 tv_std = TV_STD_NTSC;15931593- DRM_INFO("Unknown TV standard; defaulting to NTSC\n");15931593+ DRM_DEBUG_KMS("Unknown TV standard; defaulting to NTSC\n");15941594 break;15951595 }15961596 }
+13-13
drivers/gpu/drm/radeon/radeon_combios.c
···913913 switch (RBIOS8(tv_info + 7) & 0xf) {914914 case 1:915915 tv_std = TV_STD_NTSC;916916- DRM_INFO("Default TV standard: NTSC\n");916916+ DRM_DEBUG_KMS("Default TV standard: NTSC\n");917917 break;918918 case 2:919919 tv_std = TV_STD_PAL;920920- DRM_INFO("Default TV standard: PAL\n");920920+ DRM_DEBUG_KMS("Default TV standard: PAL\n");921921 break;922922 case 3:923923 tv_std = TV_STD_PAL_M;924924- DRM_INFO("Default TV standard: PAL-M\n");924924+ DRM_DEBUG_KMS("Default TV standard: PAL-M\n");925925 break;926926 case 4:927927 tv_std = TV_STD_PAL_60;928928- DRM_INFO("Default TV standard: PAL-60\n");928928+ DRM_DEBUG_KMS("Default TV standard: PAL-60\n");929929 break;930930 case 5:931931 tv_std = TV_STD_NTSC_J;932932- DRM_INFO("Default TV standard: NTSC-J\n");932932+ DRM_DEBUG_KMS("Default TV standard: NTSC-J\n");933933 break;934934 case 6:935935 tv_std = TV_STD_SCART_PAL;936936- DRM_INFO("Default TV standard: SCART-PAL\n");936936+ DRM_DEBUG_KMS("Default TV standard: SCART-PAL\n");937937 break;938938 default:939939 tv_std = TV_STD_NTSC;940940- DRM_INFO940940+ DRM_DEBUG_KMS941941 ("Unknown TV standard; defaulting to NTSC\n");942942 break;943943 }944944945945 switch ((RBIOS8(tv_info + 9) >> 2) & 0x3) {946946 case 0:947947- DRM_INFO("29.498928713 MHz TV ref clk\n");947947+ DRM_DEBUG_KMS("29.498928713 MHz TV ref clk\n");948948 break;949949 case 1:950950- DRM_INFO("28.636360000 MHz TV ref clk\n");950950+ DRM_DEBUG_KMS("28.636360000 MHz TV ref clk\n");951951 break;952952 case 2:953953- DRM_INFO("14.318180000 MHz TV ref clk\n");953953+ DRM_DEBUG_KMS("14.318180000 MHz TV ref clk\n");954954 break;955955 case 3:956956- DRM_INFO("27.000000000 MHz TV ref clk\n");956956+ DRM_DEBUG_KMS("27.000000000 MHz TV ref clk\n");957957 break;958958 default:959959 break;···1324132413251325 if (tmds_info) {13261326 ver = RBIOS8(tmds_info);13271327- DRM_INFO("DFP table revision: %d\n", ver);13271327+ DRM_DEBUG_KMS("DFP table revision: %d\n", ver);13281328 if (ver == 3) {13291329 n = RBIOS8(tmds_info + 5) + 1;13301330 if (n > 4)···14081408 offset = combios_get_table_offset(dev, COMBIOS_EXT_TMDS_INFO_TABLE);14091409 if (offset) {14101410 ver = RBIOS8(offset);14111411- DRM_INFO("External TMDS Table revision: %d\n", ver);14111411+ DRM_DEBUG_KMS("External TMDS Table revision: %d\n", ver);14121412 tmds->slave_addr = RBIOS8(offset + 4 + 2);14131413 tmds->slave_addr >>= 1; /* 7 bit addressing */14141414 gpio = RBIOS8(offset + 4 + 3);
···442442}443443444444/**445445+ * Call bo::reserved and with the lru lock held.446446+ * Will release GPU memory type usage on destruction.447447+ * This is the place to put in driver specific hooks.448448+ * Will release the bo::reserved lock and the449449+ * lru lock on exit.450450+ */451451+452452+static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo)453453+{454454+ struct ttm_bo_global *glob = bo->glob;455455+456456+ if (bo->ttm) {457457+458458+ /**459459+ * Release the lru_lock, since we don't want to have460460+ * an atomic requirement on ttm_tt[unbind|destroy].461461+ */462462+463463+ spin_unlock(&glob->lru_lock);464464+ ttm_tt_unbind(bo->ttm);465465+ ttm_tt_destroy(bo->ttm);466466+ bo->ttm = NULL;467467+ spin_lock(&glob->lru_lock);468468+ }469469+470470+ if (bo->mem.mm_node) {471471+ drm_mm_put_block(bo->mem.mm_node);472472+ bo->mem.mm_node = NULL;473473+ }474474+475475+ atomic_set(&bo->reserved, 0);476476+ wake_up_all(&bo->event_queue);477477+ spin_unlock(&glob->lru_lock);478478+}479479+480480+481481+/**445482 * If bo idle, remove from delayed- and lru lists, and unref.446483 * If not idle, and already on delayed list, do nothing.447484 * If not idle, and not on delayed list, put on delayed list,···493456 int ret;494457495458 spin_lock(&bo->lock);459459+retry:496460 (void) ttm_bo_wait(bo, false, false, !remove_all);497461498462 if (!bo->sync_obj) {···502464 spin_unlock(&bo->lock);503465504466 spin_lock(&glob->lru_lock);505505- put_count = ttm_bo_del_from_lru(bo);467467+ ret = ttm_bo_reserve_locked(bo, false, !remove_all, false, 0);506468507507- ret = ttm_bo_reserve_locked(bo, false, false, false, 0);508508- BUG_ON(ret);509509- if (bo->ttm)510510- ttm_tt_unbind(bo->ttm);469469+ /**470470+ * Someone else has the object reserved. Bail and retry.471471+ */472472+473473+ if (unlikely(ret == -EBUSY)) {474474+ spin_unlock(&glob->lru_lock);475475+ spin_lock(&bo->lock);476476+ goto requeue;477477+ }478478+479479+ /**480480+ * We can re-check for sync object without taking481481+ * the bo::lock since setting the sync object requires482482+ * also bo::reserved. A busy object at this point may483483+ * be caused by another thread starting an accelerated484484+ * eviction.485485+ */486486+487487+ if (unlikely(bo->sync_obj)) {488488+ atomic_set(&bo->reserved, 0);489489+ wake_up_all(&bo->event_queue);490490+ spin_unlock(&glob->lru_lock);491491+ spin_lock(&bo->lock);492492+ if (remove_all)493493+ goto retry;494494+ else495495+ goto requeue;496496+ }497497+498498+ put_count = ttm_bo_del_from_lru(bo);511499512500 if (!list_empty(&bo->ddestroy)) {513501 list_del_init(&bo->ddestroy);514502 ++put_count;515503 }516516- if (bo->mem.mm_node) {517517- drm_mm_put_block(bo->mem.mm_node);518518- bo->mem.mm_node = NULL;519519- }520520- spin_unlock(&glob->lru_lock);521504522522- atomic_set(&bo->reserved, 0);505505+ ttm_bo_cleanup_memtype_use(bo);523506524507 while (put_count--)525508 kref_put(&bo->list_kref, ttm_bo_ref_bug);526509527510 return 0;528511 }529529-512512+requeue:530513 spin_lock(&glob->lru_lock);531514 if (list_empty(&bo->ddestroy)) {532515 void *sync_obj = bo->sync_obj;
···71717272static int pca_isa_waitforcompletion(void *pd)7373{7474- long ret = ~0;7574 unsigned long timeout;7575+ long ret;76767777 if (irq > -1) {7878 ret = wait_event_timeout(pca_wait,···8181 } else {8282 /* Do polling */8383 timeout = jiffies + pca_isa_ops.timeout;8484- while (((pca_isa_readbyte(pd, I2C_PCA_CON)8585- & I2C_PCA_CON_SI) == 0)8686- && (ret = time_before(jiffies, timeout)))8484+ do {8585+ ret = time_before(jiffies, timeout);8686+ if (pca_isa_readbyte(pd, I2C_PCA_CON)8787+ & I2C_PCA_CON_SI)8888+ break;8789 udelay(100);9090+ } while (ret);8891 }9292+8993 return ret > 0;9094}9195
+7-4
drivers/i2c/busses/i2c-pca-platform.c
···8080static int i2c_pca_pf_waitforcompletion(void *pd)8181{8282 struct i2c_pca_pf_data *i2c = pd;8383- long ret = ~0;8483 unsigned long timeout;8484+ long ret;85858686 if (i2c->irq) {8787 ret = wait_event_timeout(i2c->wait,···9090 } else {9191 /* Do polling */9292 timeout = jiffies + i2c->adap.timeout;9393- while (((i2c->algo_data.read_byte(i2c, I2C_PCA_CON)9494- & I2C_PCA_CON_SI) == 0)9595- && (ret = time_before(jiffies, timeout)))9393+ do {9494+ ret = time_before(jiffies, timeout);9595+ if (i2c->algo_data.read_byte(i2c, I2C_PCA_CON)9696+ & I2C_PCA_CON_SI)9797+ break;9698 udelay(100);9999+ } while (ret);97100 }9810199102 return ret > 0;
+24-30
drivers/i2c/i2c-core.c
···3232#include <linux/init.h>3333#include <linux/idr.h>3434#include <linux/mutex.h>3535-#include <linux/of_i2c.h>3635#include <linux/of_device.h>3736#include <linux/completion.h>3837#include <linux/hardirq.h>···196197{197198 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;198199199199- if (pm_runtime_suspended(dev))200200- return 0;201201-202202- if (pm)203203- return pm->suspend ? pm->suspend(dev) : 0;200200+ if (pm) {201201+ if (pm_runtime_suspended(dev))202202+ return 0;203203+ else204204+ return pm->suspend ? pm->suspend(dev) : 0;205205+ }204206205207 return i2c_legacy_suspend(dev, PMSG_SUSPEND);206208}···216216 else217217 ret = i2c_legacy_resume(dev);218218219219- if (!ret) {220220- pm_runtime_disable(dev);221221- pm_runtime_set_active(dev);222222- pm_runtime_enable(dev);223223- }224224-225219 return ret;226220}227221···223229{224230 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;225231226226- if (pm_runtime_suspended(dev))227227- return 0;228228-229229- if (pm)230230- return pm->freeze ? pm->freeze(dev) : 0;232232+ if (pm) {233233+ if (pm_runtime_suspended(dev))234234+ return 0;235235+ else236236+ return pm->freeze ? pm->freeze(dev) : 0;237237+ }231238232239 return i2c_legacy_suspend(dev, PMSG_FREEZE);233240}···237242{238243 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;239244240240- if (pm_runtime_suspended(dev))241241- return 0;242242-243243- if (pm)244244- return pm->thaw ? pm->thaw(dev) : 0;245245+ if (pm) {246246+ if (pm_runtime_suspended(dev))247247+ return 0;248248+ else249249+ return pm->thaw ? pm->thaw(dev) : 0;250250+ }245251246252 return i2c_legacy_resume(dev);247253}···251255{252256 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;253257254254- if (pm_runtime_suspended(dev))255255- return 0;256256-257257- if (pm)258258- return pm->poweroff ? pm->poweroff(dev) : 0;258258+ if (pm) {259259+ if (pm_runtime_suspended(dev))260260+ return 0;261261+ else262262+ return pm->poweroff ? pm->poweroff(dev) : 0;263263+ }259264260265 return i2c_legacy_suspend(dev, PMSG_HIBERNATE);261266}···872875 /* create pre-declared device nodes */873876 if (adap->nr < __i2c_first_dynamic_bus_num)874877 i2c_scan_static_board_info(adap);875875-876876- /* Register devices from the device tree */877877- of_i2c_register_devices(adap);878878879879 /* Notify drivers */880880 mutex_lock(&core_lock);
···1839183918401840 /* take from bio_init */18411841 bio->bi_next = NULL;18421842+ bio->bi_flags &= ~(BIO_POOL_MASK-1);18421843 bio->bi_flags |= 1 << BIO_UPTODATE;18441844+ bio->bi_comp_cpu = -1;18431845 bio->bi_rw = READ;18441846 bio->bi_vcnt = 0;18451847 bio->bi_idx = 0;···19141912 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))19151913 break;19161914 BUG_ON(sync_blocks < (PAGE_SIZE>>9));19171917- if (len > (sync_blocks<<9))19151915+ if ((len >> 9) > sync_blocks)19181916 len = sync_blocks<<9;19191917 }19201918
+8-1
drivers/media/IR/ir-keytable.c
···319319 * a keyup event might follow immediately after the keydown.320320 */321321 spin_lock_irqsave(&ir->keylock, flags);322322- if (time_is_after_eq_jiffies(ir->keyup_jiffies))322322+ if (time_is_before_eq_jiffies(ir->keyup_jiffies))323323 ir_keyup(ir);324324 spin_unlock_irqrestore(&ir->keylock, flags);325325}···509509 driver_name, rc_tab->name,510510 (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ?511511 " in raw mode" : "");512512+513513+ /*514514+ * Default delay of 250ms is too short for some protocols, expecially515515+ * since the timeout is currently set to 250ms. Increase it to 500ms,516516+ * to avoid wrong repetition of the keycodes.517517+ */518518+ input_dev->rep[REP_DELAY] = 500;512519513520 return 0;514521
+1-1
drivers/media/IR/ir-lirc-codec.c
···267267 features |= LIRC_CAN_SET_SEND_CARRIER;268268269269 if (ir_dev->props->s_tx_duty_cycle)270270- features |= LIRC_CAN_SET_REC_DUTY_CYCLE;270270+ features |= LIRC_CAN_SET_SEND_DUTY_CYCLE;271271 }272272273273 if (ir_dev->props->s_rx_carrier_range)
+3-1
drivers/media/IR/ir-raw-event.c
···279279 "rc%u", (unsigned int)ir->devno);280280281281 if (IS_ERR(ir->raw->thread)) {282282+ int ret = PTR_ERR(ir->raw->thread);283283+282284 kfree(ir->raw);283285 ir->raw = NULL;284284- return PTR_ERR(ir->raw->thread);286286+ return ret;285287 }286288287289 mutex_lock(&ir_raw_handler_lock);
+11-6
drivers/media/IR/ir-sysfs.c
···6767 char *tmp = buf;6868 int i;69697070- if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {7070+ if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {7171 enabled = ir_dev->rc_tab.ir_type;7272 allowed = ir_dev->props->allowed_protos;7373- } else {7373+ } else if (ir_dev->raw) {7474 enabled = ir_dev->raw->enabled_protocols;7575 allowed = ir_raw_get_allowed_protocols();7676- }7676+ } else7777+ return sprintf(tmp, "[builtin]\n");77787879 IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",7980 (long long)allowed,···122121 int rc, i, count = 0;123122 unsigned long flags;124123125125- if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)124124+ if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE)126125 type = ir_dev->rc_tab.ir_type;127127- else126126+ else if (ir_dev->raw)128127 type = ir_dev->raw->enabled_protocols;128128+ else {129129+ IR_dprintk(1, "Protocol switching not supported\n");130130+ return -EINVAL;131131+ }129132130133 while ((tmp = strsep((char **) &data, " \n")) != NULL) {131134 if (!*tmp)···190185 }191186 }192187193193- if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {188188+ if (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_SCANCODE) {194189 spin_lock_irqsave(&ir_dev->rc_tab.lock, flags);195190 ir_dev->rc_tab.ir_type = type;196191 spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags);
···10981098 *10991099 * @return pointer to descriptor on success, NULL on error.11001100 */11011101-struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)11011101+11021102+struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)11021103{11031104 struct smscore_buffer_t *cb = NULL;11041105 unsigned long flags;1105110611061106- DEFINE_WAIT(wait);11071107-11081107 spin_lock_irqsave(&coredev->bufferslock, flags);11091109-11101110- /* This function must return a valid buffer, since the buffer list is11111111- * finite, we check that there is an available buffer, if not, we wait11121112- * until such buffer become available.11131113- */11141114-11151115- prepare_to_wait(&coredev->buffer_mng_waitq, &wait, TASK_INTERRUPTIBLE);11161116- if (list_empty(&coredev->buffers)) {11171117- spin_unlock_irqrestore(&coredev->bufferslock, flags);11181118- schedule();11191119- spin_lock_irqsave(&coredev->bufferslock, flags);11081108+ if (!list_empty(&coredev->buffers)) {11091109+ cb = (struct smscore_buffer_t *) coredev->buffers.next;11101110+ list_del(&cb->entry);11201111 }11211121-11221122- finish_wait(&coredev->buffer_mng_waitq, &wait);11231123-11241124- cb = (struct smscore_buffer_t *) coredev->buffers.next;11251125- list_del(&cb->entry);11261126-11271112 spin_unlock_irqrestore(&coredev->bufferslock, flags);11131113+ return cb;11141114+}11151115+11161116+struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)11171117+{11181118+ struct smscore_buffer_t *cb = NULL;11191119+11201120+ wait_event(coredev->buffer_mng_waitq, (cb = get_entry(coredev)));1128112111291122 return cb;11301123}
···17171818config VIDEO_CX88_ALSA1919 tristate "Conexant 2388x DMA audio support"2020- depends on VIDEO_CX88 && SND && EXPERIMENTAL2020+ depends on VIDEO_CX88 && SND2121 select SND_PCM2222 ---help---2323 This is a video4linux driver for direct (DMA) audio on
···402402 if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC)403403 return -EINVAL;404404 break;405405- case 0:406406- /* No format change, only geometry */407407- break;408405 default:409406 return -EINVAL;410407 }
···16311631 if (host->bus_ops && !host->bus_dead) {16321632 if (host->bus_ops->suspend)16331633 err = host->bus_ops->suspend(host);16341634+ if (err == -ENOSYS || !host->bus_ops->resume) {16351635+ /*16361636+ * We simply "remove" the card in this case.16371637+ * It will be redetected on resume.16381638+ */16391639+ if (host->bus_ops->remove)16401640+ host->bus_ops->remove(host);16411641+ mmc_claim_host(host);16421642+ mmc_detach_bus(host);16431643+ mmc_release_host(host);16441644+ host->pm_flags = 0;16451645+ err = 0;16461646+ }16341647 }16351648 mmc_bus_put(host);16361649
+2-2
drivers/net/Kconfig
···2428242824292429config MV643XX_ETH24302430 tristate "Marvell Discovery (643XX) and Orion ethernet support"24312431- depends on MV64X60 || PPC32 || PLAT_ORION24312431+ depends on (MV64X60 || PPC32 || PLAT_ORION) && INET24322432 select INET_LRO24332433 select PHYLIB24342434 help···2803280328042804config PASEMI_MAC28052805 tristate "PA Semi 1/10Gbit MAC"28062806- depends on PPC_PASEMI && PCI28062806+ depends on PPC_PASEMI && PCI && INET28072807 select PHYLIB28082808 select INET_LRO28092809 help
···51645164 res = dev_alloc_name(bond_dev, "bond%d");51655165 if (res < 0)51665166 goto out;51675167+ } else {51685168+ /*51695169+ * If we're given a name to register51705170+ * we need to ensure that its not already51715171+ * registered51725172+ */51735173+ res = -EEXIST;51745174+ if (__dev_get_by_name(net, name) != NULL)51755175+ goto out;51675176 }5168517751695178 res = register_netdevice(bond_dev);
+8-1
drivers/net/ehea/ehea_main.c
···533533 int length = cqe->num_bytes_transfered - 4; /*remove CRC */534534535535 skb_put(skb, length);536536- skb->ip_summed = CHECKSUM_UNNECESSARY;537536 skb->protocol = eth_type_trans(skb, dev);537537+538538+ /* The packet was not an IPV4 packet so a complemented checksum was539539+ calculated. The value is found in the Internet Checksum field. */540540+ if (cqe->status & EHEA_CQE_BLIND_CKSUM) {541541+ skb->ip_summed = CHECKSUM_COMPLETE;542542+ skb->csum = csum_unfold(~cqe->inet_checksum_value);543543+ } else544544+ skb->ip_summed = CHECKSUM_UNNECESSARY;538545}539546540547static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
···191191 struct isl_pmic *pmic = i2c_get_clientdata(i2c);192192 int i;193193194194- i2c_set_clientdata(i2c, NULL);195195-196194 for (i = 0; i < 3; i++)197195 regulator_unregister(pmic->rdev[i]);198196
···134134 if (!dump_write(file, dump_start, dump_size))135135 goto end_coredump;136136 }137137-/* Finally dump the task struct. Not be used by gdb, but could be useful */138138- set_fs(KERNEL_DS);139139- if (!dump_write(file, current, sizeof(*current)))140140- goto end_coredump;141137end_coredump:142138 set_fs(fs);143139 return has_dumped;
+18-13
fs/ceph/caps.c
···22832283{22842284 struct ceph_inode_info *ci = ceph_inode(inode);22852285 int mds = session->s_mds;22862286- int seq = le32_to_cpu(grant->seq);22862286+ unsigned seq = le32_to_cpu(grant->seq);22872287+ unsigned issue_seq = le32_to_cpu(grant->issue_seq);22872288 int newcaps = le32_to_cpu(grant->caps);22882289 int issued, implemented, used, wanted, dirty;22892290 u64 size = le64_to_cpu(grant->size);···22962295 int revoked_rdcache = 0;22972296 int queue_invalidate = 0;2298229722992299- dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",23002300- inode, cap, mds, seq, ceph_cap_string(newcaps));22982298+ dout("handle_cap_grant inode %p cap %p mds%d seq %u/%u %s\n",22992299+ inode, cap, mds, seq, issue_seq, ceph_cap_string(newcaps));23012300 dout(" size %llu max_size %llu, i_size %llu\n", size, max_size,23022301 inode->i_size);23032302···23932392 }2394239323952394 cap->seq = seq;23952395+ cap->issue_seq = issue_seq;2396239623972397 /* file layout may have changed */23982398 ci->i_layout = grant->layout;···27762774 if (op == CEPH_CAP_OP_IMPORT)27772775 __queue_cap_release(session, vino.ino, cap_id,27782776 mseq, seq);27792779-27802780- /*27812781- * send any full release message to try to move things27822782- * along for the mds (who clearly thinks we still have this27832783- * cap).27842784- */27852785- ceph_add_cap_releases(mdsc, session);27862786- ceph_send_cap_releases(mdsc, session);27872787- goto done;27772777+ goto flush_cap_releases;27882778 }2789277927902780 /* these will work even if we don't have a cap yet */···28042810 dout(" no cap on %p ino %llx.%llx from mds%d\n",28052811 inode, ceph_ino(inode), ceph_snap(inode), mds);28062812 spin_unlock(&inode->i_lock);28072807- goto done;28132813+ goto flush_cap_releases;28082814 }2809281528102816 /* note that each of these drops i_lock for us */···28272833 pr_err("ceph_handle_caps: unknown cap op %d %s\n", op,28282834 ceph_cap_op_name(op));28292835 }28362836+28372837+ goto done;28382838+28392839+flush_cap_releases:28402840+ /*28412841+ * send any full release message to try to move things28422842+ * along for the mds (who clearly thinks we still have this28432843+ * cap).28442844+ */28452845+ ceph_add_cap_releases(mdsc, session);28462846+ ceph_send_cap_releases(mdsc, session);2830284728312848done:28322849 mutex_unlock(&session->s_mutex);
+13-8
fs/ceph/export.c
···4242static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len,4343 int connectable)4444{4545+ int type;4546 struct ceph_nfs_fh *fh = (void *)rawfh;4647 struct ceph_nfs_confh *cfh = (void *)rawfh;4748 struct dentry *parent = dentry->d_parent;4849 struct inode *inode = dentry->d_inode;4949- int type;5050+ int connected_handle_length = sizeof(*cfh)/4;5151+ int handle_length = sizeof(*fh)/4;50525153 /* don't re-export snaps */5254 if (ceph_snap(inode) != CEPH_NOSNAP)5355 return -EINVAL;54565555- if (*max_len >= sizeof(*cfh)) {5757+ if (*max_len >= connected_handle_length) {5658 dout("encode_fh %p connectable\n", dentry);5759 cfh->ino = ceph_ino(dentry->d_inode);5860 cfh->parent_ino = ceph_ino(parent->d_inode);5961 cfh->parent_name_hash = parent->d_name.hash;6060- *max_len = sizeof(*cfh);6262+ *max_len = connected_handle_length;6163 type = 2;6262- } else if (*max_len > sizeof(*fh)) {6363- if (connectable)6464- return -ENOSPC;6464+ } else if (*max_len >= handle_length) {6565+ if (connectable) {6666+ *max_len = connected_handle_length;6767+ return 255;6868+ }6569 dout("encode_fh %p\n", dentry);6670 fh->ino = ceph_ino(dentry->d_inode);6767- *max_len = sizeof(*fh);7171+ *max_len = handle_length;6872 type = 1;6973 } else {7070- return -ENOSPC;7474+ *max_len = handle_length;7575+ return 255;7176 }7277 return type;7378}
+1-1
fs/ceph/file.c
···697697 * start_request so that a tid has been assigned.698698 */699699 spin_lock(&ci->i_unsafe_lock);700700- list_add(&ci->i_unsafe_writes, &req->r_unsafe_item);700700+ list_add(&req->r_unsafe_item, &ci->i_unsafe_writes);701701 spin_unlock(&ci->i_unsafe_lock);702702 ceph_get_cap_refs(ci, CEPH_CAP_FILE_WR);703703 }
+1-1
fs/ceph/osd_client.c
···549549 */550550static void __cancel_request(struct ceph_osd_request *req)551551{552552- if (req->r_sent) {552552+ if (req->r_sent && req->r_osd) {553553 ceph_con_revoke(&req->r_osd->o_con, req->r_request);554554 req->r_sent = 0;555555 }
+40
fs/exec.c
···20142014fail:20152015 return;20162016}20172017+20182018+/*20192019+ * Core dumping helper functions. These are the only things you should20202020+ * do on a core-file: use only these functions to write out all the20212021+ * necessary info.20222022+ */20232023+int dump_write(struct file *file, const void *addr, int nr)20242024+{20252025+ return access_ok(VERIFY_READ, addr, nr) && file->f_op->write(file, addr, nr, &file->f_pos) == nr;20262026+}20272027+EXPORT_SYMBOL(dump_write);20282028+20292029+int dump_seek(struct file *file, loff_t off)20302030+{20312031+ int ret = 1;20322032+20332033+ if (file->f_op->llseek && file->f_op->llseek != no_llseek) {20342034+ if (file->f_op->llseek(file, off, SEEK_CUR) < 0)20352035+ return 0;20362036+ } else {20372037+ char *buf = (char *)get_zeroed_page(GFP_KERNEL);20382038+20392039+ if (!buf)20402040+ return 0;20412041+ while (off > 0) {20422042+ unsigned long n = off;20432043+20442044+ if (n > PAGE_SIZE)20452045+ n = PAGE_SIZE;20462046+ if (!dump_write(file, buf, n)) {20472047+ ret = 0;20482048+ break;20492049+ }20502050+ off -= n;20512051+ }20522052+ free_page((unsigned long)buf);20532053+ }20542054+ return ret;20552055+}20562056+EXPORT_SYMBOL(dump_seek);
+7-1
fs/exofs/inode.c
···5454 unsigned nr_pages;5555 unsigned long length;5656 loff_t pg_first; /* keep 64bit also in 32-arches */5757+ bool read_4_write; /* This means two things: that the read is sync5858+ * And the pages should not be unlocked.5959+ */5760};58615962static void _pcol_init(struct page_collect *pcol, unsigned expected_pages,···7471 pcol->nr_pages = 0;7572 pcol->length = 0;7673 pcol->pg_first = -1;7474+ pcol->read_4_write = false;7775}78767977static void _pcol_reset(struct page_collect *pcol)···351347 if (PageError(page))352348 ClearPageError(page);353349354354- unlock_page(page);350350+ if (!pcol->read_4_write)351351+ unlock_page(page);355352 EXOFS_DBGMSG("readpage_strip(0x%lx, 0x%lx) empty page,"356353 " splitting\n", inode->i_ino, page->index);357354···433428 /* readpage_strip might call read_exec(,is_sync==false) at several434429 * places but not if we have a single page.435430 */431431+ pcol.read_4_write = is_sync;436432 ret = readpage_strip(&pcol, page);437433 if (ret) {438434 EXOFS_ERR("_readpage => %d\n", ret);
···668668 xfs_perag_put(pag);669669}670670671671-void672672-__xfs_inode_clear_reclaim_tag(673673- xfs_mount_t *mp,671671+STATIC void672672+__xfs_inode_clear_reclaim(674673 xfs_perag_t *pag,675674 xfs_inode_t *ip)676675{677677- radix_tree_tag_clear(&pag->pag_ici_root,678678- XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG);679676 pag->pag_ici_reclaimable--;680677 if (!pag->pag_ici_reclaimable) {681678 /* clear the reclaim tag from the perag radix tree */···684687 trace_xfs_perag_clear_reclaim(ip->i_mount, pag->pag_agno,685688 -1, _RET_IP_);686689 }690690+}691691+692692+void693693+__xfs_inode_clear_reclaim_tag(694694+ xfs_mount_t *mp,695695+ xfs_perag_t *pag,696696+ xfs_inode_t *ip)697697+{698698+ radix_tree_tag_clear(&pag->pag_ici_root,699699+ XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG);700700+ __xfs_inode_clear_reclaim(pag, ip);687701}688702689703/*···846838 if (!radix_tree_delete(&pag->pag_ici_root,847839 XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino)))848840 ASSERT(0);841841+ __xfs_inode_clear_reclaim(pag, ip);849842 write_unlock(&pag->pag_ici_lock);850843851844 /*
+3-1
include/drm/ttm/ttm_bo_api.h
···246246247247 atomic_t reserved;248248249249-250249 /**251250 * Members protected by the bo::lock251251+ * In addition, setting sync_obj to anything else252252+ * than NULL requires bo::reserved to be held. This allows for253253+ * checking NULL while reserved but not holding bo::lock.252254 */253255254256 void *sync_obj_arg;
···99 * These are the only things you should do on a core-file: use only these1010 * functions to write out all the necessary info.1111 */1212-static inline int dump_write(struct file *file, const void *addr, int nr)1313-{1414- return file->f_op->write(file, addr, nr, &file->f_pos) == nr;1515-}1616-1717-static inline int dump_seek(struct file *file, loff_t off)1818-{1919- int ret = 1;2020-2121- if (file->f_op->llseek && file->f_op->llseek != no_llseek) {2222- if (file->f_op->llseek(file, off, SEEK_CUR) < 0)2323- return 0;2424- } else {2525- char *buf = (char *)get_zeroed_page(GFP_KERNEL);2626-2727- if (!buf)2828- return 0;2929- while (off > 0) {3030- unsigned long n = off;3131-3232- if (n > PAGE_SIZE)3333- n = PAGE_SIZE;3434- if (!dump_write(file, buf, n)) {3535- ret = 0;3636- break;3737- }3838- off -= n;3939- }4040- free_page((unsigned long)buf);4141- }4242- return ret;4343-}1212+extern int dump_write(struct file *file, const void *addr, int nr);1313+extern int dump_seek(struct file *file, loff_t off);44144515#endif /* _LINUX_COREDUMP_H */
···121121typedef __s64 int64_t;122122#endif123123124124-/* this is a special 64bit data type that is 8-byte aligned */124124+/*125125+ * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid126126+ * common 32/64-bit compat problems.127127+ * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other128128+ * architectures) and to 8-byte boundaries on 64-bit architetures. The new129129+ * aligned_64 type enforces 8-byte alignment so that structs containing130130+ * aligned_64 values have the same alignment on 32-bit and 64-bit architectures.131131+ * No conversions are necessary between 32-bit user-space and a 64-bit kernel.132132+ */125133#define aligned_u64 __u64 __attribute__((aligned(8)))126134#define aligned_be64 __be64 __attribute__((aligned(8)))127135#define aligned_le64 __le64 __attribute__((aligned(8)))···185177186178typedef __u16 __bitwise __sum16;187179typedef __u32 __bitwise __wsum;180180+181181+/* this is a special 64bit data type that is 8-byte aligned */182182+#define __aligned_u64 __u64 __attribute__((aligned(8)))183183+#define __aligned_be64 __be64 __attribute__((aligned(8)))184184+#define __aligned_le64 __le64 __attribute__((aligned(8)))188185189186#ifdef __KERNEL__190187typedef unsigned __bitwise__ gfp_t;
+1
include/media/videobuf-dma-sg.h
···48484949 /* for userland buffer */5050 int offset;5151+ size_t size;5152 struct page **pages;52535354 /* for kernel buffers */
···143143 if (!table->maxlen)144144 set_fail(&fail, table, "No maxlen");145145 }146146- if ((table->proc_handler == proc_doulongvec_minmax) ||147147- (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) {148148- if (table->maxlen > sizeof (unsigned long)) {149149- if (!table->extra1)150150- set_fail(&fail, table, "No min");151151- if (!table->extra2)152152- set_fail(&fail, table, "No max");153153- }154154- }155146#ifdef CONFIG_PROC_SYSCTL156147 if (table->procname && !table->proc_handler)157148 set_fail(&fail, table, "No proc_handler");
+1-1
kernel/trace/ring_buffer.c
···405405#define BUF_MAX_DATA_SIZE (BUF_PAGE_SIZE - (sizeof(u32) * 2))406406407407/* Max number of timestamps that can fit on a page */408408-#define RB_TIMESTAMPS_PER_PAGE (BUF_PAGE_SIZE / RB_LEN_TIME_STAMP)408408+#define RB_TIMESTAMPS_PER_PAGE (BUF_PAGE_SIZE / RB_LEN_TIME_EXTEND)409409410410int ring_buffer_print_page_header(struct trace_seq *s)411411{
+7-3
mm/memcontrol.c
···3587358735883588static void mem_cgroup_threshold(struct mem_cgroup *memcg)35893589{35903590- __mem_cgroup_threshold(memcg, false);35913591- if (do_swap_account)35923592- __mem_cgroup_threshold(memcg, true);35903590+ while (memcg) {35913591+ __mem_cgroup_threshold(memcg, false);35923592+ if (do_swap_account)35933593+ __mem_cgroup_threshold(memcg, true);35943594+35953595+ memcg = parent_mem_cgroup(memcg);35963596+ }35933597}3594359835953599static int compare_thresholds(const void *a, const void *b)
+6-6
mm/memory-failure.c
···183183 * signal.184184 */185185static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno,186186- unsigned long pfn)186186+ unsigned long pfn, struct page *page)187187{188188 struct siginfo si;189189 int ret;···198198#ifdef __ARCH_SI_TRAPNO199199 si.si_trapno = trapno;200200#endif201201- si.si_addr_lsb = PAGE_SHIFT;201201+ si.si_addr_lsb = compound_order(compound_head(page)) + PAGE_SHIFT;202202 /*203203 * Don't use force here, it's convenient if the signal204204 * can be temporarily blocked.···235235 int nr;236236 do {237237 nr = shrink_slab(1000, GFP_KERNEL, 1000);238238- if (page_count(p) == 0)238238+ if (page_count(p) == 1)239239 break;240240 } while (nr > 10);241241 }···327327 * wrong earlier.328328 */329329static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno,330330- int fail, unsigned long pfn)330330+ int fail, struct page *page, unsigned long pfn)331331{332332 struct to_kill *tk, *next;333333···352352 * process anyways.353353 */354354 else if (kill_proc_ao(tk->tsk, tk->addr, trapno,355355- pfn) < 0)355355+ pfn, page) < 0)356356 printk(KERN_ERR357357 "MCE %#lx: Cannot send advisory machine check signal to %s:%d\n",358358 pfn, tk->tsk->comm, tk->tsk->pid);···928928 * any accesses to the poisoned memory.929929 */930930 kill_procs_ao(&tokill, !!PageDirty(hpage), trapno,931931- ret != SWAP_SUCCESS, pfn);931931+ ret != SWAP_SUCCESS, p, pfn);932932933933 return ret;934934}
···8282static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)8383{8484 struct sock *sk = d->owner, *parent;8585+ unsigned long flags;8686+8587 if (!sk)8688 return;87898890 BT_DBG("dlc %p state %ld err %d", d, d->state, err);89919292+ local_irq_save(flags);9093 bh_lock_sock(sk);91949295 if (err)···111108 }112109113110 bh_unlock_sock(sk);111111+ local_irq_restore(flags);114112115113 if (parent && sock_flag(sk, SOCK_ZAPPED)) {116114 /* We have to drop DLC lock here, otherwise
+15-6
net/caif/caif_socket.c
···827827 long timeo;828828 int err;829829 int ifindex, headroom, tailroom;830830+ unsigned int mtu;830831 struct net_device *dev;831832832833 lock_sock(sk);···897896 cf_sk->sk.sk_state = CAIF_DISCONNECTED;898897 goto out;899898 }900900- dev = dev_get_by_index(sock_net(sk), ifindex);899899+900900+ err = -ENODEV;901901+ rcu_read_lock();902902+ dev = dev_get_by_index_rcu(sock_net(sk), ifindex);903903+ if (!dev) {904904+ rcu_read_unlock();905905+ goto out;906906+ }901907 cf_sk->headroom = LL_RESERVED_SPACE_EXTRA(dev, headroom);908908+ mtu = dev->mtu;909909+ rcu_read_unlock();910910+902911 cf_sk->tailroom = tailroom;903903- cf_sk->maxframe = dev->mtu - (headroom + tailroom);904904- dev_put(dev);912912+ cf_sk->maxframe = mtu - (headroom + tailroom);905913 if (cf_sk->maxframe < 1) {906906- pr_warning("CAIF: %s(): CAIF Interface MTU too small (%d)\n",907907- __func__, dev->mtu);908908- err = -ENODEV;914914+ pr_warning("CAIF: %s(): CAIF Interface MTU too small (%u)\n",915915+ __func__, mtu);909916 goto out;910917 }911918
+4-4
net/core/ethtool.c
···348348 if (info.cmd == ETHTOOL_GRXCLSRLALL) {349349 if (info.rule_cnt > 0) {350350 if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32))351351- rule_buf = kmalloc(info.rule_cnt * sizeof(u32),351351+ rule_buf = kzalloc(info.rule_cnt * sizeof(u32),352352 GFP_USER);353353 if (!rule_buf)354354 return -ENOMEM;···397397 (KMALLOC_MAX_SIZE - sizeof(*indir)) / sizeof(*indir->ring_index))398398 return -ENOMEM;399399 full_size = sizeof(*indir) + sizeof(*indir->ring_index) * table_size;400400- indir = kmalloc(full_size, GFP_USER);400400+ indir = kzalloc(full_size, GFP_USER);401401 if (!indir)402402 return -ENOMEM;403403···538538539539 gstrings.len = ret;540540541541- data = kmalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER);541541+ data = kzalloc(gstrings.len * ETH_GSTRING_LEN, GFP_USER);542542 if (!data)543543 return -ENOMEM;544544···775775 if (regs.len > reglen)776776 regs.len = reglen;777777778778- regbuf = kmalloc(reglen, GFP_USER);778778+ regbuf = kzalloc(reglen, GFP_USER);779779 if (!regbuf)780780 return -ENOMEM;781781
···413413 If unsure, say Y.414414415415config INET_LRO416416- bool "Large Receive Offload (ipv4/tcp)"416416+ tristate "Large Receive Offload (ipv4/tcp)"417417 default y418418 ---help---419419 Support for Large Receive Offload (ipv4/tcp).
+13-1
net/ipv4/igmp.c
···834834 int mark = 0;835835836836837837- if (len == 8 || IGMP_V2_SEEN(in_dev)) {837837+ if (len == 8) {838838 if (ih->code == 0) {839839 /* Alas, old v1 router presents here. */840840···856856 igmpv3_clear_delrec(in_dev);857857 } else if (len < 12) {858858 return; /* ignore bogus packet; freed by caller */859859+ } else if (IGMP_V1_SEEN(in_dev)) {860860+ /* This is a v3 query with v1 queriers present */861861+ max_delay = IGMP_Query_Response_Interval;862862+ group = 0;863863+ } else if (IGMP_V2_SEEN(in_dev)) {864864+ /* this is a v3 query with v2 queriers present;865865+ * Interpretation of the max_delay code is problematic here.866866+ * A real v2 host would use ih_code directly, while v3 has a867867+ * different encoding. We use the v3 encoding as more likely868868+ * to be intended in a v3 query.869869+ */870870+ max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);859871 } else { /* v3 */860872 if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))861873 return;
+24-4
net/ipv6/route.c
···15561556 * i.e. Path MTU discovery15571557 */1558155815591559-void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,15601560- struct net_device *dev, u32 pmtu)15591559+static void rt6_do_pmtu_disc(struct in6_addr *daddr, struct in6_addr *saddr,15601560+ struct net *net, u32 pmtu, int ifindex)15611561{15621562 struct rt6_info *rt, *nrt;15631563- struct net *net = dev_net(dev);15641563 int allfrag = 0;1565156415661566- rt = rt6_lookup(net, daddr, saddr, dev->ifindex, 0);15651565+ rt = rt6_lookup(net, daddr, saddr, ifindex, 0);15671566 if (rt == NULL)15681567 return;15691568···16281629 }16291630out:16301631 dst_release(&rt->dst);16321632+}16331633+16341634+void rt6_pmtu_discovery(struct in6_addr *daddr, struct in6_addr *saddr,16351635+ struct net_device *dev, u32 pmtu)16361636+{16371637+ struct net *net = dev_net(dev);16381638+16391639+ /*16401640+ * RFC 1981 states that a node "MUST reduce the size of the packets it16411641+ * is sending along the path" that caused the Packet Too Big message.16421642+ * Since it's not possible in the general case to determine which16431643+ * interface was used to send the original packet, we update the MTU16441644+ * on the interface that will be used to send future packets. We also16451645+ * update the MTU on the interface that received the Packet Too Big in16461646+ * case the original packet was forced out that interface with16471647+ * SO_BINDTODEVICE or similar. This is the next best thing to the16481648+ * correct behaviour, which would be to update the MTU on all16491649+ * interfaces.16501650+ */16511651+ rt6_do_pmtu_disc(daddr, saddr, net, pmtu, 0);16521652+ rt6_do_pmtu_disc(daddr, saddr, net, pmtu, dev->ifindex);16311653}1632165416331655/*
+2
net/mac80211/agg-tx.c
···175175176176 set_bit(HT_AGG_STATE_STOPPING, &tid_tx->state);177177178178+ del_timer_sync(&tid_tx->addba_resp_timer);179179+178180 /*179181 * After this packets are no longer handed right through180182 * to the driver but are put onto tid_tx->pending instead,
···137137 int toff = off + key->off + (off2 & key->offmask);138138 __be32 *data, _data;139139140140- if (skb_headroom(skb) + toff < 0)140140+ if (skb_headroom(skb) + toff > INT_MAX)141141 goto out;142142143143 data = skb_header_pointer(skb, toff, 4, &_data);
+6-2
net/sctp/auth.c
···543543 id = ntohs(hmacs->hmac_ids[i]);544544545545 /* Check the id is in the supported range */546546- if (id > SCTP_AUTH_HMAC_ID_MAX)546546+ if (id > SCTP_AUTH_HMAC_ID_MAX) {547547+ id = 0;547548 continue;549549+ }548550549551 /* See is we support the id. Supported IDs have name and550552 * length fields set, so that we can allocated and use551553 * them. We can safely just check for name, for without the552554 * name, we can't allocate the TFM.553555 */554554- if (!sctp_hmac_list[id].hmac_name)556556+ if (!sctp_hmac_list[id].hmac_name) {557557+ id = 0;555558 continue;559559+ }556560557561 break;558562 }
+12-1
net/sctp/socket.c
···916916 /* Walk through the addrs buffer and count the number of addresses. */917917 addr_buf = kaddrs;918918 while (walk_size < addrs_size) {919919+ if (walk_size + sizeof(sa_family_t) > addrs_size) {920920+ kfree(kaddrs);921921+ return -EINVAL;922922+ }923923+919924 sa_addr = (struct sockaddr *)addr_buf;920925 af = sctp_get_af_specific(sa_addr->sa_family);921926···10071002 /* Walk through the addrs buffer and count the number of addresses. */10081003 addr_buf = kaddrs;10091004 while (walk_size < addrs_size) {10051005+ if (walk_size + sizeof(sa_family_t) > addrs_size) {10061006+ err = -EINVAL;10071007+ goto out_free;10081008+ }10091009+10101010 sa_addr = (union sctp_addr *)addr_buf;10111011 af = sctp_get_af_specific(sa_addr->sa.sa_family);10121012- port = ntohs(sa_addr->v4.sin_port);1013101210141013 /* If the address family is not supported or if this address10151014 * causes the address buffer to overflow return EINVAL.···10221013 err = -EINVAL;10231014 goto out_free;10241015 }10161016+10171017+ port = ntohs(sa_addr->v4.sin_port);1025101810261019 /* Save current address so we can work with it */10271020 memcpy(&to, sa_addr, af->sockaddr_len);
+1-1
scripts/kconfig/conf.c
···427427 if (sym->name && !sym_is_choice_value(sym)) {428428 printf("CONFIG_%s\n", sym->name);429429 }430430- } else {430430+ } else if (input_mode != oldnoconfig) {431431 if (!conf_cnt++)432432 printf(_("*\n* Restart config...\n*\n"));433433 rootEntry = menu_get_parent_menu(menu);