summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fragment: add fast path for in-order fragmentsChangli Gao2010-06-303-0/+24
| | | | | | | | | | | | | | | | | add fast path for in-order fragments As the fragments are sent in order in most of OSes, such as Windows, Darwin and FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue. In the fast path, we check if the skb at the end of the inet_frag_queue is the prev we expect. Signed-off-by: Changli Gao <xiaosuo@gmail.com> ---- include/net/inet_frag.h | 1 + net/ipv4/ip_fragment.c | 12 ++++++++++++ net/ipv6/reassembly.c | 11 +++++++++++ 3 files changed, 24 insertions(+) Signed-off-by: David S. Miller <davem@davemloft.net>
* snmp: 64bit ipstats_mib for all archesEric Dumazet2010-06-307-26/+167
| | | | | | | | | | | | | | | | | | | | /proc/net/snmp and /proc/net/netstat expose SNMP counters. Width of these counters is either 32 or 64 bits, depending on the size of "unsigned long" in kernel. This means user program parsing these files must already be prepared to deal with 64bit values, regardless of user program being 32 or 64 bit. This patch introduces 64bit snmp values for IPSTAT mib, where some counters can wrap pretty fast if they are 32bit wide. # netstat -s|egrep "InOctets|OutOctets" InOctets: 244068329096 OutOctets: 244069348848 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: memory barrier fixes on IBM p7 platformSathya Perla2010-06-302-0/+9
| | | | | | | | | | The ibm p7 architecure seems to reorder memory accesses more aggressively than previous ppc64 architectures. This requires memory barriers to ensure that rx/tx doorbells are pressed only after memory to be DMAed is written. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cpmac: use resource_size()Dan Carpenter2010-06-301-4/+4
| | | | | | | | | The original code is off by one because we should start counting at zero. So the size of the resource is end - start + 1. I switched it to use resource_size() to do the calculation. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* act_nat: use stack variableChangli Gao2010-06-301-21/+10
| | | | | | | | | | | | act_nat: use stack variable structure tc_nat isn't too big for stack, so we can put it in stack. Signed-off-by: Changli Gao <xiaosuo@gmail.com> ---- net/sched/act_nat.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
* act_mirred: combine duplicate codeChangli Gao2010-06-301-4/+2
| | | | | | | | | | | | | | act_mirred: combine duplicate code tcf_bstats is updated in any way, so we can do it earlier to reduce the size of the code. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> ---- net/sched/act_mirred.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
* net/neighbour.h: fix typoKulikov Vasiliy2010-06-301-1/+1
| | | | | | | 'Shoul' must be 'should'. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Implement workaround for eTSEC-A002 erratumAnton Vorontsov2010-06-302-3/+38
| | | | | | | | | | | | | | | | | | | | | | | MPC8313ECE says: "If the controller receives a 1- or 2-byte frame (such as an illegal runt packet or a packet with RX_ER asserted) before GRS is asserted and does not receive any other frames, the controller may fail to set GRSC even when the receive logic is completely idle. Any subsequent receive frame that is larger than two bytes will reset the state so the graceful stop can complete. A MAC receiver (Rx) reset will also reset the state." This patch implements the proposed workaround: "If IEVENT[GRSC] is still not set after the timeout, read the eTSEC register at offset 0xD1C. If bits 7-14 are the same as bits 23-30, the eTSEC Rx is assumed to be idle and the Rx can be safely reset. If the register fields are not equal, wait for another timeout period and check again." Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Implement workaround for eTSEC76 erratumAnton Vorontsov2010-06-302-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPC8313ECE says: "For TOE=1 huge or jumbo frames, the data required to generate the checksum may exceed the 2500-byte threshold beyond which the controller constrains itself to one memory fetch every 256 eTSEC system clocks. This throttling threshold is supposed to trigger only when the controller has sufficient data to keep transmit active for the duration of the memory fetches. The state machine handling this threshold, however, fails to take large TOE frames into account. As a result, TOE=1 frames larger than 2500 bytes often see excess delays before start of transmission." This patch implements the workaround as suggested by the errata document, i.e.: "Limit TOE=1 frames to less than 2500 bytes to avoid excess delays due to memory throttling. When using packets larger than 2700 bytes, it is recommended to turn TOE off." To be sure, we limit the TOE frames to 2500 bytes, and do software checksumming instead. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gianfar: Implement workaround for eTSEC74 erratumAnton Vorontsov2010-06-302-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | MPC8313ECE says: "If MACCFG2[Huge Frame]=0 and the Ethernet controller receives frames which are larger than MAXFRM, the controller truncates the frames to length MAXFRM and marks RxBD[TR]=1 to indicate the error. The controller also erroneously marks RxBD[TR]=1 if the received frame length is MAXFRM or MAXFRM-1, even though those frames are not truncated. No truncation or truncation error occurs if MACCFG2[Huge Frame]=1." There are two options to workaround the issue: "1. Set MACCFG2[Huge Frame]=1, so no truncation occurs for invalid large frames. Software can determine if a frame is larger than MAXFRM by reading RxBD[LG] or RxBD[Data Length]. 2. Set MAXFRM to 1538 (0x602) instead of the default 1536 (0x600), so normal-length frames are not marked as truncated. Software can examine RxBD[Data Length] to determine if the frame was larger than MAXFRM-2." This patch implements the first workaround option by setting HUGEFRAME bit, and gfar_clean_rx_ring() already checks the RxBD[Data Length]. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/core: use ntohs for skb->protocolSebastian Andrzej Siewior2010-06-301-1/+2
| | | | | | | | This is only noticed by people that are not doing everything correct in the first place. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Use interface max_desync_factor instead of static defaultBen Hutchings2010-06-301-4/+4
| | | | | | | | | max_desync_factor can be configured per-interface, but nothing is using the value. Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Clamp reported valid_lft to a minimum of 0Ben Hutchings2010-06-301-2/+6
| | | | | | | | | | Since addresses are only revalidated every 2 minutes, the reported valid_lft can underflow shortly before the address is deleted. Clamp it to a minimum of 0, as for prefered_lft. Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* usb: pegasus: fixed coding style issuesNicolas Kaiser2010-06-302-212/+209
| | | | | | | | Fixed brace, static initialization, comment, whitespace and spacing coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* 3c59x: Use fine-grained locks for MII and windowed register accessBen Hutchings2010-06-291-27/+41
| | | | | | | | | | | | This avoids scheduling in atomic context and also means that IRQs will only be deferred for relatively short periods of time. Previously discussed in: http://article.gmane.org/gmane.linux.network/155024 Reported-by: Arne Nordmark <nordmark@mech.kth.se> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: disable EEE support by defaultBruce Allan2010-06-291-0/+4
| | | | | | | | | | | Based on community feedback, EEE should be disabled by default until the IEEE802.3az specification has been finalized. Cc: bhutchings@solarflare.com Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: remove EEE module parameterBruce Allan2010-06-291-28/+0
| | | | | | | | | | As requested by Dave Miller. A follow-on set of patches will allow for ethtool to enable/disable the feature instead. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: suppress compile warnings on certain archsBruce Allan2010-06-291-17/+21
| | | | | | | | | | Commit 84f4ee902ad3ee964b7b3a13d5b7cf9c086e9916 causes compile warnings on architectures that have unsigned long long's that are not 64-bit, e.g. ia64. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: don't inadvertently re-set INTX_DISABLEDean Nelson2010-06-291-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should e1000_test_msi() fail to see an msi interrupt, it attempts to fallback to legacy INTx interrupts. But an error in the code may prevent this from happening correctly. Before calling e1000_test_msi_interrupt(), e1000_test_msi() disables SERR by clearing the SERR bit from the just read PCI_COMMAND bits as it writes them back out. Upon return from calling e1000_test_msi_interrupt(), it re-enables SERR by writing out the version of PCI_COMMAND it had previously read. The problem with this is that e1000_test_msi_interrupt() calls pci_disable_msi(), which eventually ends up in pci_intx(). And because pci_intx() was called with enable set to 1, the INTX_DISABLE bit gets cleared from PCI_COMMAND, which is what we want. But when we get back to e1000_test_msi(), the INTX_DISABLE bit gets inadvertently re-set because of the attempt by e1000_test_msi() to re-enable SERR. The solution is to have e1000_test_msi() re-read the PCI_COMMAND bits as part of its attempt to re-enable SERR. During debugging/testing of this issue I found that not all the systems I ran on had the SERR bit set to begin with. And on some of the systems the same could be said for the INTX_DISABLE bit. Needless to say these latter systems didn't have a problem falling back to legacy INTx interrupts with the code as is. Signed-off-by: Dean Nelson <dnelson@redhat.com> CC: stable@kernel.org Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/Makefile: conditionally descend to wirelessNicolas Kaiser2010-06-291-1/+1
| | | | | | | Don't descend to wireless unless it is actually used. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/Makefile: conditionally descend to wireless and ieee802154Nicolas Kaiser2010-06-291-2/+2
| | | | | | | Don't descend to wireless and ieee802154 unless they are actually used. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Add support for configuring eswitch and nparsRajesh K Borundia2010-06-293-75/+542
| | | | | | | | | | | | Following changes are made: 1.Obtain capabilities of Nic partition. 2.Configure tx bandwidth of particular Nic partition. 3.Configure the eswitch for setting port mirroring, enable mac learning, promiscous mode. Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Remove obsolete codeAnirban Chakraborty2010-06-294-57/+13
| | | | | | | | Current driver uses FW API version 2 and thus code corresponding to FW API version 1 has become obsolete. Clean up this from the driver. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* micrel phy driver - updated(1)Choi, David2010-06-291-19/+148
| | | | | | | | | | | | | | | | Hello all: This patch fixes what Ben mentioned, namely duplicated ids. From: David J. Choi <david.choi@micrel.com> Body of the explanation: This patch has changes as followings; -support the interrupt from phy devices from Micrel Inc. -support more phy devices, ks8737, ks8721, ks8041, ks8051 from Micrel. -remove vsc8201 because this device was used only internal test at Micrel. Signed-off-by: David J. Choi <david.choi@micrel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-3/+10
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-3/+10
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-0/+3
| | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vmxnet3: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-2/+7
| | | | | | | | | Return EOPNOTSUPP in ethtool_ops->set_flags. Fix coding style while at it. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-1/+0
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif-driver: Add CAIF-SPI Protocol driver.Sjur Braendeland2010-06-296-0/+1483
| | | | | | | | | | | | | | This patch introduces the CAIF SPI Protocol Driver for CAIF Link Layer. This driver implements a platform driver to accommodate for a platform specific SPI device. A general platform driver is not possible as there are no SPI Slave side Kernel API defined. A sample CAIF SPI Platform device can be found in .../Documentation/networking/caif/spi_porting.txt Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Kconfig and Makefile fixesSjur Braendeland2010-06-294-29/+7
| | | | | | | | Use "depends on" instead of "if" in Kconfig files. Fixed CAIF debug flag, and removed unnecessary clean-* options. Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Stitch new T4 PCI-E SR-IOV Virtual Function driver into the buildCasey Leedom2010-06-282-0/+24
| | | | | | | Stitch new T4 PCI-E SR-IOV Virtual Function driver into the build. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add new Makefile for T4 PCI-E SR-IOV Virtual Function driver cxgb4vfCasey Leedom2010-06-281-0/+7
| | | | | | | Add new Makefile for T4 PCI-E SR-IOV Virtual Function driver "cxgb4vf". Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add main T4 PCI-E SR-IOV Virtual Function driver for cxgb4vfCasey Leedom2010-06-282-0/+3446
| | | | | | | Add main T4 PCI-E SR-IOV Virtual Function driver for "cxgb4vf". Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add T4 Virtual Function Scatter-Gather Engine DMA codeCasey Leedom2010-06-281-0/+2460
| | | | | | | Add T4 Virtual Function Scatter-Gather Engine DMA code. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add core T4 PCI-E SR-IOV Virtual Function hardware definitions and ↵Casey Leedom2010-06-283-0/+1727
| | | | | | | | | | device communication code Add core T4 PCI-E SR-IOV Virtual Function hardware definitions and device communication code. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add code to provision T4 PCI-E SR-IOV Virtual Functions with ↵Casey Leedom2010-06-281-0/+106
| | | | | | | | | | hardware resources Add code to provision T4 PCI-E SR-IOV Virtual Functions with hardware resources. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add new macros and definitions for hardware constantsCasey Leedom2010-06-282-0/+42
| | | | | | | Add new macros and definitions for hardware constants. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: update to latest T4 firmware API fileCasey Leedom2010-06-282-7/+22
| | | | | | | Update to latest T4 firmware API file. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: small changes to message processing structures/macrosCasey Leedom2010-06-283-5/+17
| | | | | | | | Split cpl_tx_pkt_lso into core message structure and encapsulated message, make RSPD_LEN macro match other response descriptor macros. Signed-off-by: Casey Leedom Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: mdio-octeon: Fix section mismatch errors.David Daney2010-06-281-3/+3
| | | | | | | | | | | | | We started getting: WARNING: vmlinux.o(.data+0x20bd0): Section mismatch in reference from the variable octeon_mdiobus_driver to the function .init.text:octeon_mdiobus_probe() This fixes it. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: octeon_mgmt: Fix section mismatch errors.David Daney2010-06-281-3/+3
| | | | | | | | | | | | | We started getting: WARNING: drivers/net/built-in.o(.data+0x10f0): Section mismatch in reference from the variable octeon_mgmt_driver to the function .init.text:octeon_mgmt_probe() This fixes it. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* act_mirred: don't clone skb when skb isn't sharedChangli Gao2010-06-282-5/+12
| | | | | | | | | | | | | | | | don't clone skb when skb isn't shared When the tcf_action is TC_ACT_STOLEN, and the skb isn't shared, we don't need to clone a new skb. As the skb will be freed after this function returns, we can use it freely once we get a reference to it. Signed-off-by: Changli Gao <xiaosuo@gmail.com> ---- include/net/sch_generic.h | 11 +++++++++-- net/sched/act_mirred.c | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: tso_fragment() might avoid GFP_ATOMICEric Dumazet2010-06-281-3/+3
| | | | | | | | We can pass a gfp argument to tso_fragment() and avoid GFP_ATOMIC allocations sometimes. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: 64 bit rx countersEric Dumazet2010-06-283-25/+41
| | | | | | | | | | Use u64_stats_sync infrastructure to implement 64bit rx stats. (tx stats are addressed later) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* macvlan: 64 bit rx countersEric Dumazet2010-06-282-21/+35
| | | | | | | | Use u64_stats_sync infrastructure to implement 64bit stats. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh()Eric Dumazet2010-06-281-15/+44
| | | | | | | | | | | - Must disable preemption in case of 32bit UP in u64_stats_fetch_begin() and u64_stats_fetch_retry() - Add new u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh() for network usage, disabling BH on 32bit UP only. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use this_cpu_ptr()Eric Dumazet2010-06-283-4/+4
| | | | | | | use this_cpu_ptr(p) instead of per_cpu_ptr(p, smp_processor_id()) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: u64_stats_sync improvementsEric Dumazet2010-06-281-1/+5
| | | | | | | | | | | | - Add a comment about interrupts: 6) If counter might be written by an interrupt, readers should block interrupts. - Fix a typo in sample of use. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* 3c59x: Specify window explicitly for access to windowed registersBen Hutchings2010-06-281-148/+140
| | | | | | | | | | | | | | | | | | | Currently much of the code assumes that a specific window has been selected, while a few functions save and restore the window. This makes it impossible to introduce fine-grained locking. Make those assumptions explicit by introducing wrapper functions to set the window and read/write a register. Use these everywhere except vortex_interrupt(), vortex_start_xmit() and vortex_rx(). These set the window just once, or not at all in the case of vortex_rx() as it should always be called from vortex_interrupt(). Cache the current window in struct vortex_private to avoid unnecessary hardware writes. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Arne Nordmark <nordmark@mech.kth.se> [against 2.6.32] Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud