openwrt/staging/blogic.git
12 years ago8139too: dev->{base_addr, irq} removal.
Francois Romieu [Fri, 9 Mar 2012 10:58:46 +0000 (11:58 +0100)]
8139too: dev->{base_addr, irq} removal.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agonatsemi: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 10:57:26 +0000 (11:57 +0100)]
natsemi: stop using net_device.{base_addr, irq}.

It's useless to check mem_start on a newly allocated device.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Tim Hockin <thockin@hockin.org>
12 years agosmsc9420: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 17:28:59 +0000 (18:28 +0100)]
smsc9420: stop using net_device.{base_addr, irq}.

The device private data pointer can not be NULL in smsc9420_open().

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
12 years agode2104x: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 14:15:03 +0000 (15:15 +0100)]
de2104x: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
12 years agoxircom_cb: stop using net_device.{base_addr, irq} and convert to __iomem.
Francois Romieu [Tue, 13 Mar 2012 08:27:47 +0000 (09:27 +0100)]
xircom_cb: stop using net_device.{base_addr, irq} and convert to __iomem.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
12 years agoxircom_cb: fix device probe error path.
Francois Romieu [Sun, 11 Mar 2012 22:34:54 +0000 (23:34 +0100)]
xircom_cb: fix device probe error path.

- unbalanced pci_disable_device
- PCI ressources were not released
- mismatching pci_alloc_.../kfree pairs are replaced by DMA alloc helpers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
12 years agouli526x: fix regions leak in driver probe error path.
Francois Romieu [Sat, 10 Mar 2012 10:15:15 +0000 (11:15 +0100)]
uli526x: fix regions leak in driver probe error path.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
12 years agosunhme: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:54:04 +0000 (19:54 +0100)]
sunhme: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agotulip_core: stop using net_device.{base_addr, irq}.
Francois Romieu [Tue, 13 Mar 2012 08:30:48 +0000 (09:30 +0100)]
tulip_core: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
12 years agosis190: stop using net_device.{base_addr, irq}
Francois Romieu [Fri, 9 Mar 2012 10:56:08 +0000 (11:56 +0100)]
sis190: stop using net_device.{base_addr, irq}

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agosc92031: stop using net_device.{base_addr, irq}
Francois Romieu [Fri, 9 Mar 2012 10:54:52 +0000 (11:54 +0100)]
sc92031: stop using net_device.{base_addr, irq}

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agowinbond840: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 22:37:01 +0000 (23:37 +0100)]
winbond840: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agobnx2: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 13:51:47 +0000 (14:51 +0100)]
bnx2: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Michael Chan <mchan@broadcom.com>
12 years agostarfire: remove deprecated options.
Francois Romieu [Tue, 13 Mar 2012 18:22:18 +0000 (19:22 +0100)]
starfire: remove deprecated options.

Some settings are duplicated between ethtool link management and module
options. The latter is trimmed. The half duplex, speed and autonegotiation
defaults are kept unchanged.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ion Badulescu <ionut@badula.org>
12 years agostarfire: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 10:53:42 +0000 (11:53 +0100)]
starfire: stop using net_device.{base_addr, irq}.

It's useless to check mem_start on a newly allocated device as well.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ion Badulescu <ionut@badula.org>
12 years agoyellowfin: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 17:43:40 +0000 (18:43 +0100)]
yellowfin: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years ago8139cp: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 10:58:08 +0000 (11:58 +0100)]
8139cp: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agos2io: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:13:48 +0000 (19:13 +0100)]
s2io: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <jdmason@kudzu.us>
12 years agoatl1e: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:28:28 +0000 (19:28 +0100)]
atl1e: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <chris.snook@gmail.com>
12 years agofealnx: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 14:35:40 +0000 (15:35 +0100)]
fealnx: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agovxge: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:37:55 +0000 (19:37 +0100)]
vxge: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <jdmason@kudzu.us>
12 years agosundance: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 17:14:47 +0000 (18:14 +0100)]
sundance: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agovia-velocity: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 14:24:37 +0000 (15:24 +0100)]
via-velocity: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
12 years agohamachi: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 17:37:58 +0000 (18:37 +0100)]
hamachi: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agovia-rhine: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 14:28:18 +0000 (15:28 +0100)]
via-rhine: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
12 years agoatl1c: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:22:31 +0000 (19:22 +0100)]
atl1c: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <chris.snook@gmail.com>
12 years agoforcedeth: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:17:24 +0000 (19:17 +0100)]
forcedeth: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agotehuti: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 18:32:50 +0000 (19:32 +0100)]
tehuti: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
12 years agosungem: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 22:24:34 +0000 (23:24 +0100)]
sungem: stop using net_device.{base_addr, irq}.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12 years agostmmac: fix build when CONFIG_OF is enable
Giuseppe Cavallaro [Fri, 6 Apr 2012 07:34:45 +0000 (03:34 -0400)]
stmmac: fix build when CONFIG_OF is enable

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogianfar: Include linux/net_tstamp.h
David S. Miller [Fri, 6 Apr 2012 04:35:34 +0000 (00:35 -0400)]
gianfar: Include linux/net_tstamp.h

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobfin: Fix build failure due to get_ts_info() changes.
David S. Miller [Fri, 6 Apr 2012 04:17:50 +0000 (00:17 -0400)]
bfin: Fix build failure due to get_ts_info() changes.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: replace continue with break to reduce unnecessary loop in xxx_xmarksources
RongQing.Li [Thu, 5 Apr 2012 09:36:29 +0000 (17:36 +0800)]
net: replace continue with break to reduce unnecessary loop in xxx_xmarksources

The conditional which decides to skip inactive filters does not
change with the change of loop index, so it is unnecessary to
check them many times.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: remove k{un}map_skb_frag()
Eric Dumazet [Thu, 5 Apr 2012 09:35:15 +0000 (11:35 +0200)]
net: remove k{un}map_skb_frag()

Since commit 3e4d3af501 (mm: stack based kmap_atomic()) we dont have
to disable BH anymore while mapping skb frags.

We can remove kmap_skb_frag() / kunmap_skb_frag() helpers and use
kmap_atomic() / kunmap_atomic()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: Set max rate-limit for a TC
Amir Vadai [Wed, 4 Apr 2012 21:33:31 +0000 (21:33 +0000)]
net/mlx4_en: Set max rate-limit for a TC

This patch is using the DCB netlink to set rate limit per ETS TC
Values are accepted in Kbps and rounded up to the nearest multiply of 100Mbps.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/dcb: Add an optional max rate attribute
Amir Vadai [Wed, 4 Apr 2012 21:33:30 +0000 (21:33 +0000)]
net/dcb: Add an optional max rate attribute

Although not specified in 8021Qaz spec, it could be useful to enable drivers
whose HW supports setting a rate limit for an ETS TC. This patch adds this
optional attribute to DCB netlink. To use it, drivers should implement and
register the callbacks ieee_setmaxrate and ieee_getmaxrate. The units are 64
bits long and specified in Kbps to enable usage over both slow and very fast
networks.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoIB/rdma_cm: TOS <=> UP mapping for IBoE
Amir Vadai [Wed, 4 Apr 2012 21:33:29 +0000 (21:33 +0000)]
IB/rdma_cm: TOS <=> UP mapping for IBoE

Both tagged traffic and untagged traffic use tc tool mapping.
Treat RDMA TOS same as IP TOS when mapping to SL

Signed-off-by: Amir Vadai <amirv@mellanox.com>
CC: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/route: export symbol ip_tos2prio
Amir Vadai [Wed, 4 Apr 2012 21:33:28 +0000 (21:33 +0000)]
net/route: export symbol ip_tos2prio

Need to export this to enable drivers use rt_tos2priority()

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: sk_prio <=> UP for untagged traffic
Amir Vadai [Wed, 4 Apr 2012 21:33:27 +0000 (21:33 +0000)]
net/mlx4_en: sk_prio <=> UP for untagged traffic

Since vlan egress map is only good for tagged traffic, need to have other
mapping to be used by untagged traffic.
For that, the driver uses sch_mqprio mapping. This mapping could be set by
using tc tool from iproute2 package.
Mapped UP will be used by the HW for QoS purposes, but won't go out on the
wire.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: DCB QoS support
Amir Vadai [Wed, 4 Apr 2012 21:33:26 +0000 (21:33 +0000)]
net/mlx4_en: DCB QoS support

Set TSA, promised BW and PFC using IEEE 802.1qaz netlink commands.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: set port QoS attributes
Amir Vadai [Wed, 4 Apr 2012 21:33:25 +0000 (21:33 +0000)]
net/mlx4_core: set port QoS attributes

Adding QoS firmware commands:
- mlx4_en_SET_PORT_PRIO2TC - set UP <=> TC
- mlx4_en_SET_PORT_SCHEDULER - set promised BW, max BW and PG number

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: Force user priority by QP attribute
Amir Vadai [Wed, 4 Apr 2012 21:33:24 +0000 (21:33 +0000)]
net/mlx4_en: Force user priority by QP attribute

Instead of relying on HW to change schedule queue by UP, schedule
queue is fixed for a tx_ring, and UP in WQE is ignored in this aspect.  This
resolves two issues with untagged traffic:
1. untagged traffic has no UP in packet which is needed for QoS. The change
   above allows setting the schedule queue (and by that the UP) of such a stream.
2. BlueFlame uses the same field used by vlan tag. So forcing UP from QPC
   allows using BF for untagged but prioritized traffic.

In old firmware that force UP is not supported, untagged traffic will not subject to
QoS.

Because UP is set by QP, need to always have a tx ring per UP, even if pfcrx
module paramter is false.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: sh_eth: add support R8A7740
Yoshihiro Shimoda [Wed, 4 Apr 2012 18:37:10 +0000 (18:37 +0000)]
net: sh_eth: add support R8A7740

The R8A7740 has a Gigabit Ethernet MAC. This patch supports it.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoEthernet driver for the WIZnet W5100 chip
Mike Sinkovsky [Wed, 4 Apr 2012 19:33:54 +0000 (19:33 +0000)]
Ethernet driver for the WIZnet W5100 chip

Based on original driver from chip manufacturer, but nearly full rewite.
Tested and used in production with Blackfin BF531 embedded processor.

Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoEthernet driver for the WIZnet W5300 chip
Mike Sinkovsky [Wed, 4 Apr 2012 19:33:53 +0000 (19:33 +0000)]
Ethernet driver for the WIZnet W5300 chip

Based on original driver from chip manufacturer, but nearly full rewite.
Tested and used in production with Blackfin BF531 embedded processor.

Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovxge: Convert macro to inline function
Joe Perches [Tue, 3 Apr 2012 12:14:31 +0000 (12:14 +0000)]
vxge: Convert macro to inline function

Convert the macro to inline function to check the arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add loadbalance mode
Jiri Pirko [Wed, 4 Apr 2012 12:16:27 +0000 (12:16 +0000)]
team: add loadbalance mode

This patch introduces new team mode. It's TX port is selected by
user-set BPF hash function.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add binary option type
Jiri Pirko [Wed, 4 Apr 2012 12:16:26 +0000 (12:16 +0000)]
team: add binary option type

For transfering generic binary data (e.g. BPF code), introduce new
binary option type.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: update the driver version March 2012
Giuseppe CAVALLARO [Wed, 4 Apr 2012 04:33:28 +0000 (04:33 +0000)]
stmmac: update the driver version March 2012

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: MDC clock dynamically based on the csr clock input
Giuseppe CAVALLARO [Wed, 4 Apr 2012 04:33:27 +0000 (04:33 +0000)]
stmmac: MDC clock dynamically based on the csr clock input

If a specific clk_csr value is passed from the platform
this means that the CSR Clock Range selection cannot be
changed at run-time and it is fixed (as reported in the driver
documentation). Viceversa the driver will try to set the MDC
clock dynamically according to the actual clock input.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Reviewed-by: David Laight <david.laight@aculab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: extend CSR Clock Range programming
Giuseppe CAVALLARO [Wed, 4 Apr 2012 04:33:26 +0000 (04:33 +0000)]
stmmac: extend CSR Clock Range programming

The CSR Clock Range has been reworked and new macros has
been added in the platform header to allow the CSR Clock
Range selection in the GMII Address Register.
The previous work didn't add the other fields
that can be used to achieve MDC clock of frequency
higher than the IEEE 802.3 specified frequency limit
of 2.5 MHz and program a clock divider of lower value.
On such platforms, these are used indeed so this patch
adds them.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: add clk management support
Giuseppe CAVALLARO [Wed, 4 Apr 2012 04:33:25 +0000 (04:33 +0000)]
stmmac: add clk management support

this patch adds the way to enable/disable the MAC
clock when call the open/close and resume/restore
functions.
This has been tested on ST platforms and SPEAr; thanks
to Francesco and Deepak.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Tested-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Replace infinite loops by timeouts in mdio r/w
Deepak SIKRI [Wed, 4 Apr 2012 04:33:24 +0000 (04:33 +0000)]
stmmac: Replace infinite loops by timeouts in mdio r/w

This patch removes the infinite waits from the mdio read and
write interfaces. These infinite waits have been replaced by
the timeout handling. In case if a time out occurs, an error is
returned.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: re-work the internal GMAC DMA platf parameters
Deepak SIKRI [Wed, 4 Apr 2012 04:33:23 +0000 (04:33 +0000)]
stmmac: re-work the internal GMAC DMA platf parameters

This patch re-works the internal GMAC DMA parameters
passed from the platform.
In the past, we only passed the pbl but, with new core,
other parameters can be passed and are mandatory on some
platforms.

New parameters are documented in stmmac.txt because this
patch has an impact for many platforms.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Define MDC clock selection macros
Deepak SIKRI [Wed, 4 Apr 2012 04:33:22 +0000 (04:33 +0000)]
stmmac: Define MDC clock selection macros

The patch adds the macros to be used for MDC clock selection. The MDC clock
frequency is based on scaled system clock, and has to be confined to a range
of 1-2.5 MHz. Based on the input CSR clock, the scaling factor has to be
selected.
The platform specific code will provide the default value of this scaling
factor, based on the input CSR clock.
There is an option to set MDC clock higher than the IEEE 802.3 specified
frequency limit of 2.5 MHz. This applies for the interfacing chips that
support higher MDC clocks. The resultant higher clock of 12.5 MHz requires
additional Macros to be defined for the clock divider corresponding to the
to the following selection.
-----------------------------------------
Selection MDC Clock
-----------------------------------------
1000  clk_csr_i/4
1001  clk_csr_i/6
1010  clk_csr_i/8
1011  clk_csr_i/10
1100  clk_csr_i/12
1101   clk_csr_i/14
1110  clk_csr_i/16
1111  clk_csr_i/18

This support has to be added both in the include file, as well as driver. The
driver need to program the registers based on the interfacing chips. This would
be more board specific information and needs to be passed through the platform
code to the driver. This work would be carried out in the future patch set
release.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: sanitize the rx coe and add the type-1 csum (v2)
Deepak SIKRI [Wed, 4 Apr 2012 04:33:21 +0000 (04:33 +0000)]
stmmac: sanitize the rx coe and add the type-1 csum (v2)

This patch sanities the RX coe and adds the Type-1 Rx checksum offload engine (COE).

So the RX COE can be passed through the platform but can be fixed
at run-time in case of the core has the HW capability register.

Also to support the Type-1 Rx COE the driver must append the
HW checksum at the end of payload in case the Rx checksum
engine was used to  offload the HW checksum.

This v2 version also fixes the IPC that has to be enabled and verified.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Define CSUM offload engine Types
Deepak SIKRI [Wed, 4 Apr 2012 04:33:20 +0000 (04:33 +0000)]
stmmac: Define CSUM offload engine Types

This patch explicitly defines the CSUM offload engine type which need
(not mandatory) to be passed from the platform code.
STMMAC core supports two check sum offload engine types- Type-1 & Type-2.
Also, there are STMMAC cores that do not have the check sum offload
capabilities.

The behaviour of Type-1 & Type-2 cores related to provision of checksum
increases the packet length for Type-1 cores by 2, as the checksum is appended
at the end of data packet and the same is made accountable in the DMA status.
The STMMAC cores beyond Version-3.5 provide HW interface registers which allows
the user to read the HW capabilities, while to support the previous cores the
information related to HW capabilities has to be provided from the platform
code.

The Type-1 cores which do not have the HW register interface need this
information.

This patch also updates the driver's doc.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Allow stmmac to work with other PHY buses(v3).
Srinivas Kandagatla [Wed, 4 Apr 2012 04:33:19 +0000 (04:33 +0000)]
stmmac: Allow stmmac to work with other PHY buses(v3).

As stmmac mdio bus name prefix is hardcoded in the driver, this allows
only phys on stmmac mdio buses to connect, however stmmac should allow
phys on other mdio buses too.

This patch adds new variable phy_bus_name to plat_stmmacenet_data
struct to let the BSP decide which phy bus to be used by stmmac driver.
A typical use-case is to have generic MDIO buses like mdio-gpio on top
of stmmac.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Update driver version to 3.0.23.0
Jing Huang [Wed, 4 Apr 2012 05:44:31 +0000 (05:44 +0000)]
bna: Update driver version to 3.0.23.0

Driver version update

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Function name changes and cleanups
Jing Huang [Wed, 4 Apr 2012 05:44:14 +0000 (05:44 +0000)]
bna: Function name changes and cleanups

Renamed following functions:
bnad_cleanup_tx to bnad_destroy_tx
bnad_free_all_txbufs to bnad_txq_cleanup
bnad_free_txbufs to bnad_txcmpl_process
bnad_tx to bnad_tx_complete
bnad_cleanup_rx to bnad_destroy_rx
bnad_reset_rcb to bnad_rcb_cleanup
bnad_free_all_rxbufs to bnad_rxq_cleanup
bnad_cq_cmpl_init to bnad_cq_cleanup
bnad_alloc_n_post_rxbufs to bnad_rxq_post
bnad_poll_cq to bnad_cq_process

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Remove tx tasklet
Jing Huang [Wed, 4 Apr 2012 05:43:48 +0000 (05:43 +0000)]
bna: Remove tx tasklet

The scheduling of tasklet and keeping the interrupts enabled makes interrupt
reduntant. 20% of the Tx interrupts have nothing left to process or could not
process as Tx tasklet was running.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: tx rx cleanup fix
Jing Huang [Wed, 4 Apr 2012 05:43:18 +0000 (05:43 +0000)]
bna: tx rx cleanup fix

This patch removes busy wait in tx/rx cleanup. bnad_cb_tx_cleanup() and
bnad_cb_rx_cleanup() functions are called from irq context, and currently
they do busy wait for the in-flight transmit or the currently executing napi
polling routine to complete. To fix the issue, we create a workqueue to defer
tx & rx cleanup processing, an in the tx rx cleanup handler, we will
wait respective in flight processing to complete, before freeing the buffers.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: ioc cleanups
Jing Huang [Wed, 4 Apr 2012 05:42:54 +0000 (05:42 +0000)]
bna: ioc cleanups

Remove irrelevant code. Change to start Hearbeat failure moniter after IOC
become operational.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Flash controller ioc pll init fixes
Jing Huang [Wed, 4 Apr 2012 05:42:31 +0000 (05:42 +0000)]
bna: Flash controller ioc pll init fixes

Added NFC pause/resume logic. We only do NFC pause/resume if NFC version
is greater than 0x143 and it was halted before, otherwise we revert to
old NFC halt mechanism.

Made changes to avoid clearing off the interrupts during the initial
pll initialization.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Serialize smem access during adapter initialization
Jing Huang [Wed, 4 Apr 2012 05:42:08 +0000 (05:42 +0000)]
bna: Serialize smem access during adapter initialization

Use init semaphore to serialize execution of the "unlock IOC semaphore"
code. Added bfa_ioc_fwver_clear() function to clear the firmware header if
last firmwar boot is not from driver.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: remove ixp2000 ethernet driver
Rob Herring [Tue, 3 Apr 2012 15:34:00 +0000 (15:34 +0000)]
net: remove ixp2000 ethernet driver

The platform is removed, so there are no users of this driver.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Cc: Don Skidmore <donald.c.skidmore@intel.com>
Cc: Greg Rose <gregory.v.rose@intel.com>
Cc: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: Alex Duyck <alexander.h.duyck@intel.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: lpc_eth: no need to reserve 8 extra bytes in rx skb
Eric Dumazet [Tue, 3 Apr 2012 12:02:11 +0000 (12:02 +0000)]
net: lpc_eth: no need to reserve 8 extra bytes in rx skb

Probably a leftover from ancient code...

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoDriver: Atm: Remove 'break' after 'return' statement.
Santosh Nayak [Tue, 3 Apr 2012 01:47:18 +0000 (01:47 +0000)]
Driver: Atm: Remove 'break' after 'return' statement.

'break' is unnecessary after 'return' statement.
Remove all such 'break' as clean up.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: add missing parenthesis to prevent u32 overflow
Dmitry Kravkov [Wed, 4 Apr 2012 02:27:42 +0000 (02:27 +0000)]
bnx2x: add missing parenthesis to prevent u32 overflow

Commit b475d78 lacked two pairs of parenthesis, causing an overflow in the
congestion management.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agousbnet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:41 +0000 (22:59 +0000)]
usbnet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoucc_geth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:40 +0000 (22:59 +0000)]
ucc_geth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:39 +0000 (22:59 +0000)]
tg3: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:38 +0000 (22:59 +0000)]
stmmac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsc9420: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:37 +0000 (22:59 +0000)]
smsc9420: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsc911x: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:36 +0000 (22:59 +0000)]
smsc911x: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor8169: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:35 +0000 (22:59 +0000)]
r8169: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:34 +0000 (22:59 +0000)]
r6040: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopxa168_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:33 +0000 (22:59 +0000)]
pxa168_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomv643xx_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:32 +0000 (22:59 +0000)]
mv643xx_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomacb: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:31 +0000 (22:59 +0000)]
macb: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoll_temac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:30 +0000 (22:59 +0000)]
ll_temac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofs_enet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:29 +0000 (22:59 +0000)]
fs_enet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofec: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:28 +0000 (22:59 +0000)]
fec: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agofec_mpc52xx: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:27 +0000 (22:59 +0000)]
fec_mpc52xx: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoetherh: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:26 +0000 (22:59 +0000)]
etherh: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodnet: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:25 +0000 (22:59 +0000)]
dnet: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodavinci_emac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:24 +0000 (22:59 +0000)]
davinci_emac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoax88796: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:23 +0000 (22:59 +0000)]
ax88796: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Add a common function for drivers with transmit time stamping.
Richard Cochran [Tue, 3 Apr 2012 22:59:22 +0000 (22:59 +0000)]
ethtool: Add a common function for drivers with transmit time stamping.

Currently, most drivers do not support transmit SO_TIMESTAMPING. For those
that do support it, there is one appropriate response to the get_ts_info
query. This patch adds a common function providing this response.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixp4xx_eth: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:21 +0000 (22:59 +0000)]
ixp4xx_eth: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobfin_mac: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:20 +0000 (22:59 +0000)]
bfin_mac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agogianfar: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:19 +0000 (22:59 +0000)]
gianfar: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodp83640: Support the get_ts_info ethtool method.
Richard Cochran [Tue, 3 Apr 2012 22:59:18 +0000 (22:59 +0000)]
dp83640: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool: Introduce a method for getting time stamping capabilities.
Richard Cochran [Tue, 3 Apr 2012 22:59:17 +0000 (22:59 +0000)]
ethtool: Introduce a method for getting time stamping capabilities.

This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING
capabilities of a network interface. In addition, user space programs
can use this ioctl to discover the PTP Hardware Clock (PHC) device
associated with the interface.

Since software receive time stamps are handled by the stack, the generic
ethtool code can answer the query correctly in case the MAC or PHY
drivers lack special time stamping features.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoptp: Add a method for obtaining the device index.
Richard Cochran [Tue, 3 Apr 2012 22:59:16 +0000 (22:59 +0000)]
ptp: Add a method for obtaining the device index.

This commit adds a method that MAC drivers may call in order to find out
the device number of their associated PTP Hardware Clock.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure
Shmulik Ladkani [Tue, 3 Apr 2012 23:13:00 +0000 (23:13 +0000)]
ipv6: Fix 'inet6_rtm_getroute' to release 'rt->dst' in case of 'alloc_skb' failure

In 72331bc [ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be
consistent with ipv4] the code of 'inet6_rtm_getroute()' was re-ordered
such that the reference to 'rt->dst' is incremented prior skb
allocation.

Hence, if 'alloc_skb()' fails, must drop a reference from 'rt->dst'.
Add the missing 'dst_release()' call.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: offer a PTP Hardware Clock instead of the timecompare method
Richard Cochran [Fri, 16 Mar 2012 10:55:37 +0000 (10:55 +0000)]
igb: offer a PTP Hardware Clock instead of the timecompare method

This commit removes the legacy timecompare code from the igb driver and
offers a tunable PHC instead.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: add PTP Hardware Clock code
Richard Cochran [Fri, 16 Mar 2012 10:55:32 +0000 (10:55 +0000)]
igb: add PTP Hardware Clock code

This patch adds a source file implementing a PHC. Only the basic
clock operations have been implemented, although the hardware
would offer some ancillary functions. The code is fairly self
contained and is not yet used in the main igb driver.

Every timestamp and clock read operation must consult the overflow
counter to form a correct time value. Access to the counter is
protected by a spin lock, and the counter is implemented using the
standard cyclecounter/timecounter code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: consolidate reporting of MSIX vectors into a single function
Emil Tantilov [Thu, 22 Mar 2012 03:00:29 +0000 (03:00 +0000)]
ixgbe: consolidate reporting of MSIX vectors into a single function

This patch modifies ixgbe_get_pcie_msix_count_generic() to support
all current HW and removes the 82598 specific function.

- change the type of ixgbe_get_pcie_msix_count_generic() to u16
- include a check to make sure the maximum allowed number of vectors
is not exceeded.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoe1000e: update driver version number
Bruce Allan [Tue, 20 Mar 2012 03:48:29 +0000 (03:48 +0000)]
e1000e: update driver version number

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>