]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agotg3: Workaround tagged status update bug
Matt Carlson [Mon, 13 Jun 2011 13:38:55 +0000 (13:38 +0000)]
tg3: Workaround tagged status update bug

On rare occasions, writing the tag to the interrupt mailbox does not
reenable interrupts.  This patch fixes the problem by reissuing the
mailbox update.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agobnx2x: Update date to 2011/06/13 and version to 1.70.00-0
Vladislav Zolotarov [Tue, 14 Jun 2011 01:34:46 +0000 (01:34 +0000)]
bnx2x: Update date to 2011/06/13 and version to 1.70.00-0

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agobnx2x: PFC support for 578xx
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:42 +0000 (01:34 +0000)]
bnx2x: PFC support for 578xx

Add supoprt for 3 COSes for 578xx devices.
Fix HW configuration for PFC feature according to new HSI in link layer.

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@conan.davemloft.net>
13 years agobnx2x: Rename LASI registers to definitions in mdio.h
Yaniv Rosner [Tue, 14 Jun 2011 01:34:38 +0000 (01:34 +0000)]
bnx2x: Rename LASI registers to definitions in mdio.h

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Add a periodic task for link PHY events
Yaniv Rosner [Tue, 14 Jun 2011 01:34:33 +0000 (01:34 +0000)]
bnx2x: Add a periodic task for link PHY events

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Adjust BCM84833 to BCM578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:27 +0000 (01:34 +0000)]
bnx2x: Adjust BCM84833 to BCM578xx

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Adjust ETS to 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:23 +0000 (01:34 +0000)]
bnx2x: Adjust ETS to 578xx

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Add new PHY 54616s
Yaniv Rosner [Tue, 14 Jun 2011 01:34:17 +0000 (01:34 +0000)]
bnx2x: Add new PHY 54616s

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Add Warpcore support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:12 +0000 (01:34 +0000)]
bnx2x: Add Warpcore support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Add new MAC support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:07 +0000 (01:34 +0000)]
bnx2x: Add new MAC support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: Cosmetic changes.
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:02 +0000 (01:34 +0000)]
bnx2x: Cosmetic changes.

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@conan.davemloft.net>
13 years agobnx2x: update DCB data during PMF migration
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:57 +0000 (01:33 +0000)]
bnx2x: update DCB data during PMF migration

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@conan.davemloft.net>
13 years agobnx2x: 57712 parity handling
Vladislav Zolotarov [Tue, 14 Jun 2011 01:33:51 +0000 (01:33 +0000)]
bnx2x: 57712 parity handling

- Added support for a parity error handling for a 57712 chip.
 - Changed the parity recovery scheme from per-chip to per-engine.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agoNew 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc
Vlad Zolotarov [Tue, 14 Jun 2011 11:33:44 +0000 (14:33 +0300)]
New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc

New FW/HSI (7.0):
 - Added support to 578xx chips
 - Improved HSI - much less driver's direct access to the FW internal
   memory needed.

New implementation of the HSI handling layer in the bnx2x (bnx2x_sp.c):
 - Introduced chip dependent objects that have chip independent interfaces
   for configuration of MACs, multicast addresses, Rx mode, indirection table,
   fast path queues and function initialization/cleanup.
 - Objects functionality is based on the private function pointers, which
   allows not only a per-chip but also PF/VF differentiation while still
   preserving the same interface towards the driver.
 - Objects interface is not influenced by the HSI changes which do not require
   providing new parameters keeping the code outside the bnx2x_sp.c invariant
   with regard to such HSI chnages.

Changes in a CNIC, bnx2fc and bnx2i modules due to the new HSI.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agobnx2x: Created bnx2x_sp
Vladislav Zolotarov [Tue, 14 Jun 2011 01:33:39 +0000 (01:33 +0000)]
bnx2x: Created bnx2x_sp

Moved the HSI dependent slow path code to a separate file.
Currently it contains the implementation of MACs, Rx mode,
multicast addresses, indirection table, fast path queue and function
configuration code.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agobnx2x: removed unused variables
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:34 +0000 (01:33 +0000)]
bnx2x: removed unused variables

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@conan.davemloft.net>
13 years agobnx2x: use bnx2x_reload_if_running
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:30 +0000 (01:33 +0000)]
bnx2x: use bnx2x_reload_if_running

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@conan.davemloft.net>
13 years agobnx2x: dump FW memory when appropriate msglvl is raised
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:25 +0000 (01:33 +0000)]
bnx2x: dump FW memory when appropriate msglvl is raised

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@conan.davemloft.net>
13 years agobnx2x: do not call link update without HW notification
Yaniv Rosner [Tue, 14 Jun 2011 01:33:19 +0000 (01:33 +0000)]
bnx2x: do not call link update without HW notification

Signed-off-by: Yaniv Rosner <yanivr@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@conan.davemloft.net>
13 years agobnx2x: disable fairness if ETS is enabled
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:13 +0000 (01:33 +0000)]
bnx2x: disable fairness if ETS is enabled

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@conan.davemloft.net>
13 years agobnx2x: avoid release of unrequested irqs
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:08 +0000 (01:33 +0000)]
bnx2x: avoid release of unrequested irqs

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@conan.davemloft.net>
13 years agobnx2x: put start bd csum in separate function
Dmitry Kravkov [Tue, 14 Jun 2011 01:33:02 +0000 (01:33 +0000)]
bnx2x: put start bd csum in separate function

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@conan.davemloft.net>
13 years agobnx2x: remove references to intr_sem
Dmitry Kravkov [Tue, 14 Jun 2011 01:32:53 +0000 (01:32 +0000)]
bnx2x: remove references to intr_sem

It's not needed any more since device always operates in interrupt-driven mode

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@conan.davemloft.net>
13 years agobnx2x: do not allocate FCoE ring if disabled
Dmitry Kravkov [Tue, 14 Jun 2011 01:32:47 +0000 (01:32 +0000)]
bnx2x: do not allocate FCoE ring if disabled

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@conan.davemloft.net>
13 years agocnic: Move indexing function pointers to struct kcq_info
Michael Chan [Tue, 14 Jun 2011 01:32:38 +0000 (01:32 +0000)]
cnic: Move indexing function pointers to struct kcq_info

The hardware indexing scheme for the FCoE kcq will change in the upcoming
firmware.  This patch will cope with the change easily.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agovmxnet3: remove unused variable
Neil Horman [Mon, 13 Jun 2011 05:48:30 +0000 (05:48 +0000)]
vmxnet3: remove unused variable

While doing some backporting I noticed that vmxnet3 had a variable that was set
but never used.  Get rid of it, and stop the compiler from griping

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "VMware, Inc." <pv-drivers@vmware.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agobonding:delete a dereference before check
Peter Pan(潘卫平) [Mon, 13 Jun 2011 04:30:10 +0000 (04:30 +0000)]
bonding:delete a dereference before check

Dan Carpenter found that there was a dereference before a check,
added in 56d00c677de0(bonding:delete lacp_fast from ad_bond_info).

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agol2tp: fix l2tp_ip_sendmsg() route handling
Eric Dumazet [Sat, 11 Jun 2011 22:27:09 +0000 (22:27 +0000)]
l2tp: fix l2tp_ip_sendmsg() route handling

l2tp_ip_sendmsg() in non connected mode incorrectly calls
sk_setup_caps(). Subsequent send() calls send data to wrong destination.

We can also avoid changing dst refcount in connected mode, using
appropriate rcu locking. Once output route lookups can also be done
under rcu, sendto() calls wont change dst refcounts too.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agosmsc9420: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:07 +0000 (02:19 +0000)]
smsc9420: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the smsc9420. Compile tested only.

Cc: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agostmmac: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:06 +0000 (02:19 +0000)]
stmmac: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the STMicroelectronics Ethernet driver. Compile tested only.

Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agor6040: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:05 +0000 (02:19 +0000)]
r6040: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the RDC R6040 Fast Ethernet MAC. Compile tested only.

Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agoethoc: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:04 +0000 (02:19 +0000)]
ethoc: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the OpenCores 10/100 MAC driver. Compile tested only.

Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agodnet: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:03 +0000 (02:19 +0000)]
dnet: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
in the "Dave ethernet interface." Compile tested only.

Cc: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agotg3: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:02 +0000 (02:19 +0000)]
tg3: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the TIGON3 driver. Compile tested only.

Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agodavinci_emac: enable transmit time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:19:01 +0000 (02:19 +0000)]
davinci_emac: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
for the DaVinci EMAC driver. Tested together with the dp83640 PHY.

Cc: Anant Gole <anantgole@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agodavinci_emac: pass ioctls through to phy device.
Richard Cochran [Sun, 12 Jun 2011 02:19:00 +0000 (02:19 +0000)]
davinci_emac: pass ioctls through to phy device.

The DaVinci EMAC driver does not implement any ioctls, but still it can
pass them through to the phy device. This makes it possible for a phy
to offer PHC capabilities.

Cc: Anant Gole <anantgole@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agofec: enable transmit and receive time stamping.
Richard Cochran [Sun, 12 Jun 2011 02:18:59 +0000 (02:18 +0000)]
fec: enable transmit and receive time stamping.

This patch has been tested on the Freescale M5234BCC, which includes the
National Semiconductor DP83640 with IEEE 1588 support.

Cc: Greg Ungerer <gerg@uclinux.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agonet: export time stamp utility function for Ethernet MAC drivers
Richard Cochran [Sun, 12 Jun 2011 02:18:58 +0000 (02:18 +0000)]
net: export time stamp utility function for Ethernet MAC drivers

The network stack provides the function, skb_clone_tx_timestamp().
Ethernet MAC drivers can call this via the transmit time stamping
hook, skb_tx_timestamp(). This commit exports the clone function so
that drivers using it can be compiled as modules.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
13 years agosnmp: reduce percpu needs by 50%
Eric Dumazet [Fri, 10 Jun 2011 19:45:51 +0000 (19:45 +0000)]
snmp: reduce percpu needs by 50%

SNMP mibs use two percpu arrays, one used in BH context, another in USER
context. With increasing number of cpus in machines, and fact that ipv6
uses per network device ipstats_mib, this is consuming a lot of memory
if many network devices are registered.

commit be281e554e2a (ipv6: reduce per device ICMP mib sizes) shrinked
percpu needs for ipv6, but we can reduce memory use a bit more.

With recent percpu infrastructure (irqsafe_cpu_inc() ...), we no longer
need this BH/USER separation since we can update counters in a single
x86 instruction, regardless of the BH/USER context.

Other arches than x86 might need to disable irq in their
irqsafe_cpu_inc() implementation : If this happens to be a problem, we
can make SNMP_ARRAY_SZ arch dependent, but a previous poll
( https://lkml.org/lkml/2011/3/17/174 ) to arch maintainers did not
raise strong opposition.

Only on 32bit arches, we need to disable BH for 64bit counters updates
done from USER context (currently used for IP MIB)

This also reduces vmlinux size :

1) x86_64 build
$ size vmlinux.before vmlinux.after
   text    data     bss     dec     hex filename
7853650 1293772 1896448 11043870  a8841e vmlinux.before
7850578 1293772 1896448 11040798  a8781e vmlinux.after

2) i386  build
$ size vmlinux.before vmlinux.afterpatch
   text    data     bss     dec     hex filename
6039335  635076 3670016 10344427  9dd7eb vmlinux.before
6037342  635076 3670016 10342434  9dd022 vmlinux.afterpatch

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <andi@firstfloor.org>
CC: Ingo Molnar <mingo@elte.hu>
CC: Tejun Heo <tj@kernel.org>
CC: Christoph Lameter <cl@linux-foundation.org>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org
CC: linux-arch@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: clean up bond_del_vlan()
Jiri Bohac [Fri, 10 Jun 2011 10:27:20 +0000 (10:27 +0000)]
bonding: clean up bond_del_vlan()

1) the setting of NETIF_F_VLAN_CHALLENGED in bond_del_vlan() is
useless since commit b2a103e6 because bond_fix_features() now
sets NETIF_F_VLAN_CHALLENGED whenever the last slave is being
removed.

2) the code never triggers anyway as vlan_list is never empty
since ad1afb00.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix MIPS fallout from "net: remove interrupt.h inclusion from netdevice.h"
Alexey Dobriyan [Fri, 10 Jun 2011 03:36:43 +0000 (03:36 +0000)]
net: fix MIPS fallout from "net: remove interrupt.h inclusion from netdevice.h"

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Enable NETIF_F_TSO6 for VLAN traffic for BE
Padmanabh Ratnakar [Sat, 11 Jun 2011 22:58:46 +0000 (15:58 -0700)]
be2net: Enable NETIF_F_TSO6 for VLAN traffic for BE

NETIF_F_TSO6 for VLAN packets was not enabled for BE adapters.
Enabling it.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovirtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID
Jason Wang [Fri, 10 Jun 2011 00:56:17 +0000 (00:56 +0000)]
virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID

There's no need for the guest to validate the checksum if it have been
validated by host nics. So this patch introduces a new flag -
VIRTIO_NET_HDR_F_DATA_VALID which is used to bypass the checksum
examing in guest. The backend (tap/macvtap) may set this flag when
met skbs with CHECKSUM_UNNECESSARY to save cpu utilization.

No feature negotiation is needed as old driver just ignore this flag.

Iperf shows 12%-30% performance improvement for UDP traffic. For TCP,
when gro is on no difference as it produces skb with partial
checksum. But when gro is disabled, 20% or even higher improvement
could be measured by netperf.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: DM9000: Add support for byte EEPROM access
Ben Dooks [Fri, 10 Jun 2011 00:50:32 +0000 (00:50 +0000)]
net: DM9000: Add support for byte EEPROM access

Given many versions of ethtool's reluctance to do anything other than
byte accesses to the EEPROM interface, it is easier to update the driver
to support byte accesses so that all the ethtool versions that have been
observed in Debian can write the EEPROM.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: kzalloc() error handling on deleting last address
Michio Honda [Fri, 10 Jun 2011 07:42:14 +0000 (16:42 +0900)]
sctp: kzalloc() error handling on deleting last address

Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: add Faraday FTGMAC100 Gigabit Ethernet driver
Po-Yu Chuang [Wed, 8 Jun 2011 23:32:48 +0000 (23:32 +0000)]
net: add Faraday FTGMAC100 Gigabit Ethernet driver

FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
and MII/GMII.  This driver has been working on some ARM/NDS32 SoC's
including Faraday A369 and Andes AG102.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/m68k: Include <linux/interrupt.h> where needed
Geert Uytterhoeven [Sat, 11 Jun 2011 21:58:17 +0000 (14:58 -0700)]
net/m68k: Include <linux/interrupt.h> where needed

arch/m68k/emu/nfeth.c: In function ‘nfeth_init’:
arch/m68k/emu/nfeth.c:243: error: implicit declaration of function ‘request_irq’
arch/m68k/emu/nfeth.c:243: error: ‘IRQF_SHARED’ undeclared (first use in this function)
arch/m68k/emu/nfeth.c:243: error: (Each undeclared identifier is reported only once
arch/m68k/emu/nfeth.c:243: error: for each function it appears in.)
arch/m68k/emu/nfeth.c: In function ‘nfeth_cleanup’:
arch/m68k/emu/nfeth.c:266: error: implicit declaration of function ‘free_irq’
drivers/net/apne.c: In function ‘apne_probe’:
drivers/net/apne.c:189: error: implicit declaration of function ‘free_irq’
drivers/net/apne.c: In function ‘apne_probe1’:
drivers/net/apne.c:317: error: implicit declaration of function ‘request_irq’
drivers/net/apne.c:317: error: ‘IRQF_SHARED’ undeclared (first use in this function)
drivers/net/apne.c:317: error: (Each undeclared identifier is reported only once
drivers/net/apne.c:317: error: for each function it appears in.)

Introduced by commit a6b7a407865a ("net: remove interrupt.h inclusion from
netdevice.h").

Include <linux/interrupt.h> in the individual drivers to fix the build.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbevf: Update the driver string
Greg Rose [Thu, 19 May 2011 02:11:45 +0000 (02:11 +0000)]
ixgbevf: Update the driver string

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agortnetlink: Compute and store minimum ifinfo dump size
Greg Rose [Fri, 10 Jun 2011 01:27:09 +0000 (01:27 +0000)]
rtnetlink: Compute and store minimum ifinfo dump size

The message size allocated for rtnl ifinfo dumps was limited to
a single page.  This is not enough for additional interface info
available with devices that support SR-IOV and caused a bug in
which VF info would not be displayed if more than approximately
40 VFs were created per interface.

Implement a new function pointer for the rtnl_register service that will
calculate the amount of data required for the ifinfo dump and allocate
enough data to satisfy the request.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Change version to remove number after -k in kernel versions.
Carolyn Wyborny [Thu, 26 May 2011 03:02:26 +0000 (03:02 +0000)]
igb: Change version to remove number after -k in kernel versions.

This patch changes the way versioning is done for igb in the kernel by
removing the number after the "k."  It has been determined that just the
"k" is sufficient to identify a kernel version and the following number
was used in an inconsistent manner.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigbvf: update version number
Williams, Mitch A [Thu, 19 May 2011 05:37:59 +0000 (05:37 +0000)]
igbvf: update version number

Update the version number to match version conventions. Bump the major
version to indicate that new hardware support (i350) has been added.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: update driver version
Bruce Allan [Thu, 19 May 2011 01:53:41 +0000 (01:53 +0000)]
e1000e: update driver version

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: remove redundant reverse dependency on CRC32
Bruce Allan [Thu, 26 May 2011 05:24:38 +0000 (05:24 +0000)]
e1000e: remove redundant reverse dependency on CRC32

Commit 5d03078a6804bf4c7f943c5b68bef80468c0717f added a redundant 'select
CRC32'; remove it.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: Clear host wakeup bit on 82577/8 without touching PHY page 800
Bruce Allan [Fri, 13 May 2011 07:20:14 +0000 (07:20 +0000)]
e1000e: Clear host wakeup bit on 82577/8 without touching PHY page 800

The Host Wakeup Active bit in the PHY Port General Configuration register
(page 769 register 17) must be cleared after every PHY reset to prevent an
unexpected wake signal from the PHY. Originally, this was accomplished by
simply reading the PHY Wakeup Control register on page 800 which clears the
Host Wakeup Active bit as a side-effect. Unfortunately, a hardware bug on
the 82577 and 82578 PHY can cause unexpected behavior when registers on
page 800 are accessed while in gigabit mode.

This patch changes the remaining instances when the Host Wakeup Active bit
needs to be cleared while possibly in gigabit mode by accessing the Port
General Configuration register directly instead of accessing any register
on page 800.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: access multiple PHY registers on same page at the same time
Bruce Allan [Fri, 13 May 2011 07:20:09 +0000 (07:20 +0000)]
e1000e: access multiple PHY registers on same page at the same time

Doing a PHY page select can take a long time, relatively speaking. This
can cause a significant delay when updating a number of PHY registers on
the same page by unnecessarily setting the page for each PHY access. For
example when going to Sx, all the PHY wakeup registers (WUC, RAR[], MTA[],
SHRAR[], IP4AT[], IP6AT[], etc.) on 82577/8/9 need to be updated which
takes a long time which can cause issues when suspending.

This patch introduces new PHY ops function pointers to allow callers to
set the page directly and do any number of PHY accesses on that page.
This feature is currently only implemented for 82577, 82578 and 82579
PHYs for both the normally addressed registers as well as the special-
case addressing of the PHY wakeup registers on page 800. For the latter
registers, the existing function for accessing the wakeup registers has
been divided up into three- 1) enable access to the wakeup register page,
2) perform the register access and 3) disable access to the wakeup register
page. The two functions that enable/disable access to the wakeup register
page are necessarily available to the caller so that the caller can restore
the value of the Port Control (a.k.a. Wakeup Enable) register after the
wakeup register accesses are done.

All instances of writing to multiple PHY registers on the same page are
updated to use this new method and to acquire any PHY locking mechanism
before setting the page and performing the register accesses, and release
the locking mechanism afterward.

Some affiliated magic number cleanup is done as well.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: do not schedule the Tx queue until ready
Bruce Allan [Fri, 13 May 2011 07:20:03 +0000 (07:20 +0000)]
e1000e: do not schedule the Tx queue until ready

Start the Tx queue when the interface is brought up in e1000e_up() but do
not schedule the queue until link is up as detected in the watchdog task
which sets netif_carrier_on.

Also flush the descriptors and clean the Tx and Rx rings before resetting
the hardware when bringing the interface down otherwise there is a small
window where the watchdog task can be triggered with netif_carrier_off
and the Tx ring not yet empty which causes an additional and unnecessary
reset.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: log when swflag is cleared unexpectedly on ICH/PCH devices
Bruce Allan [Fri, 13 May 2011 07:19:53 +0000 (07:19 +0000)]
e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices

Since EXTCNF_CTRL.SWFLAG (used in the ownership arbitration of shared
resources, e.g. the PHY shared between the s/w, f/w, and h/w clients)
can be cleared by any of those clients, log a debug message when
software attempts to clear it and it is already cleared unexpectedly.
And since the swflag is cleared by a hardware reset, the driver does
not need to do that, but the mutex acquired when the bit is set must
still be cleared.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82579 intermittently disabled during S0->Sx
Bruce Allan [Fri, 13 May 2011 07:19:48 +0000 (07:19 +0000)]
e1000e: 82579 intermittently disabled during S0->Sx

When repeatedly cycling Sx->S0 states with the network cable unplugged,
the 82579 PHY may not initialize as expected and may require a full power
cycle to recover functionality to the device.  Workaround this by testing
access of the PHY registers after resuming; if that returns unexpected
results toggle the LANPHYPC signal to power cycle the PHY.

This is implemented in the new function e1000_resume_workarounds_pchlan()
which calls another new function, e1000_toggle_lanphypc_value_ich8lan(),
which has been created to reduce code duplication (same functionality
required by a previous workaround).  Also, e1000e_disable_gig_wol_ich8lan
is now e1000_suspend_workarounds_ich8lan to better reflect what it does.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: disable far-end loopback mode on ESB2
Bruce Allan [Fri, 13 May 2011 07:19:42 +0000 (07:19 +0000)]
e1000e: disable far-end loopback mode on ESB2

The ESB2 LAN includes a debug feature that enables far-end loopback (FELB)
of the SerDes/Kumeran interface.  This feature is activated when receiving
a sequence of symbols that includes a reserved codeword.  On a perfect
link, FELB would never be activated.  In the presence of bit errors, there
is a very small, but non-zero, probability of FELB being activated.

If the FELB is activated, the SerDes link becomes non-functional and must
be reset.  It could also corrupt the switching tables in the switch since
the ESB2 is transmitting packets with a different source MAC address.

This patch disables the FELB feature.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agobonding: delete unused arp_mon_pt
Peter Pan(潘卫平) [Wed, 8 Jun 2011 21:19:05 +0000 (21:19 +0000)]
bonding: delete unused arp_mon_pt

Now all received packets are handled by bond_handle_frame,
and arp_mon_pt isn't used any more.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: delete unused ad_timer
Peter Pan(潘卫平) [Wed, 8 Jun 2011 21:19:04 +0000 (21:19 +0000)]
bonding: delete unused ad_timer

Now we use agg_select_timer and ad_work.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding:delete agg_select_mode from ad_bond_info
Peter Pan(潘卫平) [Wed, 8 Jun 2011 21:19:03 +0000 (21:19 +0000)]
bonding:delete agg_select_mode from ad_bond_info

bond_params->ad_select and ad_bond_info->agg_select_mode have the same
meaning, they are duplicate and need extra synchronization.

__get_agg_selection_mode() get ad_select from bond_params directly.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding:delete lacp_fast from ad_bond_info
Peter Pan(潘卫平) [Wed, 8 Jun 2011 21:19:02 +0000 (21:19 +0000)]
bonding:delete lacp_fast from ad_bond_info

These is also a bug, that if you modify lacp_rate via sysfs,
and add new slaves in bonding, new slaves won't use the latest lacp_rate,
since ad_bond_info->lacp_fast is initialized only once,
in bond_3ad_initialize().

Since both struct bond_params and ad_bond_info have lacp_fast,
they are duplicate and need extra synchronization.

bond_3ad_bind_slave() can use bond_params->lacp_fast to initialize port.
So we can just remove lacp_fast from struct ad_bond_info.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: make 802.3ad use latest lacp_rate
Peter Pan(潘卫平) [Wed, 8 Jun 2011 21:19:01 +0000 (21:19 +0000)]
bonding: make 802.3ad use latest lacp_rate

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:07 +0000 (10:37 +0000)]
enic: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Get/Set interrupt resource index for transmit and receive queues
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:02 +0000 (10:37 +0000)]
enic: Get/Set interrupt resource index for transmit and receive queues

Instead of deriving the index of a transmit/receive interrupt resource
from the transmit/receive queue index, always save and retrieve it
using an additional variable.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Log device configuration in detail during driver load
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:57 +0000 (10:36 +0000)]
enic: Log device configuration in detail during driver load

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Pass 802.1p bits for packets tagged with vlan zero
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:52 +0000 (10:36 +0000)]
enic: Pass 802.1p bits for packets tagged with vlan zero

enic driver currently passes 802.1p bits to the upper layers for packets
tagged with non-zero vlan ids only. This patch extends such behaviour to
zero vlan tagged packets also.

The patch is dependant on the following kernel patches:

1) vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
   - net-next-2.6 git commit: ad1afb00393915a51c21b1ae8704562bf036855f
   - Available 2.6.36 and later
2) vlan: Centralize handling of hardware acceleration.
  - net-next-2.6 git commit: 3701e51382a026cba10c60b03efabe534fba4ca4
  - Available 2.6.37 and later

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
David S. Miller [Thu, 9 Jun 2011 21:56:13 +0000 (14:56 -0700)]
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge

13 years agobatman-adv: use NO_FLAGS define instead of hard-coding 0
Marek Lindner [Thu, 9 Jun 2011 15:13:09 +0000 (17:13 +0200)]
batman-adv: use NO_FLAGS define instead of hard-coding 0

The definition NO_FLAGS was introduced to make the code more
readable and shall be used to initialize flag fields.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Use enums for related constants
Sven Eckelmann [Sat, 4 Jun 2011 09:26:00 +0000 (11:26 +0200)]
batman-adv: Use enums for related constants

CodingStyle "Chapter 12: Macros, Enums and RTL" recommends to use enums
for several related constants. Internal states can be used without
defining the actual value, but all values which are visible to the
outside must be defined as before. Normal values are assigned as usual
and flags are defined by shifts of a bit.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Rewrite debugfs kobj_to_* helpers as functions
Sven Eckelmann [Sun, 5 Jun 2011 08:20:19 +0000 (10:20 +0200)]
batman-adv: Rewrite debugfs kobj_to_* helpers as functions

CodingStyle "Chapter 12: Macros, Enums and RTL" highly recommends to use
functions instead of macros were possible. This ensures type safety and
prevents shadowing of other variables.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Fix signedness problem in parse_gw_bandwidth
Sven Eckelmann [Sat, 4 Jun 2011 12:00:49 +0000 (14:00 +0200)]
batman-adv: Fix signedness problem in parse_gw_bandwidth

strict_strtoul as used in parse_gw_bandwidth is defined for unsigned
long and strict_strtol should be used instead for long.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Don't return value in void function
Sven Eckelmann [Sat, 4 Jun 2011 10:40:37 +0000 (12:40 +0200)]
batman-adv: Don't return value in void function

gw_node_delete is defined with "void" as return type, but still tries to
return a value. The called function gw_node_delete is also return as
void and thus doesn't provide a value for us.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: accept delayed rebroadcasts to avoid bogus routing under heavy load
Daniele Furlan [Mon, 6 Jun 2011 22:45:55 +0000 (00:45 +0200)]
batman-adv: accept delayed rebroadcasts to avoid bogus routing under heavy load

When a link is saturated (re)broadcasts of OGMs are delayed. Under heavy
load this delay may exceed the orig interval which leads to OGMs being
dropped (the code would only accept an OGM rebroadcast if it arrived
before the next OGM was broadcasted). With this patch batman-adv will
also accept delayed OGMs in order to avoid a bogus influence on the
routing metric.

Signed-off-by: Daniele Furlan <daniele.furlan@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agonet: emaclite: Add missing linux/interrupt.h header
Michal Simek [Thu, 9 Jun 2011 08:29:13 +0000 (01:29 -0700)]
net: emaclite: Add missing linux/interrupt.h header

Log:
drivers/net/xilinx_emaclite.c: In function 'xemaclite_open':
drivers/net/xilinx_emaclite.c:961: error: implicit declaration of function 'request_irq'
drivers/net/xilinx_emaclite.c: In function 'xemaclite_close':
drivers/net/xilinx_emaclite.c:995: error: implicit declaration of function 'free_irq'
make[2]: *** [drivers/net/xilinx_emaclite.o] Error 1
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotun: do not put self in waitq if doing a nonblock read
Amos Kong [Thu, 9 Jun 2011 07:27:10 +0000 (00:27 -0700)]
tun: do not put self in waitq if doing a nonblock read

Perf shows a relatively high rate (about 8%) race in
spin_lock_irqsave() when doing netperf between external host and
guest. It's mainly becuase the lock contention between the
tun_do_read() and tun_xmit_skb(), so this patch do not put self into
waitqueue to reduce this kind of race. After this patch, it drops to
4%.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotun: dont force inline of functions
stephen hemminger [Wed, 8 Jun 2011 14:33:08 +0000 (14:33 +0000)]
tun: dont force inline of functions

Current standard practice is to not mark most functions as inline
and  let compiler decide instead.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotun: reserves space for network in skb
stephen hemminger [Wed, 8 Jun 2011 14:33:07 +0000 (14:33 +0000)]
tun: reserves space for network in skb

The tun driver allocates skb's to hold data from user and then passes
the data into the network stack as received data. Most network devices
allocate the receive skb with routines like dev_alloc_skb() that reserves
additional space for use by network protocol stack but tun does not.

Because of the lack of padding, when the packet is passed through bridge
netfilter a new skb has to be allocated.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic, bnx2: Check iSCSI support early in bnx2_init_one()
Michael Chan [Wed, 8 Jun 2011 19:29:36 +0000 (19:29 +0000)]
cnic, bnx2: Check iSCSI support early in bnx2_init_one()

Based on earlier patch from Neil Horman <nhorman@tuxdriver.com>

If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
return NULL and the cnic device will not be visible to bnx2i.  This
will prevent bnx2i from registering and then unregistering during
cnic_start() and cause the warning message:

bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete

Signed-off-by: Michael Chan <mchan@broadcom.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Improve NETDEV_UP event handling
Michael Chan [Wed, 8 Jun 2011 19:29:35 +0000 (19:29 +0000)]
cnic: Improve NETDEV_UP event handling

During NETDEV_UP, we use symbol_get() to get the net driver's cnic
probe function.  This sometimes doesn't work if NETDEV_UP happens
right after NETDEV_REGISTER and the net driver is still running module
init code.  As a result, the cnic device may not be discovered.  We
fix this by probing on all NETDEV events if the device's netif_running
state is up.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Randomize initial TCP port for iSCSI connections
Eddie Wai [Wed, 8 Jun 2011 19:29:34 +0000 (19:29 +0000)]
cnic: Randomize initial TCP port for iSCSI connections

This reduces the likelihood of port re-use when re-loading the driver.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix race conditions with firmware
Michael Chan [Wed, 8 Jun 2011 19:29:33 +0000 (19:29 +0000)]
cnic: Fix race conditions with firmware

During iSCSI connection terminations, if the target is also terminating
at about the same time, the firmware may not complete the driver's
request to close or reset the connection.  This is fixed by handling
other events (instead of the expected completion event) as an indication
that the driver's request has been rejected.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix interrupt logic
Michael Chan [Wed, 8 Jun 2011 19:29:32 +0000 (19:29 +0000)]
cnic: Fix interrupt logic

We need to keep looping until cnic_get_kcqes() returns 0.  cnic_get_kcqes()
returns a maximum of 64 entries.  If there are more entries in the queue
and we don't loop back, the remaining entries may not be serviced for a
long time.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: lower false sharing effect
Eric Dumazet [Thu, 9 Jun 2011 06:31:27 +0000 (23:31 -0700)]
inetpeer: lower false sharing effect

Profiles show false sharing in addr_compare() because refcnt/dtime
changes dirty the first inet_peer cache line, where are lying the keys
used at lookup time. If many cpus are calling inet_getpeer() and
inet_putpeer(), or need frag ids, addr_compare() is in 2nd position in
"perf top".

Before patch, my udpflood bench (16 threads) on my 2x4x2 machine :

             5784.00  9.7% csum_partial_copy_generic [kernel]
             3356.00  5.6% addr_compare              [kernel]
             2638.00  4.4% fib_table_lookup          [kernel]
             2625.00  4.4% ip_fragment               [kernel]
             1934.00  3.2% neigh_lookup              [kernel]
             1617.00  2.7% udp_sendmsg               [kernel]
             1608.00  2.7% __ip_route_output_key     [kernel]
             1480.00  2.5% __ip_append_data          [kernel]
             1396.00  2.3% kfree                     [kernel]
             1195.00  2.0% kmem_cache_free           [kernel]
             1157.00  1.9% inet_getpeer              [kernel]
             1121.00  1.9% neigh_resolve_output      [kernel]
             1012.00  1.7% dev_queue_xmit            [kernel]
# time ./udpflood.sh

real 0m44.511s
user 0m20.020s
sys 11m22.780s

# time ./udpflood.sh

real 0m44.099s
user 0m20.140s
sys 11m15.870s

After patch, no more addr_compare() in profiles :

             4171.00 10.7% csum_partial_copy_generic   [kernel]
             1787.00  4.6% fib_table_lookup            [kernel]
             1756.00  4.5% ip_fragment                 [kernel]
             1234.00  3.2% udp_sendmsg                 [kernel]
             1191.00  3.0% neigh_lookup                [kernel]
             1118.00  2.9% __ip_append_data            [kernel]
             1022.00  2.6% kfree                       [kernel]
              993.00  2.5% __ip_route_output_key       [kernel]
              841.00  2.2% neigh_resolve_output        [kernel]
              816.00  2.1% kmem_cache_free             [kernel]
              658.00  1.7% ia32_sysenter_target        [kernel]
              632.00  1.6% kmem_cache_alloc_node       [kernel]

# time ./udpflood.sh

real 0m41.587s
user 0m19.190s
sys 10m36.370s

# time ./udpflood.sh

real 0m41.486s
user 0m19.290s
sys 10m33.650s

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoniu: support 64 bit stats interface
stephen hemminger [Wed, 8 Jun 2011 14:54:04 +0000 (14:54 +0000)]
niu: support 64 bit stats interface

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomyricom: update to 64 bit stats
stephen hemminger [Wed, 8 Jun 2011 14:54:03 +0000 (14:54 +0000)]
myricom: update to 64 bit stats

Driver was already keeping 64 bit counters, just not using the new interface.

Ps: IMHO drivers should not be duplicating network device
stats into ethtool stats. It is useless duplication.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: update to support 64 bit stats
stephen hemminger [Wed, 8 Jun 2011 14:54:02 +0000 (14:54 +0000)]
enic: update to support 64 bit stats

The device driver already uses 64 bit statistics, it just
doesn't use the 64 bit interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: convert to 64 bit statistics
stephen hemminger [Wed, 8 Jun 2011 14:54:01 +0000 (14:54 +0000)]
netxen: convert to 64 bit statistics

Change to 64 bit statistics interface, driver was already maintaining 64 bit
value.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoveth: convert to 64 bit statistics
stephen hemminger [Wed, 8 Jun 2011 14:53:59 +0000 (14:53 +0000)]
veth: convert to 64 bit statistics

Not much change, device was already keeping per cpu statistics.
Use recent 64 statistics interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovmxnet3: convert to 64 bit stats interface
stephen hemminger [Wed, 8 Jun 2011 14:53:57 +0000 (14:53 +0000)]
vmxnet3: convert to 64 bit stats interface

Convert vmxnet3 driver to 64 bit statistics interface.
This driver was already counting packet per queue in a 64 bit value so not
a huge change. Eliminate unused old net_device_stats structure.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: remove unused list
Eric Dumazet [Wed, 8 Jun 2011 13:35:34 +0000 (13:35 +0000)]
inetpeer: remove unused list

Andi Kleen and Tim Chen reported huge contention on inetpeer
unused_peers.lock, on memcached workload on a 40 core machine, with
disabled route cache.

It appears we constantly flip peers refcnt between 0 and 1 values, and
we must insert/remove peers from unused_peers.list, holding a contended
spinlock.

Remove this list completely and perform a garbage collection on-the-fly,
at lookup time, using the expired nodes we met during the tree
traversal.

This removes a lot of code, makes locking more standard, and obsoletes
two sysctls (inet_peer_gc_mintime and inet_peer_gc_maxtime). This also
removes two pointers in inet_peer structure.

There is still a false sharing effect because refcnt is in first cache
line of object [were the links and keys used by lookups are located], we
might move it at the end of inet_peer structure to let this first cache
line mostly read by cpus.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <andi@firstfloor.org>
CC: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: RFC2988bis + taking RTT sample from 3WHS for the passive open side
Jerry Chu [Wed, 8 Jun 2011 11:08:38 +0000 (11:08 +0000)]
tcp: RFC2988bis + taking RTT sample from 3WHS for the passive open side

This patch lowers the default initRTO from 3secs to 1sec per
RFC2988bis. It falls back to 3secs if the SYN or SYN-ACK packet
has been retransmitted, AND the TCP timestamp option is not on.

It also adds support to take RTT sample during 3WHS on the passive
open side, just like its active open counterpart, and uses it, if
valid, to seed the initRTO for the data transmission phase.

The patch also resets ssthresh to its initial default at the
beginning of the data transmission phase, and reduces cwnd to 1 if
there has been MORE THAN ONE retransmission during 3WHS per RFC5681.

Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: generate link local address for GRE tunnel
stephen hemminger [Wed, 8 Jun 2011 10:44:30 +0000 (10:44 +0000)]
ipv6: generate link local address for GRE tunnel

Use same logic as SIT tunnel to handle link local address
for GRE tunnel. OSPFv3 requires link-local address to function.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoiph: use default get_stats
stephen hemminger [Wed, 8 Jun 2011 08:09:13 +0000 (08:09 +0000)]
iph: use default get_stats

This driver keeps stats in net_device stats therefore it
does not need to define it's own get_stats hook.

Also, use standard format for net_device_ops (without &).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agov2 ethtool: remove support for ETHTOOL_GRXNTUPLE
Alexander Duyck [Wed, 8 Jun 2011 12:35:08 +0000 (12:35 +0000)]
v2 ethtool: remove support for ETHTOOL_GRXNTUPLE

This change is meant to remove all support for displaying an ntuple as
strings via ETHTOOL_GRXNTUPLE.  The reason for this change is due to the
fact that multiple issues have been found including:
 - Multiple buffer overruns for strings being displayed.
 - Incorrect filters displayed, cleared filters with ring of -2 are displayed
 - Setting get_rx_ntuple displays no rules if defined.
 - Endianess wrong on displayed values.
 - Hard limit of 1024 filters makes display functionality extremely limited

The only driver that had supported this interface was ixgbe.  Since it no
longer uses the interface and due to the issues mentioned above I am
submitting this patch to remove it.

v2:
Updated based on comments from Ben Hutchings
 - Left ETH_SS_NTUPLE_FILTERS in code but commented on it being deprecated
 - Removed ethtool_rx_ntuple_list and ethtool_rx_ntuple_flow_spec_container
 - Left ETHTOOL_GRXNTUPLE but commented it as deprecated

Also cleaned up set_rx_ntuple since there is no flow spec container to
maintain we can drop all the code for the alloc and free of it and just
return ops->set_rx_ntuple().
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 8 Jun 2011 17:44:21 +0000 (13:44 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agonet: add needed interrupt.h
Stephen Rothwell [Wed, 8 Jun 2011 05:49:33 +0000 (15:49 +1000)]
net: add needed interrupt.h

Fixes these errors after the removal of interrupt.h from netdevice.h:

drivers/net/ll_temac_main.c: In function 'temac_open':
drivers/net/ll_temac_main.c:859:2: error: implicit declaration of function 'request_irq'
drivers/net/ll_temac_main.c:870:2: error: implicit declaration of function 'free_irq'
drivers/net/ll_temac_main.c: In function 'temac_poll_controller':
drivers/net/ll_temac_main.c:903:2: error: implicit declaration of function 'disable_irq'
drivers/net/ll_temac_main.c:909:2: error: implicit declaration of function 'enable_irq'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoath9k: make use of a helper to get paprd scale factor
Mohammed Shafi Shajakhan [Mon, 6 Jun 2011 17:32:33 +0000 (23:02 +0530)]
ath9k: make use of a helper to get paprd scale factor

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: disable transmission buffer aggregation for AMSDU packets
Yogesh Ashok Powar [Mon, 6 Jun 2011 09:24:17 +0000 (14:54 +0530)]
mwifiex: disable transmission buffer aggregation for AMSDU packets

Padding per MSDU will affect the length of next packet and hence
the exact length of next packet is uncertain here.

Also, aggregation of transmission buffer, while downloading the
data to the card, wont gain much on the AMSDU packets as the AMSDU
packets utilizes the transmission buffer space to the maximum
(adapter->tx_buf_size).

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>