Commit graph

181768 commits

Author SHA1 Message Date
Ajit Khaparde e76b69cc01 net: bug fix for vlan + gro issue
Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
Even the tcp handshake was not taking place.
This is because, the eth_type_trans call before the netif_receive_skb
in napi_gro_finish() resets the skb->dev to napi->dev from the previously
set vlan netdev interface. This causes the ip_route_input to drop the
incoming packet considering it as a packet coming from a martian source.

I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
With this fix, the traffic starts and the test runs fine on both vlan
and non-vlan interfaces.

CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:47 -08:00
kirjanov@gmail.com 1d4bd947c5 mv643xx_eth: fix missing validate_addr hook
Fix missing validate_addr hook.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:46 -08:00
Kristoffer Glembo d4c41139df net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet
MAC IP cores.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:40 -08:00
Simon Kagstrom b6ca430599 via-velocity: Enable scatter/gather IO by default
Reduces CPU utilization significantly with sendfile for example.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:39 -08:00
Jeff Mahoney 25cca53527 ipg: Remove device claimed by dl2k from pci id table
This patch removes D-Link DGE-550T PCI ID (1186:4000) from the ipg
driver. The ipg driver is for IP2000-based cards and the DGE-550T is
a DL2000-based card. The driver loads and works for a few moments, but
once a real workload is applied it stops operating. The ipg driver
claimed this ID since it was introduced in 2.6.24 and it's forced many
users to blacklist it.

The correct driver for this hardware is the dl2k driver, which has been
claiming this PCI ID since the 2.4 days.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 15:59:38 -08:00
David S. Miller 069c474e88 xfrm: Revert false event eliding commits.
As reported by Alexey Dobriyan:

--------------------
setkey now takes several seconds to run this simple script
and it spits "recv: Resource temporarily unavailable" messages.

#!/usr/sbin/setkey -f
flush;
spdflush;

add A B ipcomp 44 -m tunnel -C deflate;
add B A ipcomp 45 -m tunnel -C deflate;

spdadd A B any -P in ipsec
        ipcomp/tunnel/192.168.1.2-192.168.1.3/use;
spdadd B A any -P out ipsec
        ipcomp/tunnel/192.168.1.3-192.168.1.2/use;
--------------------

Obviously applications want the events even when the table
is empty.  So we cannot make this behavioral change.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:41:40 -08:00
Riccardo Ghetta 08326dbe7b SiS190/191 half-duplex initialization fix
Adds half-duplex specific setup code (taken from SiS own GPL driver).
Without those, half-duplex connections are very unreliable, often
working on small transfers and failing after a while.

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:38:10 -08:00
Ben Hutchings 7af3351f71 ethtool: Don't flush n-tuple list from ethtool_reset()
The n-tuple list should be flushed if and only if the ETH_RESET_FILTER
flag is set and the driver is able to reset filtering/flow direction
hardware without also resetting a component whose flag is not set.
This test is best left to the driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:38:10 -08:00
Vladislav Zolotarov a07da6df73 bnx2x: version number and date
Updated release version and date: 1.52.1-6 and 2010/02/16

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:44 -08:00
Vladislav Zolotarov 3359fced77 bnx2x: Use firmware 5.2.13
Switch to the new firmware version (5.2.13).

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:44 -08:00
Vladislav Zolotarov 2db29fc71b bnx2x: FW 5.2.13
New firmware version (5.2.13).

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:43 -08:00
Vladislav Zolotarov 0c43f43f48 bnx2x: fix in 57710 self-test
Bug fix: Use the last unicast entry in CAM in bnx2x_test_int(). Relevant for 57710 only.

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:43 -08:00
Vladislav Zolotarov d43a7e67ae bnx2x: Do not allow enabling LRO if disable_tpa=1
Bug fix: Do not allow enabling LRO if disable_tpa=1.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:42 -08:00
Vladislav Zolotarov f1e1a199f3 bnx2x: clean up in case of error in bnx2x_init_hw()
Bug fix: clean up MCP state in case of error in bnx2x_init_hw().

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:42 -08:00
Vladislav Zolotarov 6cbe5065bb bnx2x: Properly release allocated MSI-X/MSI vectors
Bug fix: Properly release allocated MSI-X/MSI vectors if ifup failed
due to lack of memory.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:41 -08:00
Joe Perches a475f603d2 drivers/net/usb: Use netif_<level> logging facilities
Convert from:
	if (netif_msg_<foo>(priv))
		dev_<level>(dev...
to
	netif_<level>(priv, foo, dev...

Also convert a few:

	if (i < REG_TIMEOUT) {
		etc...
		return ret;
       }
to
	if (i >= REG_TIMEOUT)
		goto fail;
	etc...
	return ret;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:41 -08:00
Joe Perches 60b8675592 usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>
These macros are too similar to the dev_<level> equivalents
but take a usbnet * argument.  Convert them to the recently
introduced netdev_<level> macros and remove the old macros.

The old macros had "\n" appended to the format string.
Add the "\n" to the converted uses.

Some existing uses of the dev<foo> macros in cdc_eem.c
probably mistakenly had trailing "\n".  No "\n" added there.

Fix net1080 this/other log message inversion.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:40 -08:00
Sathya Perla 82456b031e be2net: implement pci shutdown handler
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:40 -08:00
Sathya Perla 89420424fc be2net: fix rx-path to ignore a flush completion
The flush compl (compl with numfrags == 0; no data) is rcvd
from hw to indicate completion of RXQ destory operation. Fix
the RX path to not process it as RX data.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:39 -08:00
Sathya Perla 7a1e9b2059 be2net: don't rearm mcc cq when device is not open
When an MCC cmd is issued (via a netdev/ethtool op)
while the device is not open, the MCC CQ gets processed but the EQ
is not processed (as isr is not registered.) This can cause the EQ
to become full. So, while the device is not open, CQ must not be re-armed
to prevent EQ entries.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:39 -08:00
Sathya Perla a058a63274 be2net: a mini optimization in rx_compl_process() code
Introduce unlikely() for skb alloc failure and vlanf checks...

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:38 -08:00
Ron Mercer aa13bd6ef4 qlge: Fix occasional loopback test failure.
On some servers we see the cleaning of the RX queue finish before all
the loopback packets are sent out.  This delay allows the queues to
settle before checking for successful completion.
Also, delay completion so link has time to come back up.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:38 -08:00
Ron Mercer 801e9096c5 qlge: Fix bonding mac address bug.
Use local copy of current mac address when initializing.  In bonding
testing we saw cases where dev_addr was out of data causing failover
errors.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:37 -08:00
Ron Mercer c0c56955e7 qlge: Fix dropping of large non-TCP/UDP frames.
This was found with pings that were large enough to span multiple rx
buffers.  The split frame logic handles this case nicely.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:37 -08:00
Steven J. Magnani 8ea7a37c5a ll_temac: Fix MAC address configuration from userland
A userland command to set the LLTEMAC MAC address,
i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq",
results in a device address of 00:01:xx:yy:zz:pp.
Correct this.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:36 -08:00
Steven J. Magnani c3b7c12cd7 ll_temac: Add support for V2 LLTEMAC core
LLTEMAC V1 cores place only received packet length in the app4 word.
V2 cores place additional information in app4.
Mask out the additional information when retrieving the packet length.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:35:36 -08:00
Jiri Pirko e1d444771e net: convert multiple drivers to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:12 -08:00
Jiri Pirko d7b855c2dc cassini: convert to use netdev_for_each_mc_addr
Introduced a new function to do the mc list processing, makes code
clearer after transition.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:12 -08:00
Alexey Dobriyan faf234220f net: use kasprintf() for socket cache names
kasprintf() makes code smaller.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:11 -08:00
Eric Dumazet 8a5ce54562 xt_hashlimit: fix locking
Commit 2eff25c18c
(netfilter: xt_hashlimit: fix race condition and simplify locking)
added a mutex deadlock :
htable_create() is called with hashlimit_mutex already locked

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:11 -08:00
Pavel Emelyanov 9f0beba9f9 ipmr: remove useless checks from ipmr_device_event
The net being checked there is dev_net(dev) and thus this if
is always false.

Fits both net and net-next trees.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:27:10 -08:00
Nick Nunley a77ff709dd igb: update tx DMA mapping error handling
This updates the tx DMA mapping error handling code to
resemble e1000e/ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:39 -08:00
Nick Nunley 58fd62f525 igb: change descriptor control thresholds
This change simplifies the code by setting RX_PTHRESH to 8 for
all devices, as it was unlikely that there was any advantage to
set it at 16 for earlier cards. Additionally TX_WTHRESH is
set to 1 for the 82576 NIC to improve performance by enabling
a minimal amount of write combining when writing back descriptors.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:39 -08:00
Nick Nunley fe0592b4be igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors
This change makes it so that igb_free_q_vectors is reused in
igb_alloc_q_vectors to handle the cleanup instead of unwinding
through the allocations.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:38 -08:00
Nick Nunley d3eeb62ddd igb: remove unused vmolr value
In an earlier version of igb_write_mc_addr_list() the vmolr register
was modified. This register is no longer accessed, although the variable
still exists. This patch removes it from the function.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:38 -08:00
Nick Nunley 91d4ee3382 igb: minor type cleanups
This change cleans up some instances where unsigned int and u32
were being used interchangeably, and cleans up hdr_len which
was being set to 0 twice.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:37 -08:00
Nick Nunley 40e90c26f5 igb: move gso_segs into buffer_info structure
This change moves gso_segs into the buffer_info structure to avoid
a possible cache line miss in clean_tx_irq.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:37 -08:00
Nick Nunley 717ba08935 igb: inline igb_maybe_stop_tx
igb_maybe_stop_tx() is extremely small and appears in several spots in
the tx hotpath. This change inlines the function for a possible
performance boost.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:36 -08:00
Nick Nunley 43915c7c9a igb: only read phy specific stats if in internal phy mode
There are a couple statistics registers that are not meant to
be read when in SGMII/serdes mode. This patch adds a check to
verify mode before reading and updating these statistics.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:36 -08:00
Nick Nunley e6bdb6fefc igb: only support SRRCTL_DROP_EN when using multiple queues
The SRRCTL.DROP_EN bit should only be set when we are supporting
multiple queues. This bit is meant to prevent head of line blocking
and is unnecessary in the single queue case.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:35 -08:00
Nick Nunley abe1c3638c igb: cap interrupts at 20K per queue when in itr mode 3
In order to maintain similar performance between MSI-X and
legacy/MSI interrupts, this patch reduces the number of interrupts
when receiving small packets to 20K when in interrupt throttle
rate mode 3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:35 -08:00
Nick Nunley 2d0b0f6935 igb: remove adaptive IFS from driver
Adaptive IFS support has been included in the igb driver since its
initial release, but it is not a feature on any igb NICs. This patch
removes it from the driver.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:34 -08:00
Alexander Duyck 3025a446b6 igb: Allocate rings seperately instead of as a block
This change makes it so that the rings are allocated seperately.  As a
result we can allocate them on seperate nodes at some point in the future
if we so desire.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:34 -08:00
Nick Nunley b94f2d775a igb: call pci_save_state after pci_restore_state
This patch adds calls to pci_save_state() immediately after
calls to pci_restore_state(). Due to a change in the behavior
of pci_restore_state() it is necessary to call pci_save_state()
to keep the state_saved flag. This patch is based on a similar
patch for ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:33 -08:00
Nick Nunley 88a268c1a1 igb: Power down link when interface is down
This changes the behavior of the driver to power down the link
when the associated interface is down, unless management is enabled.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:33 -08:00
Nick Nunley 53c992fa84 igb: ignore EEPROM APME check when shutting down serdes link
Checking the EEPROM APME state unnecessarily prevents the link from
shutting down. The standard power down routines should be
sufficient to determine whether the serdes link can power down
when going into D3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:32 -08:00
Nick Nunley 3145535ac6 igb: Report link status in ethtool when interface is down
With this change ethtool will correctly report link status when
the interface is down. Currently ethtool reports the link as not
detected when the interface is down.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:32 -08:00
Nick Nunley 22939f0606 igb: add support for wake-on-link
This adds support for wake-on-link/phy activity to the ethtool
interface.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:31 -08:00
Alexander Duyck 26b39276ca igb: remove unecessary q_vector declarations and remove itr_shift
This change removes the use of itr_shift since a mac type call can be
used just as easily to identify the only HW that needs to have the itr
shifted.

In addition it removes two unecessary declarations of a q_vector
pointer from the initialization path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 13:21:31 -08:00
Joe Perches 9874c41cd5 ipv6.h: reassembly: replace calculated magic number with multiplication
On Tue, 2010-02-16 at 16:47 +0100, Patrick McHardy wrote:
> Joe Perches wrote:
> >> @@ -246,6 +246,8 @@ extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
> >>  int ip6_frag_nqueues(struct net *net);
> >>  int ip6_frag_mem(struct net *net);
> >>
> >> +#define IPV6_FRAG_HIGH_THRESH	262144		/* == 256*1024 */
> >> +#define IPV6_FRAG_LOW_THRESH	196608		/* == 192*1024 */
> >>  #define IPV6_FRAG_TIMEOUT	(60*HZ)		/* 60 seconds */
> >
> > 196608 isn't a number I want to remember.
> > Is this better as:
> >
> > #define IPV6_FRAG_HIGH_THRESH	(256 * 1024)	/* 262144 */
> > #define IPV6_FRAG_LOW_THRESH	(192 * 1024)	/* 196608 */
>
> Please send a patch, I'll apply it once these patches are in Dave's
> tree.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17 00:03:28 -08:00