Guenter Roeck [Sat, 7 Mar 2015 06:23:51 +0000 (22:23 -0800)]
net: dsa: mv88e6xxx: Add EEE support
EEE configuration is similar for the various MV88E6xxx chips.
Add generic support for it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 21:45:00 +0000 (13:45 -0800)]
net: bcmgenet: rework Rx queue init
In preparation for supporting multiple Rx queues:
1. Move the initialization of priv->num_rx_bds, priv->rx_bds, and
priv->rx_cbs from bcmgenet_init_rx_ring() to bcmgenet_init_dma()
since they are not specific to a single Rx queue. Mimics the Tx
init model where priv->num_tx_bds, priv->tx_bds, and priv->tx_cbs
are initialized in bcmgenet_init_dma().
2. Program DMA_MBUF_DONE_THRESH = 1 so that future Rx queues Q0-Q15
will get per-packet Rx interrupt.
3. Group DMA_START_ADDR, RDMA_READ_PTR, RDMA_WRITE_PTR, and DMA_END_ADDR
initialization together. Mimics the Tx init model.
4. There is 1-to-1 mapping between RxCBs and RxBDs.
Precalculate RxCB->bd_addr so that it can be used in the future.
Signed-off-by: Petri Gynther <pgynther@google.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 Mar 2015 03:31:56 +0000 (22:31 -0500)]
Merge branch 'macb-next'
Merge branch 'macb-next'
Boris Brezillon says:
====================
net/macb: merge at91_ether driver into macb driver
The rm9200 boards use the dedicated at91_ether driver instead of the
regular macb driver.
Both the macb and at91_ether drivers can be compiled as separated
modules.
Since the at91_ether driver uses code from the macb driver, at91_ether.ko
depends on macb.ko.
However the macb.ko module always fails to load on rm9200 boards: the
macb_probe() function expects a hclk clock which doesn't exist on rm9200.
Then the at91_ether.ko can't be loaded in turn due to unresolved
dependencies.
This series of patches fix this issue by merging at91_ether into macb.
Patch 1 is fixing a problem that might happen when enabling ARM
multi-platform suppot.
Changes since v3:
- move "net: macb: remove #if defined(CONFIG_ARCH_AT91) sections" patch
into this series to avoid dependency on other patch series.
Changes since v2:
- rebase after changed brought by commit "net: macb: remove #if
defined(CONFIG_ARCH_AT91) sections"
Changes since v1:
- rework probe functions to share common probing logic
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Cyrille Pitchen [Sat, 7 Mar 2015 06:23:32 +0000 (07:23 +0100)]
net/macb: merge at91_ether driver into macb driver
macb and at91_ether drivers can be compiled as modules, but the at91_ether
driver use some functions and variables defined in the macb one, thus
creating a dependency on the macb driver.
Since these drivers are sharing the same logic we can easily merge
at91_ether into macb.
In order to factorize common probing logic we've added an ->init() function
to struct macb_config (the structure associated with the compatible
string), and moved macb specific init code from macb_probe to macb_init.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cyrille Pitchen [Sat, 7 Mar 2015 06:23:31 +0000 (07:23 +0100)]
net/macb: unify clock management
Most of the functions from the Common Clk Framework handle NULL pointer as
input argument.
Since the TX clock is optional, we now set tx_clk to NULL value
instead of ERR_PTR(-ENOENT) when this clock is not available. This simplifies
the clock management and avoid the need to test tx_clk value.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
With multi platform support those sections could lead to unexpected
behavior if both ARCH_AT91 and another ARM SoC using the MACB IP are
selected.
Add two new capabilities to encode the default MII mode and the presence
of a CLKEN bit in USRIO register.
Then define the appropriate config for IPs embedded in at91 SoCs.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Boris BREZILLON [Sat, 7 Mar 2015 06:23:29 +0000 (07:23 +0100)]
ARM: at91/dt: fix macb compatible strings
Some at91 SoCs embed a 10/100 Mbit Ethernet IP, that is based on the
at91sam9260 SoC.
Fix at91 DTs accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 23:54:51 +0000 (15:54 -0800)]
rocker: quiet sparce endianess warnings
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Jonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Thu, 5 Mar 2015 22:27:51 +0000 (23:27 +0100)]
ebpf: bpf_map_*: fix linker error on avr32 and openrisc arch
Fengguang reported, that on openrisc and avr32 architectures, we
get the following linker errors on *_defconfig builds that have
no bpf syscall support:
net/built-in.o:(.rodata+0x1cd0): undefined reference to `bpf_map_lookup_elem_proto'
net/built-in.o:(.rodata+0x1cd4): undefined reference to `bpf_map_update_elem_proto'
net/built-in.o:(.rodata+0x1cd8): undefined reference to `bpf_map_delete_elem_proto'
Fix it up by providing built-in weak definitions of the symbols,
so they can be overridden when the syscall is enabled. I think
the issue might be that gcc is not able to optimize all that away.
This patch fixes the linker errors for me, tested with Fengguang's
make.cross [1] script.
Eric Dumazet [Thu, 5 Mar 2015 21:47:48 +0000 (13:47 -0800)]
net: gro: remove obsolete code from skb_gro_receive()
Some drivers use copybreak to copy tiny frames into smaller skb,
and this smaller skb might not have skb->head_frag set for various
reasons.
skb_gro_receive() currently doesn't allow to aggregate the smaller skb
into the previous GRO packet if this GRO packet has at least 2 MSS in
it.
Following workload easily demonstrates the problem.
netperf -t TCP_RR -H target -- -r 3000,3000
(tcpdump shows one GRO packet with 2 MSS, plus one additional packet of
104 bytes that should have been appended.)
It turns out that we can remove code from skb_gro_receive(), because
commit 8a29111c7ca6 ("net: gro: allow to build full sized skb") and its
followups removed the assumption that a GRO packet with a frag_list had
to have an empty head.
Removing this code allows the aggregation of the last (incomplete) frame
in some RPC workloads. Note that tcp_gro_receive() already takes care of
forcing a flush if necessary, including this case.
If we want to avoid using frag_list in the first place (in forwarding
workloads for example, as the outgoing NIC is generally not able to cope
with skbs having a frag_list), we need to address this separately.
Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 Mar 2015 02:50:07 +0000 (21:50 -0500)]
Merge branch 'mlx4-qcn'
Or Gerlitz says:
====================
Add QCN support to the DCB NL layer
This series from Shani Michaeli adds support for the IEEE QCN attribute
to the kernel DCB NL stack, and implementation in the mlx4 driver which
programs the firmware according to the admin directives.
changes from V0:
- applied feedback from John and added his acked-by to patch #1
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:13 +0000 (20:16 +0200)]
net/mlx4_en: Add QCN parameters and statistics handling
Implement the IEEE DCB handlers for set/get QCN parameters and
statistics reading per TC.
Signed-off-by: Shani Michaeli <shanim@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:12 +0000 (20:16 +0200)]
net/mlx4_core: Add basic elements for QCN
Add device capability, firmware command opcode and etc prior elements
needed for QCN suppprt. Disable SRIOV VF view/access for QCN is disabled.
While here, remove a redundant offset definition into the
QUERY_DEV_CAP mailbox.
Signed-off-by: Shani Michaeli <shanim@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:11 +0000 (20:16 +0200)]
net/dcb: Add IEEE QCN attribute
As specified in 802.1Qau spec. Add this optional attribute to the
DCB netlink layer. To allow for application to use the new attribute,
NIC drivers should implement and register the callbacks ieee_getqcn,
ieee_setqcn and ieee_getqcnstats.
The QCN attribute holds a set of parameters for management, and
a set of statistics to provide informative data on Congestion-Control
defined by this spec.
Signed-off-by: Shani Michaeli <shanim@mellanox.com> Signed-off-by: Shachar Raindel <raindel@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:49:35 +0000 (15:49 -0500)]
Merge branch 'fib_trie-next'
Alexander Duyck says:
====================
The rest of the FIB patches (add key_vector to fib_table)
This patch series is the rest of what I had originally planned for this kernel
release. It adds a structure called key_vector which is embedded within
every tnode, leaf, and the trie root itself. By doing this we can navigate
from any point within the trie to any other point fairly quickly and
avoiding NULL pointer checks in the case of a backtrace. As a result we
can pipeline things a bit further since we don't have to worry about
dereferencing NULL in a backtrace. This can amount to significant savings
on a long backtrace.
I decided to drop the up-level code as that conflicts with combining the
main and local tries. I have one patch as an RFC that currently combines
the tries however it still needs some work as we have to split the local
and main tries in the event of custom rules being defined. As such we are
probably going to be doing some more hacking on fib_table_flush_external as
that will also need to flush the local entries from the main trie and place
them back in the local trie.
v2: Rebased on the switchdev FIB offload work
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:52 +0000 (09:54 -0800)]
fib_trie: Add key vector to root, return parent key_vector in resize
This change makes it so that the root of the trie contains a key_vector, by
doing this we make room to essentially collapse the entire trie by at least
one cache line as we can store the information about the tnode or leaf that
is pointed to in the root.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:33 +0000 (09:54 -0800)]
fib_trie: Move rcu from key_vector to tnode, add accessors.
RCU is only needed once for the entire node, not once per key_vector so we
can pull that out and move it to the tnode structure.
In addition add accessors to be used inside the RCU functions so that we
can more easily get from the key vector to either the tnode or the trie
pointers.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:27 +0000 (09:54 -0800)]
fib_trie: Add tnode struct as a container for fields not needed in key_vector
This change pulls the fields not explicitly needed in the key_vector and
placed them in the new tnode structure. By doing this we will eventually
be able to reduce the key_vector down to 16 bytes on 64 bit systems, and
12 bytes on 32 bit systems.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:21 +0000 (09:54 -0800)]
fib_trie: Rename tnode_child_length to child_length
We are now checking the length of a key_vector instead of a tnode so it
makes sense to probably just rename this to child_length since it would
probably even be applicable to a leaf.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:08 +0000 (09:54 -0800)]
fib_trie: Rename tnode to key_vector
Rename the tnode to key_vector. The key_vector will be the eventual
container for all of the information needed by either a leaf or a tnode.
The final result should be much smaller than the 40 bytes currently needed
for either one.
This also updates the trie struct so that it contains an array of size 1 of
tnode pointers. This is to bring the structure more inline with how an
actual tnode itself is configured.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:53:56 +0000 (09:53 -0800)]
fib_trie: Minor cleanups to fib_table_flush_external
This change just does a couple of minor cleanups on
fib_table_flush_external. Specifically it addresses the fact that resize
was being called even though nothing was being removed from the table, and
it drops an unecessary indent since we could just call continue on the
inverse of the fi && flag check.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: macb: Fix multi queue support for xilinx ZynqMP
ZynqMP soc has single interrupt for all the queue events. So,
passing the IRQF_SHARED flag for interrupt registration call.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: macb: Include multi queue support for xilinx ZynqMP ethernet version
Include multi queue support for the ethernet IP version in xilinx ZynqMP
SoC.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
fib: make netdev_switch_fib_ipv4_abort in header file static inline
When building without CONFIG_NET_SWITCHDEV,
netdev_switch_fib_ipv4_abort is defined in the header file. It must
be static inline to avoid build failure at link time.
Fixes: 8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload") Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Shearman [Fri, 6 Mar 2015 10:47:00 +0000 (10:47 +0000)]
mpls: Properly validate RTA_VIA payload length
If the nla length is less than 2 then the nla data could be accessed
beyond the accessible bounds. So ensure that the nla is big enough to
at least read the via_family before doing so. Replace magic value of
2.
Fixes: 03c0566542f4 ("mpls: Basic support for adding and removing routes") Cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Robert Shearman <rshearma@brocade.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:13:47 +0000 (15:13 -0500)]
Merge branch 'bcmgenet-next'
Petri Gynther says:
====================
net: bcmgenet: preparation for multiple Rx queues
Three small patches in preparation for supporting multiple Rx queues:
1. set hw_params->rx_queues = 0
2. adjust the call to alloc_etherdev_mqs()
3. add GENET_Q16_RX_BD_CNT and hw_params->rx_bds_per_q
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 01:40:10 +0000 (17:40 -0800)]
net: bcmgenet: set hw_params->rx_queues = 0
bcmgenet driver doesn't yet support multiple Rx queues.
Set hw_params->rx_queues = 0 accordingly.
The default Rx queue (Q16) is still created and operational.
Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:01:07 +0000 (15:01 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2015-03-06
This series contains updates to e1000, e1000e and igb.
Yanir provides updates to e1000e based on the patches provided by John
Linville. First updates the code comment to better describe the changes
and the impact on the driver. Second removed calls to ioremap/unmap for
i219 since this is only relevant to older hardware only. Starting with
i219, the NVM will not be mapped to its one BAR but to a address region
in another bar.
Alex Duyck provides two fixes for igb, first fixes a compile warning
where a variable may be used uninitialized, so Alex initializes it.
Second fixes an issue where all of the pin register values were having
to be pushed onto the stack each time the function was called, so to
avoid this, Alex made them static const so that they should only need
to be allocated once and we can avoid all the instructions to get them
onto the stack.
Eliezer found an issue in e1000 where we needed to be calling
netif_carrier_off earlier in the down() to prevent the stack from
queuing more packets to the interface.
Sabrina Dubroca resolved a potential race condition by adding a
dummy allocator. There was a race condition between e1000_change_mtu()
cleanups and netpoll, when changing the MTU across jumbo sizes.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 19:57:46 +0000 (14:57 -0500)]
Merge branch 'pmtu-probe'
Fan Du says:
====================
Improvements for TCP PMTU
This patchset performs some improvements and enhancement
for current TCP PMTU as per RFC4821 with the aim to find
optimal mms size quickly, and also be adaptive to route
changes like enlarged path MTU. Then TCP PMTU could be
used to probe a effective pmtu in absence of ICMP message
for tunnels(e.g. vxlan) across different networking stack.
Patch1/4: Set probe mss base to 1024 Bytes per RFC4821
Patch2/4: Do not double probe_size for each probing,
use a simple binary search to gain maximum performance.
mss for next probing.
Patch3/4: Create a probe timer to detect enlarged path MTU.
Patch4/4: Update ip-sysctl.txt for new sysctl knobs.
Changelog:
v5:
- Zero probe_size before resetting search range.
- Update ip-sysctl.txt for new sysctl knobs.
v4:
- Convert probe_size to mss, not directly from search_low/high
- Clamp probe_threshold
- Don't adjust search_high in blackhole probe, so drop orignal patch3
v3:
- Update commit message for patch2
- Fix pseudo timer delta calculation in patch4
v2:
- Introduce sysctl_tcp_probe_threshold to control when
probing will stop, as suggested by John Heffner.
- Add patch3 to shrink current mss value for search low boundary.
- Drop cannonical timer usages, implements pseudo timer based on
32bits jiffies tcp_time_stamp, as suggested by Eric Dumazet.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:25 +0000 (11:18 +0800)]
ipv4: Documenting two sysctls for tcp PMTU probe
Namely tcp_probe_interval to control how often to restart
a probe. And tcp_probe_threshold to control when stop the
probing in respect to the width of search range in bytes
Signed-off-by: Fan Du <fan.du@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:24 +0000 (11:18 +0800)]
ipv4: Create probe timer for tcp PMTU as per RFC4821
As per RFC4821 7.3. Selecting Probe Size, a probe timer should
be armed once probing has converged. Once this timer expired,
probing again to take advantage of any path PMTU change. The
recommended probing interval is 10 minutes per RFC1981. Probing
interval could be sysctled by sysctl_tcp_probe_interval.
Eric Dumazet suggested to implement pseudo timer based on 32bits
jiffies tcp_time_stamp instead of using classic timer for such
rare event.
Signed-off-by: Fan Du <fan.du@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:23 +0000 (11:18 +0800)]
ipv4: Use binary search to choose tcp PMTU probe_size
Current probe_size is chosen by doubling mss_cache,
the probing process will end shortly with a sub-optimal
mss size, and the link mtu will not be taken full
advantage of, in return, this will make user to tweak
tcp_base_mss with care.
Use binary search to choose probe_size in a fine
granularity manner, an optimal mss will be found
to boost performance as its maxmium.
In addition, introduce a sysctl_tcp_probe_threshold
to control when probing will stop in respect to
the width of search range.
Test env:
Docker instance with vxlan encapuslation(82599EB)
iperf -c 10.0.0.24 -t 60
before this patch:
1.26 Gbits/sec
After this patch: increase 26%
1.59 Gbits/sec
Signed-off-by: Fan Du <fan.du@intel.com> Acked-by: John Heffner <johnwheffner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:22 +0000 (11:18 +0800)]
ipv4: Raise tcp PMTU probe mss base size
Quotes from RFC4821 7.2. Selecting Initial Values
It is RECOMMENDED that search_low be initially set to an MTU size
that is likely to work over a very wide range of environments. Given
today's technologies, a value of 1024 bytes is probably safe enough.
The initial value for search_low SHOULD be configurable.
Moreover, set a small value will introduce extra time for the search
to converge. So set the initial probe base mss size to 1024 Bytes.
Signed-off-by: Fan Du <fan.du@intel.com> Acked-by: John Heffner <johnwheffner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
DECnet: Only use neigh_ops for adding the link layer header
Other users users of the neighbour table use neigh->output as the method
to decided when and which link-layer header to place on a packet.
DECnet has been using neigh->output to decide which DECnet headers to
place on a packet depending which neighbour the packet is destined for.
The DECnet usage isn't totally wrong but it can run into problems if the
neighbour output function is run for a second time as the teql driver
and the bridge netfilter code can do.
Therefore to avoid pathologic problems later down the line and make the
neighbour code easier to understand by refactoring the decnet output
code to only use a neighbour method to add a link layer header to a
packet.
This is done by moving the neigbhour operations lookup from
dn_to_neigh_output to dn_neigh_output_packet.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mahesh Bandewar [Thu, 5 Mar 2015 05:57:52 +0000 (21:57 -0800)]
bonding: implement bond_poll_controller()
This patches implements the poll_controller support for all
bonding driver. If the slaves have poll_controller net_op defined,
this implementation calls them. This is mode agnostic implementation
and iterates through all slaves (based on mode) and calls respective
handler.
Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sabrina Dubroca [Thu, 26 Feb 2015 05:35:41 +0000 (05:35 +0000)]
e1000: add dummy allocator to fix race condition between mtu change and netpoll
There is a race condition between e1000_change_mtu's cleanups and
netpoll, when we change the MTU across jumbo size:
Changing MTU frees all the rx buffers:
e1000_change_mtu -> e1000_down -> e1000_clean_all_rx_rings ->
e1000_clean_rx_ring
Then, close to the end of e1000_change_mtu:
pr_info -> ... -> netpoll_poll_dev -> e1000_clean ->
e1000_clean_rx_irq -> e1000_alloc_rx_buffers -> e1000_alloc_frag
And when we come back to do the rest of the MTU change:
e1000_up -> e1000_configure -> e1000_configure_rx ->
e1000_alloc_jumbo_rx_buffers
alloc_jumbo finds the buffers already != NULL, since data (shared with
page in e1000_rx_buffer->rxbuf) has been re-alloc'd, but it's garbage,
or at least not what is expected when in jumbo state.
This results in an unusable adapter (packets don't get through), and a
NULL pointer dereference on the next call to e1000_clean_rx_ring
(other mtu change, link down, shutdown):
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<ffffffff81194d6e>] put_compound_page+0x7e/0x330
Eliezer Tamir [Wed, 25 Feb 2015 15:52:49 +0000 (15:52 +0000)]
e1000: call netif_carrier_off early on down
When bringing down an interface netif_carrier_off() should be
one the first things we do, since this will prevent the stack
from queuing more packets to this interface.
This operation is very fast, and should make the device behave
much nicer when trying to bring down an interface under load.
Also, this would Do The Right Thing (TM) if this device has some
sort of fail-over teaming and redirect traffic to the other IF.
Move netif_carrier_off as early as possible.
Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 6 Mar 2015 03:34:14 +0000 (03:34 +0000)]
igb: Make arrays on stack static const to avoid reallocation
While addressing the pin problem I noticed that all of the pin register
values where having to be pushed onto the stack each time the function was
called. To avoid that I am making them static const so that they should
only need to be allocated once and we can avoid all the instructions to get
them onto the stack..
size before:
text data bss dec hex filename
161477 10512 8 171997 29fdd drivers/net/ethernet/intel/igb/igb.ko
size after:
text data bss dec hex filename
161205 10512 8 171725 29ecd drivers/net/ethernet/intel/igb/igb.ko
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alexander Duyck [Fri, 6 Mar 2015 03:34:09 +0000 (03:34 +0000)]
igb: Fix warning pin may be used uninitialized
When building the kernel using the gcc 4.8.3 compiler included in Fedora 20
I was repeatedly seeing the warning:
drivers/net/ethernet/intel/igb/igb_ptp.c: In function ‘igb_ptp_feature_enable_i210’:
drivers/net/ethernet/intel/igb/igb_ptp.c:395:21: warning: ‘pin’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
tssdp &= ~ts_sdp_en[pin];
^
drivers/net/ethernet/intel/igb/igb_ptp.c:471:6: note: ‘pin’ was declared here
int pin;
^
To resolve it I am assigning the pin a value of -1 when it is instantiated.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Yanir Lubetkin [Sat, 28 Feb 2015 10:10:06 +0000 (10:10 +0000)]
e1000e: remove calls to ioremap/unmap for NVM addr
Starting I219, the NVM will not be mapped to its own BAR, but to an
address region in another bar. The mapping/unmapping is relevant
to older HW only.
CC: John W Linville <linville@tuxdriver.com> Reported-by: John W Linville <linville@tuxdriver.com> Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Yanir Lubetkin [Sat, 28 Feb 2015 10:09:34 +0000 (10:09 +0000)]
e1000e: fix obscure comments
The interface to the device flash was modified in i219 and later HW.
This patch better describes the change and the impact on the driver.
CC: John W Linville <linville@tuxdriver.com> Reported-by: John W Linville <linville@tuxdriver.com> Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
- Add NETIF_F_NETNS_LOCAL to rocker port feature list to keep rocker
ports in the default netns. Rocker hardware can't be partitioned
to support multiple namespaces, currently. It would be interesting
to add netns support to rocker device by basically adding another
match field to each table to match on some unique netns ID, with
a port knowing it's netns ID. Future work TDB.
- Up-level the RTNH_F_EXTERNAL marking of routes installed to offload
device from driver to switchdev common code. Now driver can't skip
routes. Either it can install the route or it cannot. Yes or No.
If no on any route, all offloading is aborted by removing routes
from offload device and setting ipv4.fib_offload_disabled so no more
routes can be offloaded. This is harsh, but it's our starting point.
We can refine the policies in follow-up work.
- Add new net.ipv4.fib_offload_disabled bool that is set if anything
goes wrong with route offloading. We can refine this later to make
the setting per-device or per-device-port-netdev, but let's start
here simple and refine in follow-up work.
- Rebase against Alex's latest FIB changes. I think I did everything
correctly, and didn't run into any issues with testing, but I'd like
Alex to look over the changes and maybe follow-up with any cleanups.
v3:
Changes based on v2 review comments:
- Move check for custom rules up earlier in patch set, to keep git bisect
safe.
- Simplify the route add/modify failure handling to simple try until
failure, and then on failure, undo everything. The switchdev driver
will return err when route can normally be installed to device, but
the install fails for one reason or another (no space left on device,
etc). If a failure happens, uninstall all routes from the device,
punting forwarding for all routes back to the kernel.
- Scan route's full nexthop list, ensuring all nexthop devs belong
to the same switchdev device, otherwise don't try to install route
to device.
v2:
Changes based on v1 review comments and discussions at netconf:
- Allow route modification, but use same ndo op used for adding route.
Driver/device is expected to modify route in-place, if it can, to avoid
interruption of service.
- Add new RTNH_F_EXTERNAL flag to mark FIB entries offloaded externally.
- Don't offload routes if using custom IP rules. If routes are already
offloaded, and custom IP rules are turned on, flush routes from offload
device. (Offloaded routes are marked with RTNH_F_EXTERNAL).
- Use kernel's neigh resolution code to resolve route's nexthops' neigh
MAC addrs. (Thanks davem, works great!).
- Use fib->fib_priority in rocker driver to give priorities to routes in
OF-DPA unicast route table.
v1:
This patch set adds L3 routing offload support for IPv4 routes. The idea is to
mirror routes installed in the kernel's FIB down to a hardware switch device to
offload the data forwarding path for L3. Only the data forwarding path is
intercepted. Control and management of the kernel's FIB remains with the
kernel.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 05:21:20 +0000 (21:21 -0800)]
rocker: implement IPv4 fib offloading
The driver implements ndo_switch_fib_ipv4_add/del ops to add/del/mod IPv4
routes to/from switchdev device. Once a route is added to the device, and the
route's nexthops are resolved to neighbor MAC address, the device will forward
matching pkts rather than the kernel. This offloads the L3 forwarding path
from the kernel to the device. Note that control and management planes are
still mananged by Linux; only the data plane is offloaded. Standard routing
control protocols such as OSPF and BGP run on Linux and manage the kernel's FIB
via standard rtm netlink msgs...nothing changes here.
A new hash table is added to rocker to track neighbors. The driver listens for
neighbor updates events using netevent notifier NETEVENT_NEIGH_UPDATE. Any ARP
table updates for ports on this device are recorded in this table. Routes
installed to the device with nexthops that reference neighbors in this table
are "qualified". In the case of a route with nexthops not resolved in the
table, the kernel is asked to resolve the nexthop.
The driver uses fib_info->fib_priority for the priority field in rocker's
unicast routing table.
The device can only forward to pkts matching route dst to resolved nexthops.
Currently, the device only supports single-path routes (i.e. routes with one
nexthop). Equal Cost Multipath (ECMP) route support will be added in followup
patches.
This patch is driver support for unicast IPv4 routing only. Followup patches
will add driver and infrastructure for IPv6 routing and multicast routing.
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 05:21:19 +0000 (21:21 -0800)]
fib: hook IPv4 fib for hardware offload
Call into the switchdev driver any time an IPv4 fib entry is
added/modified/deleted from the kernel's FIB. The switchdev driver may or
may not install the route to the offload device. In the case where the
driver tries to install the route and something goes wrong (device's routing
table is full, etc), then all of the offloaded routes will be flushed from the
device, route forwarding falls back to the kernel, and no more routes are
offloading.
We can refine this logic later. For now, use the simplist model of offloading
routes up to the point of failure, and then on failure, undo everything and
mark IPv4 offloading disabled.
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 05:21:18 +0000 (21:21 -0800)]
ipv4: add net bool fib_offload_disabled
If something goes wrong with IPv4 FIB offload, mark entire net offload
disabled. This is brute force policy to basically shut down IPv4 FIB offload
permanently if there is a problem offloading any route to an external device.
We can refine the policy in the future, to handle failures on a per-device or
per-route basis, but for now, this policy is per-net.
What we're trying to avoid is an inconsistent split between the kernel's FIB
and the offload device's FIB. We don't want the device to fwd a pkt
inconsitent with what the kernel would do. An example of a split is if device
has 10.0.0.0/16 and kernel has 10.0.0.0/16 and 10.0.0.0/24, the device wouldn't
see the longest prefix 10.0.0.0/24 and potentially forward pkts incorrectly.
Limited capacity or limited capability are two ways a route may fail to install
to the offload device. We'll not differentiate between failures at this time,
and treat any failure as fatal and mark the net as fib_offload_disabled.
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 05:21:17 +0000 (21:21 -0800)]
switchdev: implement IPv4 fib ndo wrappers
Flesh out ndo wrappers to call into device driver. To call into device driver,
the wrapper must interate over route's nexthops to ensure all nexthop devs
belong to the same switch device. Currently, there is no support for route's
nexthops spanning offloaded and non-offloaded devices, or spanning ports of
multiple offload devices.
Since switch device ports may be stacked under virtual interfaces (bonds and/or
bridges), and the route's nexthop may be on the virtual interface, the wrapper
will traverse the nexthop dev down to the base dev. It's the base dev that's
passed to the switchdev driver's ndo ops.
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 05:21:14 +0000 (21:21 -0800)]
netdevice: add IPv4 fib add/del ops
Add two new ndo ops for IPv4 fib offload support, add and del. Add uses
modifiy semantics if fib entry already offloaded. Drivers implementing the new
ndo ops will return err<0 if programming device fails, for example if device's
tables are full.
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
These are mostly code re-organization and function bodies re-arrangement to
allow different callers of lower-level initialization functions for 'struct
dsa_switch' and 'struct dsa_switch_tree' to be later introduced.
There is no functional code change at this point.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net: dsa: extract dsa switch tree setup and removal
Extract the core logic that setups a 'struct dsa_switch_tree' and
removes it, update dsa_probe() and dsa_remove() to use the two helper
functions. This will be useful to allow for other callers to setup
this structure differently.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: dsa: let switches specify their tagging protocol
In order to support the new DSA device driver model, a dsa_switch should
be able to advertise the type of tagging protocol supported by the
underlying switch device. This also removes constraints on how tagging
can be stacked to each other.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: dsa: split dsa_switch_setup into two functions
Split the part of dsa_switch_setup() which is responsible for allocating
and initializing a 'struct dsa_switch' and the part which is doing a
given switch device setup and slave network device creation.
This is a preliminary change to allow a separate caller of
dsa_switch_setup_one() which may have externally initialized the
dsa_switch structure, outside of dsa_switch_setup().
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
In preparation for allowing a different model to register DSA switches,
update dsa_of_probe() and dsa_probe() to return -EPROBE_DEFER where
appropriate.
Failure to find a phandle or Device Tree property is still fatal, but
looking up the internal device structure associated with a Device Tree
node is something that might need to be delayed based on driver probe
ordering.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: dsa: update dsa_of_{probe, remove} to use a device pointer
In preparation for allowing a different mechanism to register DSA switch
devices and driver, update dsa_of_probe and dsa_of_remove to take a
struct device pointer since neither of these two functions uses the
struct platform_device pointer.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Kirsher [Fri, 6 Mar 2015 03:02:35 +0000 (19:02 -0800)]
i40e: Fix mismatching type for ioremap_len
As pointed out by Ben Hutchings, ioremap uses unsigned long as
its parameter type, so we should be using that instead of u32
or int.
Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Thu, 5 Mar 2015 09:23:49 +0000 (10:23 +0100)]
tipc: add ip/udp media type
The ip/udp bearer can be configured in a point-to-point
mode by specifying both local and remote ip/hostname,
or it can be enabled in multicast mode, where links are
established to all tipc nodes that have joined the same
multicast group. The multicast IP address is generated
based on the TIPC network ID, but can be overridden by
using another multicast address as remote ip.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Thu, 5 Mar 2015 09:23:48 +0000 (10:23 +0100)]
tipc: increase size of tipc discovery messages
The payload area following the TIPC discovery message header is an
opaque area defined by the media. INT_H_SIZE was enough for
Ethernet/IB/IPv4 but needs to be expanded to carry IPv6 addressing
information.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Thu, 5 Mar 2015 04:11:44 +0000 (20:11 -0800)]
net_sched: move tp->root allocation into fw_init()
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Thu, 5 Mar 2015 04:11:43 +0000 (20:11 -0800)]
net_sched: move tp->root allocation into route4_init()
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 02:07:15 +0000 (21:07 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
This series contains updates to i40e only.
Greg provides fixes for the NPAR transmit scheduler where the driver
initialization caused the BW configurations to not take effect, so use
a BW configuration read and write back to "kick" the transmit scheduler
into action. Fixes the ethtool offline test, where we were not actually
taking the device offline before doing the testing.
Matt modifies the get and set LED functions so they ignore activity LEDs
since we are required to blink the link LEDs only.
Neerav provides a workaround for whenever a DCBX configuration is changed,
where the firmware doe not set the operational status bit of the
application TLV status as returned from the "Get CEE DCBX Oper Cfg" admin
queue command. So remove the check for the operational and sync bits of
the application TLV status until a firmware fix is provided.
Shannon changes the driver to grab the NVM devstarter version and not
the image version, since it is the more useful version and is what
should be displayed. Moves the IRQ tracking setup and tear down into
the same routines that do the IRQ setup and tear down. This keeps
like activities together and allows us to track exactly the number
of vectors reserved from the OS, which may be fewer than are available
from the hardware.
Jesse provides a fix to use a more portable sign extension by replacing
0xffff.... with ~(u64)0 or ~(u32)0. Also fixes XPS mask when resetting,
where the driver would accidentally clear the XPS mask for all queues
back to 0. This caused higher CPU utilization and had some other
performance impacts for transmit tests. Cleans up some whitespace
formatting.
Catherine provides a fix where some firmware versions are incorrectly
reporting a breakout cable as PHY type 0x3 when it should be 0x16
(I40E_PHY_TYPE_10GBASE_SFPP_CU). Adds the 10G and 40G AOC PHY types
to the case statement in get_media_type and ethtool get_settings so
that the correct information gets reported back to the user.
Anjali provides IOREMAP changes for future device support, where we
do not want to map the whole CSR space since some of it is mapped by
other drivers with different mapping methods.
Mitch changes the i40e driver to not "spam" the system log with
messages about VF VSI when VFs are created and when they are reset to
reduce user annoyance.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c: In function 'resize_platform_label_table':
net/mpls/af_mpls.c:767:4: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
labels = vzalloc(size);
^
Fixes: 7720c01f3f59 ("mpls: Add a sysctl to control the size of the mpls label table") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 5 Mar 2015 20:11:57 +0000 (15:11 -0500)]
Merge branch 'cxgb4-next'
Hariprasad Shenai says:
====================
cxgb4: RX Queue related cleanup and fixes
This patch series adds a common function to allocate RX queues and queue
allocation changes to RDMA CIQ
The patches series is created against 'net-next' tree.
And includes patches on cxgb4 driver.
We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
To allow for better scalability on systems with large core counts, we
will try and allocate enough RDMA Concentrator IQs and MSI/X vectors as
we have cores. If we cannot get enough MSI/X vectors, fall back to the
minimum required: 1 per adapter rx channel.
Also clean up cxgb_enable_msix() to make it readable and correct a bug
where the vectors are not correctly assigned if the driver doesn't get
the full amount requested.
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jouni Malinen [Wed, 4 Mar 2015 10:54:21 +0000 (12:54 +0200)]
bridge: Extend Proxy ARP design to allow optional rules for Wi-Fi
This extends the design in commit 958501163ddd ("bridge: Add support for
IEEE 802.11 Proxy ARP") with optional set of rules that are needed to
meet the IEEE 802.11 and Hotspot 2.0 requirements for ProxyARP. The
previously added BR_PROXYARP behavior is left as-is and a new
BR_PROXYARP_WIFI alternative is added so that this behavior can be
configured from user space when required.
In addition, this enables proxyarp functionality for unicast ARP
requests for both BR_PROXYARP and BR_PROXYARP_WIFI since it is possible
to use unicast as well as broadcast for these frames.
The key differences in functionality:
BR_PROXYARP:
- uses the flag on the bridge port on which the request frame was
received to determine whether to reply
- block bridge port flooding completely on ports that enable proxy ARP
BR_PROXYARP_WIFI:
- uses the flag on the bridge port to which the target device of the
request belongs
- block bridge port flooding selectively based on whether the proxyarp
functionality replied
Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Change-ID: Ie13375941606b0a027e5b5dbc235f5f5f03b75c8 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Mitch A Williams [Thu, 26 Feb 2015 16:16:19 +0000 (16:16 +0000)]
i40e: don't spam the system log
The PF driver spams the system log with messages about VF VSI when VFs
are created, as well as each time they are reset. This is annoying, and
the information isn't even useful most of the time.
Remove this message to reduce user annoyance.
Change-ID: I8de90d05380f54b038c9c8c3265150be87c9242c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Thu, 26 Feb 2015 16:15:57 +0000 (16:15 +0000)]
i40e: move IRQ tracking setup into MSIX setup
Move the IRQ tracking setup and teardown into the same routines that
do the IRQ setup and teardown. This keeps like activities together and
allows us to track exactly the number of vectors reserved from the OS,
which may be fewer than are available from the HW.
Change-ID: I6b2b1a955c5f0ac6b94c3084304ed0b2ea6777cf Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Add the 10G and 40G AOC PHY types to the case statement in get_media_type
and ethtool get_settings so that the correct information gets reported
back to the user.
Change-ID: I1b4849d22199a9acf7c8807166d0317c1faad375 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Thu, 26 Feb 2015 16:14:35 +0000 (16:14 +0000)]
i40e: Fix ethtool offline test
If the system administrator is requesting an offline diagnostic test using
'ethtool -t' then we should, you know, actually take the device offline
before doing the testing.
Change-ID: I6afa1cbfcc821c9ab6e6f47ed4d8dc2d8dd20e82 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Some FW versions are incorrectly reporting a breakout cable as PHY type
0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU).
If we get this value back from FW and the version is < 4.40, reassign it
to I40E_PHY_TYPE_10GBASE_SFPP_CU.
Change-ID: Ibb41a0e3cd2c0753744e8553959240df6ed13ae8 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Rafał Miłecki [Wed, 4 Mar 2015 22:07:05 +0000 (23:07 +0100)]
bcma: prepare Kconfig symbol for PCI driver
Driver for PCIe core requires PCI to be enabled, however we shouldn't
require it for the whole bus. Someone may be not interested in extra
PCI devices and what's more there are SoCs without any PCI at all (like
BCM5356C0, BCM5357*, BCM47186B0). For more details see Kconfig "help".
Please note this patch doesn't allow disabling PCI drivers yet, as it
requires more work on calls to bcma_core_pci_* functions.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Wed, 4 Mar 2015 13:24:52 +0000 (14:24 +0100)]
bcma: move internal function declarations to private header
These functions are not exported nor used anywhere, so there is no
reason to put them in public headers.
Also drop unused bcma_chipco_(suspend|resume).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Wed, 4 Mar 2015 11:14:41 +0000 (12:14 +0100)]
bcma: make bcma_host_pci_(up|down) calls safe for every config
We were providing declarations but actual code was compiled only with
CONFIG_BCMA_HOST_PCI set. This could result in:
ERROR: "bcma_host_pci_down" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_down" [drivers/net/wireless/b43/b43.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/b43/b43.ko] undefined!
Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jesse Brandeburg [Thu, 26 Feb 2015 16:12:58 +0000 (16:12 +0000)]
i40e: use more portable sign extension
Use automatic sign extension by replacing 0xffff... constants
with ~(u64)0 or ~(u32)0.
Change-ID: I73cab4cd2611795bb12e00f0f24fafaaee07457c Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Chen Gang [Tue, 3 Mar 2015 21:16:18 +0000 (05:16 +0800)]
bcma: Kconfig: Let it depend on PCI
bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
or will cause building break for allmodconfig under c6x:
CC [M] drivers/bcma/driver_pcie2.o
drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 'pcie_set_readrq' [-Werror=implicit-function-declaration]
err = pcie_set_readrq(dev, pcie2->reqsize);
^
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Shannon Nelson [Thu, 26 Feb 2015 16:12:26 +0000 (16:12 +0000)]
i40e/i40evf: grab NVM devstarter version not image version
0x2A is the NVM version so it has useful data but it is per image
version every image can have a different one. 0x18 is the dev starter
version which all the images for release will have the same version.
Of the two 0x18 is more useful and is what should be displayed.
Change-ID: Idf493da13a42ab211e2de0bef287f5de51033cca Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Neerav Parikh [Thu, 26 Feb 2015 16:12:00 +0000 (16:12 +0000)]
i40e: Don't check operational or sync bit for App TLV
In CEE mode the firmware does not set the operational status bit of
the application TLV status as returned from the "Get CEE DCBX Oper Cfg"
AQ command. This occurs whenever a DCBX configuration is changed.
This is a workaround to remove the check for the operational and sync bits
of the application TLV status till a firmware fix is provided.
Change-ID: I1a31ff2fcadcb06feb5b55776a33593afc6ea176 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Matt Jared [Thu, 26 Feb 2015 16:11:30 +0000 (16:11 +0000)]
i40e: during LED interaction ignore activity LED src modes
Modify our get and set LED functions so they ignore activity LEDs,
as we are required to blink the link LEDs only.
Change-ID: I647ea67a6fc95cbbab6e3cd01d81ec9ae096a9ad Signed-off-by: Matt Jared <matthew.a.jared@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>