···11-(C)Copyright 1999-2004 Marvell(R).22-All rights reserved33-===========================================================================44-55-sk98lin.txt created 13-Feb-200466-77-Readme File for sk98lin v6.2388-Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX99-1010-This file contains1111- 1 Overview1212- 2 Required Files1313- 3 Installation1414- 3.1 Driver Installation1515- 3.2 Inclusion of adapter at system start1616- 4 Driver Parameters1717- 4.1 Per-Port Parameters1818- 4.2 Adapter Parameters1919- 5 Large Frame Support2020- 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)2121- 7 Troubleshooting2222-2323-===========================================================================2424-2525-2626-1 Overview2727-===========2828-2929-The sk98lin driver supports the Marvell Yukon and SysKonnect 3030-SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has 3131-been tested with Linux on Intel/x86 machines.3232-***3333-3434-3535-2 Required Files3636-=================3737-3838-The linux kernel source.3939-No additional files required.4040-***4141-4242-4343-3 Installation4444-===============4545-4646-It is recommended to download the latest version of the driver from the 4747-SysKonnect web site www.syskonnect.com. If you have downloaded the latest4848-driver, the Linux kernel has to be patched before the driver can be 4949-installed. For details on how to patch a Linux kernel, refer to the 5050-patch.txt file.5151-5252-3.1 Driver Installation5353-------------------------5454-5555-The following steps describe the actions that are required to install5656-the driver and to start it manually. These steps should be carried5757-out for the initial driver setup. Once confirmed to be ok, they can5858-be included in the system start.5959-6060-NOTE 1: To perform the following tasks you need 'root' access.6161-6262-NOTE 2: In case of problems, please read the section "Troubleshooting" 6363- below.6464-6565-The driver can either be integrated into the kernel or it can be compiled 6666-as a module. Select the appropriate option during the kernel 6767-configuration.6868-6969-Compile/use the driver as a module7070-----------------------------------7171-To compile the driver, go to the directory /usr/src/linux and7272-execute the command "make menuconfig" or "make xconfig" and proceed as 7373-follows:7474-7575-To integrate the driver permanently into the kernel, proceed as follows:7676-7777-1. Select the menu "Network device support" and then "Ethernet(1000Mbit)"7878-2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" 7979- with (*) 8080-3. Build a new kernel when the configuration of the above options is 8181- finished.8282-4. Install the new kernel.8383-5. Reboot your system.8484-8585-To use the driver as a module, proceed as follows:8686-8787-1. Enable 'loadable module support' in the kernel.8888-2. For automatic driver start, enable the 'Kernel module loader'.8989-3. Select the menu "Network device support" and then "Ethernet(1000Mbit)"9090-4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" 9191- with (M)9292-5. Execute the command "make modules".9393-6. Execute the command "make modules_install".9494- The appropriate modules will be installed.9595-7. Reboot your system.9696-9797-9898-Load the module manually9999-------------------------100100-To load the module manually, proceed as follows:101101-102102-1. Enter "modprobe sk98lin".103103-2. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in 104104- your computer and you have a /proc file system, execute the command:105105- "ls /proc/net/sk98lin/" 106106- This should produce an output containing a line with the following 107107- format:108108- eth0 eth1 ...109109- which indicates that your adapter has been found and initialized.110110-111111- NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx 112112- adapter installed, the adapters will be listed as 'eth0', 113113- 'eth1', 'eth2', etc.114114- For each adapter, repeat steps 3 and 4 below.115115-116116- NOTE 2: If you have other Ethernet adapters installed, your Marvell117117- Yukon or SysKonnect SK-98xx adapter will be mapped to the 118118- next available number, e.g. 'eth1'. The mapping is executed 119119- automatically.120120- The module installation message (displayed either in a system121121- log file or on the console) prints a line for each adapter 122122- found containing the corresponding 'ethX'.123123-124124-3. Select an IP address and assign it to the respective adapter by 125125- entering:126126- ifconfig eth0 <ip-address>127127- With this command, the adapter is connected to the Ethernet. 128128-129129- SK-98xx Gigabit Ethernet Server Adapters: The yellow LED on the adapter 130130- is now active, the link status LED of the primary port is active and 131131- the link status LED of the secondary port (on dual port adapters) is 132132- blinking (if the ports are connected to a switch or hub).133133- SK-98xx V2.0 Gigabit Ethernet Adapters: The link status LED is active.134134- In addition, you will receive a status message on the console stating135135- "ethX: network connection up using port Y" and showing the selected 136136- connection parameters (x stands for the ethernet device number 137137- (0,1,2, etc), y stands for the port name (A or B)).138138-139139- NOTE: If you are in doubt about IP addresses, ask your network140140- administrator for assistance.141141-142142-4. Your adapter should now be fully operational.143143- Use 'ping <otherstation>' to verify the connection to other computers 144144- on your network.145145-5. To check the adapter configuration view /proc/net/sk98lin/[devicename].146146- For example by executing: 147147- "cat /proc/net/sk98lin/eth0" 148148-149149-Unload the module150150------------------151151-To stop and unload the driver modules, proceed as follows:152152-153153-1. Execute the command "ifconfig eth0 down".154154-2. Execute the command "rmmod sk98lin".155155-156156-3.2 Inclusion of adapter at system start157157------------------------------------------158158-159159-Since a large number of different Linux distributions are 160160-available, we are unable to describe a general installation procedure161161-for the driver module.162162-Because the driver is now integrated in the kernel, installation should163163-be easy, using the standard mechanism of your distribution.164164-Refer to the distribution's manual for installation of ethernet adapters.165165-166166-***167167-168168-4 Driver Parameters169169-====================170170-171171-Parameters can be set at the command line after the module has been 172172-loaded with the command 'modprobe'.173173-In some distributions, the configuration tools are able to pass parameters174174-to the driver module.175175-176176-If you use the kernel module loader, you can set driver parameters177177-in the file /etc/modprobe.conf (or /etc/modules.conf in 2.4 or earlier).178178-To set the driver parameters in this file, proceed as follows:179179-180180-1. Insert a line of the form :181181- options sk98lin ...182182- For "...", the same syntax is required as described for the command183183- line parameters of modprobe below.184184-2. To activate the new parameters, either reboot your computer185185- or 186186- unload and reload the driver.187187- The syntax of the driver parameters is:188188-189189- modprobe sk98lin parameter=value1[,value2[,value3...]]190190-191191- where value1 refers to the first adapter, value2 to the second etc.192192-193193-NOTE: All parameters are case sensitive. Write them exactly as shown 194194- below.195195-196196-Example:197197-Suppose you have two adapters. You want to set auto-negotiation198198-on the first adapter to ON and on the second adapter to OFF.199199-You also want to set DuplexCapabilities on the first adapter200200-to FULL, and on the second adapter to HALF.201201-Then, you must enter:202202-203203- modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half204204-205205-NOTE: The number of adapters that can be configured this way is206206- limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM).207207- The current limit is 16. If you happen to install208208- more adapters, adjust this and recompile.209209-210210-211211-4.1 Per-Port Parameters212212-------------------------213213-214214-These settings are available for each port on the adapter.215215-In the following description, '?' stands for the port for216216-which you set the parameter (A or B).217217-218218-Speed219219------220220-Parameter: Speed_?221221-Values: 10, 100, 1000, Auto222222-Default: Auto223223-224224-This parameter is used to set the speed capabilities. It is only valid 225225-for the SK-98xx V2.0 copper adapters.226226-Usually, the speed is negotiated between the two ports during link 227227-establishment. If this fails, a port can be forced to a specific setting228228-with this parameter.229229-230230-Auto-Negotiation231231-----------------232232-Parameter: AutoNeg_?233233-Values: On, Off, Sense234234-Default: On235235-236236-The "Sense"-mode automatically detects whether the link partner supports237237-auto-negotiation or not.238238-239239-Duplex Capabilities240240--------------------241241-Parameter: DupCap_?242242-Values: Half, Full, Both243243-Default: Both244244-245245-This parameters is only relevant if auto-negotiation for this port is 246246-not set to "Sense". If auto-negotiation is set to "On", all three values247247-are possible. If it is set to "Off", only "Full" and "Half" are allowed.248248-This parameter is useful if your link partner does not support all249249-possible combinations.250250-251251-Flow Control252252-------------253253-Parameter: FlowCtrl_?254254-Values: Sym, SymOrRem, LocSend, None255255-Default: SymOrRem256256-257257-This parameter can be used to set the flow control capabilities the 258258-port reports during auto-negotiation. It can be set for each port 259259-individually.260260-Possible modes:261261- -- Sym = Symmetric: both link partners are allowed to send 262262- PAUSE frames263263- -- SymOrRem = SymmetricOrRemote: both or only remote partner 264264- are allowed to send PAUSE frames265265- -- LocSend = LocalSend: only local link partner is allowed 266266- to send PAUSE frames267267- -- None = no link partner is allowed to send PAUSE frames268268-269269-NOTE: This parameter is ignored if auto-negotiation is set to "Off".270270-271271-Role in Master-Slave-Negotiation (1000Base-T only)272272---------------------------------------------------273273-Parameter: Role_?274274-Values: Auto, Master, Slave275275-Default: Auto276276-277277-This parameter is only valid for the SK-9821 and SK-9822 adapters.278278-For two 1000Base-T ports to communicate, one must take the role of the279279-master (providing timing information), while the other must be the 280280-slave. Usually, this is negotiated between the two ports during link 281281-establishment. If this fails, a port can be forced to a specific setting282282-with this parameter.283283-284284-285285-4.2 Adapter Parameters286286------------------------287287-288288-Connection Type (SK-98xx V2.0 copper adapters only)289289----------------290290-Parameter: ConType291291-Values: Auto, 100FD, 100HD, 10FD, 10HD292292-Default: Auto293293-294294-The parameter 'ConType' is a combination of all five per-port parameters295295-within one single parameter. This simplifies the configuration of both ports296296-of an adapter card! The different values of this variable reflect the most 297297-meaningful combinations of port parameters.298298-299299-The following table shows the values of 'ConType' and the corresponding300300-combinations of the per-port parameters:301301-302302- ConType | DupCap AutoNeg FlowCtrl Role Speed303303- ----------+------------------------------------------------------304304- Auto | Both On SymOrRem Auto Auto305305- 100FD | Full Off None Auto (ignored) 100306306- 100HD | Half Off None Auto (ignored) 100307307- 10FD | Full Off None Auto (ignored) 10308308- 10HD | Half Off None Auto (ignored) 10309309-310310-Stating any other port parameter together with this 'ConType' variable311311-will result in a merged configuration of those settings. This due to 312312-the fact, that the per-port parameters (e.g. Speed_? ) have a higher313313-priority than the combined variable 'ConType'.314314-315315-NOTE: This parameter is always used on both ports of the adapter card.316316-317317-Interrupt Moderation318318---------------------319319-Parameter: Moderation320320-Values: None, Static, Dynamic321321-Default: None322322-323323-Interrupt moderation is employed to limit the maximum number of interrupts324324-the driver has to serve. That is, one or more interrupts (which indicate any325325-transmit or receive packet to be processed) are queued until the driver 326326-processes them. When queued interrupts are to be served, is determined by the327327-'IntsPerSec' parameter, which is explained later below.328328-329329-Possible modes:330330-331331- -- None - No interrupt moderation is applied on the adapter card. 332332- Therefore, each transmit or receive interrupt is served immediately333333- as soon as it appears on the interrupt line of the adapter card.334334-335335- -- Static - Interrupt moderation is applied on the adapter card. 336336- All transmit and receive interrupts are queued until a complete337337- moderation interval ends. If such a moderation interval ends, all338338- queued interrupts are processed in one big bunch without any delay.339339- The term 'static' reflects the fact, that interrupt moderation is340340- always enabled, regardless how much network load is currently 341341- passing via a particular interface. In addition, the duration of342342- the moderation interval has a fixed length that never changes while343343- the driver is operational.344344-345345- -- Dynamic - Interrupt moderation might be applied on the adapter card,346346- depending on the load of the system. If the driver detects that the347347- system load is too high, the driver tries to shield the system against 348348- too much network load by enabling interrupt moderation. If - at a later349349- time - the CPU utilization decreases again (or if the network load is 350350- negligible) the interrupt moderation will automatically be disabled.351351-352352-Interrupt moderation should be used when the driver has to handle one or more353353-interfaces with a high network load, which - as a consequence - leads also to a354354-high CPU utilization. When moderation is applied in such high network load 355355-situations, CPU load might be reduced by 20-30%.356356-357357-NOTE: The drawback of using interrupt moderation is an increase of the round-358358-trip-time (RTT), due to the queueing and serving of interrupts at dedicated359359-moderation times.360360-361361-Interrupts per second362362----------------------363363-Parameter: IntsPerSec364364-Values: 30...40000 (interrupts per second)365365-Default: 2000366366-367367-This parameter is only used if either static or dynamic interrupt moderation368368-is used on a network adapter card. Using this parameter if no moderation is369369-applied will lead to no action performed.370370-371371-This parameter determines the length of any interrupt moderation interval. 372372-Assuming that static interrupt moderation is to be used, an 'IntsPerSec' 373373-parameter value of 2000 will lead to an interrupt moderation interval of374374-500 microseconds. 375375-376376-NOTE: The duration of the moderation interval is to be chosen with care.377377-At first glance, selecting a very long duration (e.g. only 100 interrupts per 378378-second) seems to be meaningful, but the increase of packet-processing delay 379379-is tremendous. On the other hand, selecting a very short moderation time might380380-compensate the use of any moderation being applied.381381-382382-383383-Preferred Port384384---------------385385-Parameter: PrefPort386386-Values: A, B387387-Default: A388388-389389-This is used to force the preferred port to A or B (on dual-port network 390390-adapters). The preferred port is the one that is used if both are detected391391-as fully functional.392392-393393-RLMT Mode (Redundant Link Management Technology)394394-------------------------------------------------395395-Parameter: RlmtMode396396-Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet397397-Default: CheckLinkState398398-399399-RLMT monitors the status of the port. If the link of the active port 400400-fails, RLMT switches immediately to the standby link. The virtual link is 401401-maintained as long as at least one 'physical' link is up. 402402-403403-Possible modes:404404-405405- -- CheckLinkState - Check link state only: RLMT uses the link state406406- reported by the adapter hardware for each individual port to 407407- determine whether a port can be used for all network traffic or 408408- not.409409-410410- -- CheckLocalPort - In this mode, RLMT monitors the network path 411411- between the two ports of an adapter by regularly exchanging packets412412- between them. This mode requires a network configuration in which 413413- the two ports are able to "see" each other (i.e. there must not be 414414- any router between the ports).415415-416416- -- CheckSeg - Check local port and segmentation: This mode supports the417417- same functions as the CheckLocalPort mode and additionally checks 418418- network segmentation between the ports. Therefore, this mode is only419419- to be used if Gigabit Ethernet switches are installed on the network420420- that have been configured to use the Spanning Tree protocol. 421421-422422- -- DualNet - In this mode, ports A and B are used as separate devices. 423423- If you have a dual port adapter, port A will be configured as eth0 424424- and port B as eth1. Both ports can be used independently with 425425- distinct IP addresses. The preferred port setting is not used. 426426- RLMT is turned off.427427-428428-NOTE: RLMT modes CLP and CLPSS are designed to operate in configurations 429429- where a network path between the ports on one adapter exists. 430430- Moreover, they are not designed to work where adapters are connected431431- back-to-back.432432-***433433-434434-435435-5 Large Frame Support436436-======================437437-438438-The driver supports large frames (also called jumbo frames). Using large 439439-frames can result in an improved throughput if transferring large amounts 440440-of data.441441-To enable large frames, set the MTU (maximum transfer unit) of the 442442-interface to the desired value (up to 9000), execute the following 443443-command:444444- ifconfig eth0 mtu 9000445445-This will only work if you have two adapters connected back-to-back446446-or if you use a switch that supports large frames. When using a switch, 447447-it should be configured to allow large frames and auto-negotiation should 448448-be set to OFF. The setting must be configured on all adapters that can be 449449-reached by the large frames. If one adapter is not set to receive large 450450-frames, it will simply drop them.451451-452452-You can switch back to the standard ethernet frame size by executing the 453453-following command:454454- ifconfig eth0 mtu 1500455455-456456-To permanently configure this setting, add a script with the 'ifconfig' 457457-line to the system startup sequence (named something like "S99sk98lin" 458458-in /etc/rc.d/rc2.d).459459-***460460-461461-462462-6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad)463463-==================================================================464464-465465-The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and 466466-Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad. 467467-These features are only available after installation of open source 468468-modules available on the Internet:469469-For VLAN go to: http://www.candelatech.com/~greear/vlan.html470470-For Link Aggregation go to: http://www.st.rim.or.jp/~yumo471471-472472-NOTE: SysKonnect GmbH does not offer any support for these open source 473473- modules and does not take the responsibility for any kind of 474474- failures or problems arising in connection with these modules.475475-476476-NOTE: Configuring Link Aggregation on a SysKonnect dual link adapter may 477477- cause problems when unloading the driver.478478-479479-480480-7 Troubleshooting481481-==================482482-483483-If any problems occur during the installation process, check the 484484-following list:485485-486486-487487-Problem: The SK-98xx adapter cannot be found by the driver.488488-Solution: In /proc/pci search for the following entry:489489- 'Ethernet controller: SysKonnect SK-98xx ...'490490- If this entry exists, the SK-98xx or SK-98xx V2.0 adapter has 491491- been found by the system and should be operational.492492- If this entry does not exist or if the file '/proc/pci' is not 493493- found, there may be a hardware problem or the PCI support may 494494- not be enabled in your kernel.495495- The adapter can be checked using the diagnostics program which 496496- is available on the SysKonnect web site:497497- www.syskonnect.com498498-499499- Some COMPAQ machines have problems dealing with PCI under Linux.500500- This problem is described in the 'PCI howto' document501501- (included in some distributions or available from the502502- web, e.g. at 'www.linux.org'). 503503-504504-505505-Problem: Programs such as 'ifconfig' or 'route' cannot be found or the 506506- error message 'Operation not permitted' is displayed.507507-Reason: You are not logged in as user 'root'.508508-Solution: Logout and login as 'root' or change to 'root' via 'su'.509509-510510-511511-Problem: Upon use of the command 'ping <address>' the message512512- "ping: sendto: Network is unreachable" is displayed.513513-Reason: Your route is not set correctly.514514-Solution: If you are using RedHat, you probably forgot to set up the 515515- route in the 'network configuration'.516516- Check the existing routes with the 'route' command and check 517517- if an entry for 'eth0' exists, and if so, if it is set correctly.518518-519519-520520-Problem: The driver can be started, the adapter is connected to the 521521- network, but you cannot receive or transmit any packets; 522522- e.g. 'ping' does not work.523523-Reason: There is an incorrect route in your routing table.524524-Solution: Check the routing table with the command 'route' and read the 525525- manual help pages dealing with routes (enter 'man route').526526-527527-NOTE: Although the 2.2.x kernel versions generate the routing entry 528528- automatically, problems of this kind may occur here as well. We've 529529- come across a situation in which the driver started correctly at 530530- system start, but after the driver has been removed and reloaded,531531- the route of the adapter's network pointed to the 'dummy0'device 532532- and had to be corrected manually.533533-534534-535535-Problem: Your computer should act as a router between multiple 536536- IP subnetworks (using multiple adapters), but computers in 537537- other subnetworks cannot be reached.538538-Reason: Either the router's kernel is not configured for IP forwarding 539539- or the routing table and gateway configuration of at least one 540540- computer is not working.541541-542542-Problem: Upon driver start, the following error message is displayed:543543- "eth0: -- ERROR --544544- Class: internal Software error545545- Nr: 0xcc546546- Msg: SkGeInitPort() cannot init running ports"547547-Reason: You are using a driver compiled for single processor machines 548548- on a multiprocessor machine with SMP (Symmetric MultiProcessor) 549549- kernel.550550-Solution: Configure your kernel appropriately and recompile the kernel or551551- the modules.552552-553553-554554-555555-If your problem is not listed here, please contact SysKonnect's technical556556-support for help (linux@syskonnect.de).557557-When contacting our technical support, please ensure that the following 558558-information is available:559559-- System Manufacturer and HW Informations (CPU, Memory... )560560-- PCI-Boards in your system561561-- Distribution562562-- Kernel version563563-- Driver version564564-***565565-566566-567567-568568-***End of Readme File***
+1
drivers/atm/firestream.c
···978978 /* Docs are vague about this atm_hdr field. By the way, the FS979979 * chip makes odd errors if lower bits are set.... -- REW */980980 tc->atm_hdr = (vpi << 20) | (vci << 4); 981981+ tmc0 = 0;981982 {982983 int pcr = atm_pcr_goal (txtp);983984
+1-2
drivers/atm/he.c
···3000300030013001/* eeprom routines -- see 4.7 */3002300230033003-u830043004-read_prom_byte(struct he_dev *he_dev, int addr)30033003+static u8 read_prom_byte(struct he_dev *he_dev, int addr)30053004{30063005 u32 val = 0, tmp_read = 0;30073006 int i, j = 0;
···343343 void __iomem *ee_addr = tp->base_addr + CSR9;344344 int read_cmd = location | (EE_READ_CMD << addr_len);345345346346+ /* If location is past the end of what we can address, don't347347+ * read some other location (ie truncate). Just return zero.348348+ */349349+ if (location > (1 << addr_len) - 1)350350+ return 0;351351+346352 iowrite32(EE_ENB & ~EE_CS, ee_addr);347353 iowrite32(EE_ENB, ee_addr);348354
+6-1
drivers/net/tulip/tulip_core.c
···14371437 EEPROM.14381438 */14391439 ee_data = tp->eeprom;14401440+ memset(ee_data, 0, sizeof(tp->eeprom));14401441 sum = 0;14411442 if (chip_idx == LC82C168) {14421443 for (i = 0; i < 3; i++) {···14591458 /* A serial EEPROM interface, we read now and sort it out later. */14601459 int sa_offset = 0;14611460 int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6;14611461+ int ee_max_addr = ((1 << ee_addr_size) - 1) * sizeof(u16);1462146214631463- for (i = 0; i < sizeof(tp->eeprom); i+=2) {14631463+ if (ee_max_addr > sizeof(tp->eeprom))14641464+ ee_max_addr = sizeof(tp->eeprom);14651465+14661466+ for (i = 0; i < ee_max_addr ; i += sizeof(u16)) {14641467 u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size);14651468 ee_data[i] = data & 0xff;14661469 ee_data[i + 1] = data >> 8;
+1-1
drivers/net/usb/Kconfig
···129129130130config USB_NET_AX8817X131131 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters"132132- depends on USB_USBNET && NET_ETHERNET132132+ depends on USB_USBNET133133 select CRC32134134 default y135135 help
+1-1
drivers/net/usb/dm9601.c
···354354 struct dev_mc_list *mc_list = net->mc_list;355355 int i;356356357357- for (i = 0; i < net->mc_count; i++) {357357+ for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) {358358 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;359359 hashes[crc >> 3] |= 1 << (crc & 0x7);360360 }
···677677678678 /* Card has a command result for us */679679 if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) {680680- spin_lock(&priv->driver_lock);681680 ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len);682682- spin_unlock(&priv->driver_lock);683681 if (ret < 0)684682 lbs_pr_err("could not receive cmd from card\n");685683 }
+11-2
drivers/net/wireless/rt2x00/rt2x00dev.c
···1252125212531253exit:12541254 /*12551255- * Set device mode to sleep for power management.12551255+ * Set device mode to sleep for power management,12561256+ * on some hardware this call seems to consistently fail.12571257+ * From the specifications it is hard to tell why it fails,12581258+ * and if this is a "bad thing".12591259+ * Overall it is safe to just ignore the failure and12601260+ * continue suspending. The only downside is that the12611261+ * device will not be in optimal power save mode, but with12621262+ * the radio and the other components already disabled the12631263+ * device is as good as disabled.12561264 */12571265 retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP);12581266 if (retval)12591259- return retval;12671267+ WARNING(rt2x00dev, "Device failed to enter sleep state, "12681268+ "continue suspending.\n");1260126912611270 return 0;12621271}
+4-2
include/linux/netdevice.h
···11051105}1106110611071107/* Use this variant when it is known for sure that it11081108- * is executing from interrupt context.11081108+ * is executing from hardware interrupt context or with hardware interrupts11091109+ * disabled.11091110 */11101111extern void dev_kfree_skb_irq(struct sk_buff *skb);1111111211121113/* Use this variant in places where it could be invoked11131113- * either from interrupt or non-interrupt context.11141114+ * from either hardware interrupt or other context, with hardware interrupts11151115+ * either disabled or enabled.11141116 */11151117extern void dev_kfree_skb_any(struct sk_buff *skb);11161118
···210210 * The following few functions build the content of /proc/net/vlan/config211211 */212212213213-static inline int is_vlan_dev(struct net_device *dev)214214-{215215- return dev->priv_flags & IFF_802_1Q_VLAN;216216-}217217-218213/* start read of /proc/net/vlan/config */219214static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)220215 __acquires(dev_base_lock)
···570570 return;571571572572 rfcomm_dev_del(dev);573573- /* We have to drop DLC lock here, otherwise574574- rfcomm_dev_put() will dead lock if it's575575- the last reference. */576576- rfcomm_dlc_unlock(dlc);577573 rfcomm_dev_put(dev);578578- rfcomm_dlc_lock(dlc);579574 }580575 } else581576 tty_hangup(dev->tty);
···15511551 __acquires(udp_hash_lock)15521552{15531553 read_lock(&udp_hash_lock);15541554- return *pos ? udp_get_idx(seq, *pos-1) : (void *)1;15541554+ return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN;15551555}1556155615571557static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)15581558{15591559 struct sock *sk;1560156015611561- if (v == (void *)1)15611561+ if (v == SEQ_START_TOKEN)15621562 sk = udp_get_idx(seq, 0);15631563 else15641564 sk = udp_get_next(seq, v);
+19
net/ipv6/addrconf.c
···776776 struct inet6_dev *idev = ifp->idev;777777 struct in6_addr addr, *tmpaddr;778778 unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp;779779+ unsigned long regen_advance;779780 int tmp_plen;780781 int ret = 0;781782 int max_addresses;···837836 tmp_tstamp = ifp->tstamp;838837 spin_unlock_bh(&ifp->lock);839838839839+ regen_advance = idev->cnf.regen_max_retry *840840+ idev->cnf.dad_transmits *841841+ idev->nd_parms->retrans_time / HZ;840842 write_unlock(&idev->lock);843843+844844+ /* A temporary address is created only if this calculated Preferred845845+ * Lifetime is greater than REGEN_ADVANCE time units. In particular,846846+ * an implementation must not create a temporary address with a zero847847+ * Preferred Lifetime.848848+ */849849+ if (tmp_prefered_lft <= regen_advance) {850850+ in6_ifa_put(ifp);851851+ in6_dev_put(idev);852852+ ret = -1;853853+ goto out;854854+ }841855842856 addr_flags = IFA_F_TEMPORARY;843857 /* set in addrconf_prefix_rcv() */···18501834 * lifetimes of an existing temporary address18511835 * when processing a Prefix Information Option.18521836 */18371837+ if (ifp != ift->ifpub)18381838+ continue;18391839+18531840 spin_lock(&ift->lock);18541841 flags = ift->flags;18551842 if (ift->valid_lft > valid_lft &&
+2-2
net/ipv6/icmp.c
···440440 }441441442442 if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6))443443- goto out;443443+ goto out_dst_release;444444445445 if (ip6_dst_lookup(sk, &dst2, &fl))446446- goto out;446446+ goto out_dst_release;447447448448 err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP);449449 if (err == -ENOENT) {
···184184185185void __qdisc_run(struct net_device *dev)186186{187187- do {188188- if (!qdisc_restart(dev))187187+ unsigned long start_time = jiffies;188188+189189+ while (qdisc_restart(dev)) {190190+ if (netif_queue_stopped(dev))189191 break;190190- } while (!netif_queue_stopped(dev));192192+193193+ /*194194+ * Postpone processing if195195+ * 1. another process needs the CPU;196196+ * 2. we've been doing it for too long.197197+ */198198+ if (need_resched() || jiffies != start_time) {199199+ netif_schedule(dev);200200+ break;201201+ }202202+ }191203192204 clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);193205}